UNPKG

1.22 MBJavaScriptView Raw
1(function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
2/******/ // The module cache
3/******/ var installedModules = {};
4/******/
5/******/ // The require function
6/******/ function __webpack_require__(moduleId) {
7/******/
8/******/ // Check if module is in cache
9/******/ if(installedModules[moduleId]) {
10/******/ return installedModules[moduleId].exports;
11/******/ }
12/******/ // Create a new module (and put it into the cache)
13/******/ var module = installedModules[moduleId] = {
14/******/ i: moduleId,
15/******/ l: false,
16/******/ exports: {}
17/******/ };
18/******/
19/******/ // Execute the module function
20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ // Flag the module as loaded
23/******/ module.l = true;
24/******/
25/******/ // Return the exports of the module
26/******/ return module.exports;
27/******/ }
28/******/
29/******/
30/******/ // expose the modules object (__webpack_modules__)
31/******/ __webpack_require__.m = modules;
32/******/
33/******/ // expose the module cache
34/******/ __webpack_require__.c = installedModules;
35/******/
36/******/ // define getter function for harmony exports
37/******/ __webpack_require__.d = function(exports, name, getter) {
38/******/ if(!__webpack_require__.o(exports, name)) {
39/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ }
41/******/ };
42/******/
43/******/ // define __esModule on exports
44/******/ __webpack_require__.r = function(exports) {
45/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ }
48/******/ Object.defineProperty(exports, '__esModule', { value: true });
49/******/ };
50/******/
51/******/ // create a fake namespace object
52/******/ // mode & 1: value is a module id, require it
53/******/ // mode & 2: merge all properties of value into the ns
54/******/ // mode & 4: return value when already ns object
55/******/ // mode & 8|1: behave like require
56/******/ __webpack_require__.t = function(value, mode) {
57/******/ if(mode & 1) value = __webpack_require__(value);
58/******/ if(mode & 8) return value;
59/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ var ns = Object.create(null);
61/******/ __webpack_require__.r(ns);
62/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ return ns;
65/******/ };
66/******/
67/******/ // getDefaultExport function for compatibility with non-harmony modules
68/******/ __webpack_require__.n = function(module) {
69/******/ var getter = module && module.__esModule ?
70/******/ function getDefault() { return module['default']; } :
71/******/ function getModuleExports() { return module; };
72/******/ __webpack_require__.d(getter, 'a', getter);
73/******/ return getter;
74/******/ };
75/******/
76/******/ // Object.prototype.hasOwnProperty.call
77/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ // __webpack_public_path__
80/******/ __webpack_require__.p = "";
81/******/
82/******/
83/******/ // Load entry module and return exports
84/******/ return __webpack_require__(__webpack_require__.s = 350);
85/******/ })
86/************************************************************************/
87/******/ ([
88/* 0 */,
89/* 1 */,
90/* 2 */
91/***/ (function(module, exports, __webpack_require__) {
92
93"use strict";
94
95Object.defineProperty(exports, "__esModule", { value: true });
96exports.sortTexts = {
97 one: "00001",
98 two: "00002",
99 three: "00003",
100 four: "00004",
101};
102exports.projectRootPatterns = [".git", "autoload", "plugin"];
103
104
105/***/ }),
106/* 3 */,
107/* 4 */
108/***/ (function(module, exports, __webpack_require__) {
109
110"use strict";
111/* --------------------------------------------------------------------------------------------
112 * Copyright (c) Microsoft Corporation. All rights reserved.
113 * Licensed under the MIT License. See License.txt in the project root for license information.
114 * ------------------------------------------------------------------------------------------ */
115/// <reference path="./thenable.ts" />
116
117function __export(m) {
118 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
119}
120Object.defineProperty(exports, "__esModule", { value: true });
121const vscode_languageserver_protocol_1 = __webpack_require__(5);
122exports.Event = vscode_languageserver_protocol_1.Event;
123const configuration_1 = __webpack_require__(30);
124const workspaceFolders_1 = __webpack_require__(32);
125const Is = __webpack_require__(31);
126const UUID = __webpack_require__(33);
127// ------------- Reexport the API surface of the language worker API ----------------------
128__export(__webpack_require__(5));
129const fm = __webpack_require__(34);
130var Files;
131(function (Files) {
132 Files.uriToFilePath = fm.uriToFilePath;
133 Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
134 Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
135 Files.resolve = fm.resolve;
136 Files.resolveModule = fm.resolveModule;
137 Files.resolveModule2 = fm.resolveModule2;
138 Files.resolveModulePath = fm.resolveModulePath;
139})(Files = exports.Files || (exports.Files = {}));
140let shutdownReceived = false;
141let exitTimer = undefined;
142function setupExitTimer() {
143 const argName = '--clientProcessId';
144 function runTimer(value) {
145 try {
146 let processId = parseInt(value);
147 if (!isNaN(processId)) {
148 exitTimer = setInterval(() => {
149 try {
150 process.kill(processId, 0);
151 }
152 catch (ex) {
153 // Parent process doesn't exist anymore. Exit the server.
154 process.exit(shutdownReceived ? 0 : 1);
155 }
156 }, 3000);
157 }
158 }
159 catch (e) {
160 // Ignore errors;
161 }
162 }
163 for (let i = 2; i < process.argv.length; i++) {
164 let arg = process.argv[i];
165 if (arg === argName && i + 1 < process.argv.length) {
166 runTimer(process.argv[i + 1]);
167 return;
168 }
169 else {
170 let args = arg.split('=');
171 if (args[0] === argName) {
172 runTimer(args[1]);
173 }
174 }
175 }
176}
177setupExitTimer();
178function null2Undefined(value) {
179 if (value === null) {
180 return void 0;
181 }
182 return value;
183}
184/**
185 * A manager for simple text documents
186 */
187class TextDocuments {
188 /**
189 * Create a new text document manager.
190 */
191 constructor() {
192 this._documents = Object.create(null);
193 this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
194 this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
195 this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
196 this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
197 this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
198 }
199 /**
200 * Returns the [TextDocumentSyncKind](#TextDocumentSyncKind) used by
201 * this text document manager.
202 */
203 get syncKind() {
204 return vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
205 }
206 /**
207 * An event that fires when a text document managed by this manager
208 * has been opened or the content changes.
209 */
210 get onDidChangeContent() {
211 return this._onDidChangeContent.event;
212 }
213 /**
214 * An event that fires when a text document managed by this manager
215 * has been opened.
216 */
217 get onDidOpen() {
218 return this._onDidOpen.event;
219 }
220 /**
221 * An event that fires when a text document managed by this manager
222 * will be saved.
223 */
224 get onWillSave() {
225 return this._onWillSave.event;
226 }
227 /**
228 * Sets a handler that will be called if a participant wants to provide
229 * edits during a text document save.
230 */
231 onWillSaveWaitUntil(handler) {
232 this._willSaveWaitUntil = handler;
233 }
234 /**
235 * An event that fires when a text document managed by this manager
236 * has been saved.
237 */
238 get onDidSave() {
239 return this._onDidSave.event;
240 }
241 /**
242 * An event that fires when a text document managed by this manager
243 * has been closed.
244 */
245 get onDidClose() {
246 return this._onDidClose.event;
247 }
248 /**
249 * Returns the document for the given URI. Returns undefined if
250 * the document is not mananged by this instance.
251 *
252 * @param uri The text document's URI to retrieve.
253 * @return the text document or `undefined`.
254 */
255 get(uri) {
256 return this._documents[uri];
257 }
258 /**
259 * Returns all text documents managed by this instance.
260 *
261 * @return all text documents.
262 */
263 all() {
264 return Object.keys(this._documents).map(key => this._documents[key]);
265 }
266 /**
267 * Returns the URIs of all text documents managed by this instance.
268 *
269 * @return the URI's of all text documents.
270 */
271 keys() {
272 return Object.keys(this._documents);
273 }
274 /**
275 * Listens for `low level` notification on the given connection to
276 * update the text documents managed by this instance.
277 *
278 * @param connection The connection to listen on.
279 */
280 listen(connection) {
281 function isUpdateableDocument(value) {
282 return Is.func(value.update);
283 }
284 connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
285 connection.onDidOpenTextDocument((event) => {
286 let td = event.textDocument;
287 let document = vscode_languageserver_protocol_1.TextDocument.create(td.uri, td.languageId, td.version, td.text);
288 this._documents[td.uri] = document;
289 let toFire = Object.freeze({ document });
290 this._onDidOpen.fire(toFire);
291 this._onDidChangeContent.fire(toFire);
292 });
293 connection.onDidChangeTextDocument((event) => {
294 let td = event.textDocument;
295 let changes = event.contentChanges;
296 let last = changes.length > 0 ? changes[changes.length - 1] : undefined;
297 if (last) {
298 let document = this._documents[td.uri];
299 if (document && isUpdateableDocument(document)) {
300 if (td.version === null || td.version === void 0) {
301 throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
302 }
303 document.update(last, td.version);
304 this._onDidChangeContent.fire(Object.freeze({ document }));
305 }
306 }
307 });
308 connection.onDidCloseTextDocument((event) => {
309 let document = this._documents[event.textDocument.uri];
310 if (document) {
311 delete this._documents[event.textDocument.uri];
312 this._onDidClose.fire(Object.freeze({ document }));
313 }
314 });
315 connection.onWillSaveTextDocument((event) => {
316 let document = this._documents[event.textDocument.uri];
317 if (document) {
318 this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
319 }
320 });
321 connection.onWillSaveTextDocumentWaitUntil((event, token) => {
322 let document = this._documents[event.textDocument.uri];
323 if (document && this._willSaveWaitUntil) {
324 return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
325 }
326 else {
327 return [];
328 }
329 });
330 connection.onDidSaveTextDocument((event) => {
331 let document = this._documents[event.textDocument.uri];
332 if (document) {
333 this._onDidSave.fire(Object.freeze({ document }));
334 }
335 });
336 }
337}
338exports.TextDocuments = TextDocuments;
339/**
340 * Helps tracking error message. Equal occurences of the same
341 * message are only stored once. This class is for example
342 * useful if text documents are validated in a loop and equal
343 * error message should be folded into one.
344 */
345class ErrorMessageTracker {
346 constructor() {
347 this._messages = Object.create(null);
348 }
349 /**
350 * Add a message to the tracker.
351 *
352 * @param message The message to add.
353 */
354 add(message) {
355 let count = this._messages[message];
356 if (!count) {
357 count = 0;
358 }
359 count++;
360 this._messages[message] = count;
361 }
362 /**
363 * Send all tracked messages to the connection's window.
364 *
365 * @param connection The connection established between client and server.
366 */
367 sendErrors(connection) {
368 Object.keys(this._messages).forEach(message => {
369 connection.window.showErrorMessage(message);
370 });
371 }
372}
373exports.ErrorMessageTracker = ErrorMessageTracker;
374var BulkRegistration;
375(function (BulkRegistration) {
376 /**
377 * Creates a new bulk registration.
378 * @return an empty bulk registration.
379 */
380 function create() {
381 return new BulkRegistrationImpl();
382 }
383 BulkRegistration.create = create;
384})(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
385class BulkRegistrationImpl {
386 constructor() {
387 this._registrations = [];
388 this._registered = new Set();
389 }
390 add(type, registerOptions) {
391 const method = Is.string(type) ? type : type.method;
392 if (this._registered.has(method)) {
393 throw new Error(`${method} is already added to this registration`);
394 }
395 const id = UUID.generateUuid();
396 this._registrations.push({
397 id: id,
398 method: method,
399 registerOptions: registerOptions || {}
400 });
401 this._registered.add(method);
402 }
403 asRegistrationParams() {
404 return {
405 registrations: this._registrations
406 };
407 }
408}
409var BulkUnregistration;
410(function (BulkUnregistration) {
411 function create() {
412 return new BulkUnregistrationImpl(undefined, []);
413 }
414 BulkUnregistration.create = create;
415})(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
416class BulkUnregistrationImpl {
417 constructor(_connection, unregistrations) {
418 this._connection = _connection;
419 this._unregistrations = new Map();
420 unregistrations.forEach(unregistration => {
421 this._unregistrations.set(unregistration.method, unregistration);
422 });
423 }
424 get isAttached() {
425 return !!this._connection;
426 }
427 attach(connection) {
428 this._connection = connection;
429 }
430 add(unregistration) {
431 this._unregistrations.set(unregistration.method, unregistration);
432 }
433 dispose() {
434 let unregistrations = [];
435 for (let unregistration of this._unregistrations.values()) {
436 unregistrations.push(unregistration);
437 }
438 let params = {
439 unregisterations: unregistrations
440 };
441 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
442 this._connection.console.info(`Bulk unregistration failed.`);
443 });
444 }
445 disposeSingle(arg) {
446 const method = Is.string(arg) ? arg : arg.method;
447 const unregistration = this._unregistrations.get(method);
448 if (!unregistration) {
449 return false;
450 }
451 let params = {
452 unregisterations: [unregistration]
453 };
454 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
455 this._unregistrations.delete(method);
456 }, (_error) => {
457 this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);
458 });
459 return true;
460 }
461}
462class ConnectionLogger {
463 constructor() {
464 }
465 rawAttach(connection) {
466 this._rawConnection = connection;
467 }
468 attach(connection) {
469 this._connection = connection;
470 }
471 get connection() {
472 if (!this._connection) {
473 throw new Error('Remote is not attached to a connection yet.');
474 }
475 return this._connection;
476 }
477 fillServerCapabilities(_capabilities) {
478 }
479 initialize(_capabilities) {
480 }
481 error(message) {
482 this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
483 }
484 warn(message) {
485 this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
486 }
487 info(message) {
488 this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
489 }
490 log(message) {
491 this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
492 }
493 send(type, message) {
494 if (this._rawConnection) {
495 this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
496 }
497 }
498}
499class RemoteWindowImpl {
500 constructor() {
501 }
502 attach(connection) {
503 this._connection = connection;
504 }
505 get connection() {
506 if (!this._connection) {
507 throw new Error('Remote is not attached to a connection yet.');
508 }
509 return this._connection;
510 }
511 initialize(_capabilities) {
512 }
513 fillServerCapabilities(_capabilities) {
514 }
515 showErrorMessage(message, ...actions) {
516 let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
517 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
518 }
519 showWarningMessage(message, ...actions) {
520 let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
521 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
522 }
523 showInformationMessage(message, ...actions) {
524 let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
525 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
526 }
527}
528class RemoteClientImpl {
529 attach(connection) {
530 this._connection = connection;
531 }
532 get connection() {
533 if (!this._connection) {
534 throw new Error('Remote is not attached to a connection yet.');
535 }
536 return this._connection;
537 }
538 initialize(_capabilities) {
539 }
540 fillServerCapabilities(_capabilities) {
541 }
542 register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
543 if (typeOrRegistrations instanceof BulkRegistrationImpl) {
544 return this.registerMany(typeOrRegistrations);
545 }
546 else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
547 return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
548 }
549 else {
550 return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
551 }
552 }
553 registerSingle1(unregistration, type, registerOptions) {
554 const method = Is.string(type) ? type : type.method;
555 const id = UUID.generateUuid();
556 let params = {
557 registrations: [{ id, method, registerOptions: registerOptions || {} }]
558 };
559 if (!unregistration.isAttached) {
560 unregistration.attach(this._connection);
561 }
562 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
563 unregistration.add({ id: id, method: method });
564 return unregistration;
565 }, (_error) => {
566 this.connection.console.info(`Registering request handler for ${method} failed.`);
567 return Promise.reject(_error);
568 });
569 }
570 registerSingle2(type, registerOptions) {
571 const method = Is.string(type) ? type : type.method;
572 const id = UUID.generateUuid();
573 let params = {
574 registrations: [{ id, method, registerOptions: registerOptions || {} }]
575 };
576 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
577 return vscode_languageserver_protocol_1.Disposable.create(() => {
578 this.unregisterSingle(id, method);
579 });
580 }, (_error) => {
581 this.connection.console.info(`Registering request handler for ${method} failed.`);
582 return Promise.reject(_error);
583 });
584 }
585 unregisterSingle(id, method) {
586 let params = {
587 unregisterations: [{ id, method }]
588 };
589 return this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
590 this.connection.console.info(`Unregistering request handler for ${id} failed.`);
591 });
592 }
593 registerMany(registrations) {
594 let params = registrations.asRegistrationParams();
595 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
596 return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
597 }, (_error) => {
598 this.connection.console.info(`Bulk registration failed.`);
599 return Promise.reject(_error);
600 });
601 }
602}
603class _RemoteWorkspaceImpl {
604 constructor() {
605 }
606 attach(connection) {
607 this._connection = connection;
608 }
609 get connection() {
610 if (!this._connection) {
611 throw new Error('Remote is not attached to a connection yet.');
612 }
613 return this._connection;
614 }
615 initialize(_capabilities) {
616 }
617 fillServerCapabilities(_capabilities) {
618 }
619 applyEdit(paramOrEdit) {
620 function isApplyWorkspaceEditParams(value) {
621 return value && !!value.edit;
622 }
623 let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
624 return this._connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
625 }
626}
627const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));
628class TracerImpl {
629 constructor() {
630 this._trace = vscode_languageserver_protocol_1.Trace.Off;
631 }
632 attach(connection) {
633 this._connection = connection;
634 }
635 get connection() {
636 if (!this._connection) {
637 throw new Error('Remote is not attached to a connection yet.');
638 }
639 return this._connection;
640 }
641 initialize(_capabilities) {
642 }
643 fillServerCapabilities(_capabilities) {
644 }
645 set trace(value) {
646 this._trace = value;
647 }
648 log(message, verbose) {
649 if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
650 return;
651 }
652 this._connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
653 message: message,
654 verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
655 });
656 }
657}
658class TelemetryImpl {
659 constructor() {
660 }
661 attach(connection) {
662 this._connection = connection;
663 }
664 get connection() {
665 if (!this._connection) {
666 throw new Error('Remote is not attached to a connection yet.');
667 }
668 return this._connection;
669 }
670 initialize(_capabilities) {
671 }
672 fillServerCapabilities(_capabilities) {
673 }
674 logEvent(data) {
675 this._connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
676 }
677}
678function combineConsoleFeatures(one, two) {
679 return function (Base) {
680 return two(one(Base));
681 };
682}
683exports.combineConsoleFeatures = combineConsoleFeatures;
684function combineTelemetryFeatures(one, two) {
685 return function (Base) {
686 return two(one(Base));
687 };
688}
689exports.combineTelemetryFeatures = combineTelemetryFeatures;
690function combineTracerFeatures(one, two) {
691 return function (Base) {
692 return two(one(Base));
693 };
694}
695exports.combineTracerFeatures = combineTracerFeatures;
696function combineClientFeatures(one, two) {
697 return function (Base) {
698 return two(one(Base));
699 };
700}
701exports.combineClientFeatures = combineClientFeatures;
702function combineWindowFeatures(one, two) {
703 return function (Base) {
704 return two(one(Base));
705 };
706}
707exports.combineWindowFeatures = combineWindowFeatures;
708function combineWorkspaceFeatures(one, two) {
709 return function (Base) {
710 return two(one(Base));
711 };
712}
713exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
714function combineFeatures(one, two) {
715 function combine(one, two, func) {
716 if (one && two) {
717 return func(one, two);
718 }
719 else if (one) {
720 return one;
721 }
722 else {
723 return two;
724 }
725 }
726 let result = {
727 __brand: 'features',
728 console: combine(one.console, two.console, combineConsoleFeatures),
729 tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
730 telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
731 client: combine(one.client, two.client, combineClientFeatures),
732 window: combine(one.window, two.window, combineWindowFeatures),
733 workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
734 };
735 return result;
736}
737exports.combineFeatures = combineFeatures;
738function createConnection(arg1, arg2, arg3, arg4) {
739 let factories;
740 let input;
741 let output;
742 let strategy;
743 if (arg1 !== void 0 && arg1.__brand === 'features') {
744 factories = arg1;
745 arg1 = arg2;
746 arg2 = arg3;
747 arg3 = arg4;
748 }
749 if (vscode_languageserver_protocol_1.ConnectionStrategy.is(arg1)) {
750 strategy = arg1;
751 }
752 else {
753 input = arg1;
754 output = arg2;
755 strategy = arg3;
756 }
757 return _createConnection(input, output, strategy, factories);
758}
759exports.createConnection = createConnection;
760function _createConnection(input, output, strategy, factories) {
761 if (!input && !output && process.argv.length > 2) {
762 let port = void 0;
763 let pipeName = void 0;
764 let argv = process.argv.slice(2);
765 for (let i = 0; i < argv.length; i++) {
766 let arg = argv[i];
767 if (arg === '--node-ipc') {
768 input = new vscode_languageserver_protocol_1.IPCMessageReader(process);
769 output = new vscode_languageserver_protocol_1.IPCMessageWriter(process);
770 break;
771 }
772 else if (arg === '--stdio') {
773 input = process.stdin;
774 output = process.stdout;
775 break;
776 }
777 else if (arg === '--socket') {
778 port = parseInt(argv[i + 1]);
779 break;
780 }
781 else if (arg === '--pipe') {
782 pipeName = argv[i + 1];
783 break;
784 }
785 else {
786 var args = arg.split('=');
787 if (args[0] === '--socket') {
788 port = parseInt(args[1]);
789 break;
790 }
791 else if (args[0] === '--pipe') {
792 pipeName = args[1];
793 break;
794 }
795 }
796 }
797 if (port) {
798 let transport = vscode_languageserver_protocol_1.createServerSocketTransport(port);
799 input = transport[0];
800 output = transport[1];
801 }
802 else if (pipeName) {
803 let transport = vscode_languageserver_protocol_1.createServerPipeTransport(pipeName);
804 input = transport[0];
805 output = transport[1];
806 }
807 }
808 var commandLineMessage = "Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";
809 if (!input) {
810 throw new Error("Connection input stream is not set. " + commandLineMessage);
811 }
812 if (!output) {
813 throw new Error("Connection output stream is not set. " + commandLineMessage);
814 }
815 // Backwards compatibility
816 if (Is.func(input.read) && Is.func(input.on)) {
817 let inputStream = input;
818 inputStream.on('end', () => {
819 process.exit(shutdownReceived ? 0 : 1);
820 });
821 inputStream.on('close', () => {
822 process.exit(shutdownReceived ? 0 : 1);
823 });
824 }
825 const logger = (factories && factories.console ? new (factories.console(ConnectionLogger))() : new ConnectionLogger());
826 const connection = vscode_languageserver_protocol_1.createProtocolConnection(input, output, logger, strategy);
827 logger.rawAttach(connection);
828 const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
829 const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
830 const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
831 const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
832 const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
833 const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace];
834 function asThenable(value) {
835 if (Is.thenable(value)) {
836 return value;
837 }
838 else {
839 return Promise.resolve(value);
840 }
841 }
842 let shutdownHandler = undefined;
843 let initializeHandler = undefined;
844 let exitHandler = undefined;
845 let protocolConnection = {
846 listen: () => connection.listen(),
847 sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
848 onRequest: (type, handler) => connection.onRequest(type, handler),
849 sendNotification: (type, param) => {
850 const method = Is.string(type) ? type : type.method;
851 if (arguments.length === 1) {
852 connection.sendNotification(method);
853 }
854 else {
855 connection.sendNotification(method, param);
856 }
857 },
858 onNotification: (type, handler) => connection.onNotification(type, handler),
859 onInitialize: (handler) => initializeHandler = handler,
860 onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
861 onShutdown: (handler) => shutdownHandler = handler,
862 onExit: (handler) => exitHandler = handler,
863 get console() { return logger; },
864 get telemetry() { return telemetry; },
865 get tracer() { return tracer; },
866 get client() { return client; },
867 get window() { return remoteWindow; },
868 get workspace() { return workspace; },
869 onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
870 onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
871 __textDocumentSync: undefined,
872 onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
873 onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
874 onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
875 onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
876 onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
877 onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
878 sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
879 onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, handler),
880 onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, handler),
881 onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
882 onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, handler),
883 onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, handler),
884 onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, handler),
885 onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, handler),
886 onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, handler),
887 onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, handler),
888 onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, handler),
889 onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, handler),
890 onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, handler),
891 onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, handler),
892 onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, handler),
893 onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, handler),
894 onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, handler),
895 onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, handler),
896 onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, handler),
897 onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, handler),
898 onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, handler),
899 onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, handler),
900 onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, handler),
901 onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, handler),
902 onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, handler),
903 onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, handler),
904 onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, handler),
905 dispose: () => connection.dispose()
906 };
907 for (let remote of allRemotes) {
908 remote.attach(protocolConnection);
909 }
910 connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
911 const processId = params.processId;
912 if (Is.number(processId) && exitTimer === void 0) {
913 // We received a parent process id. Set up a timer to periodically check
914 // if the parent is still alive.
915 setInterval(() => {
916 try {
917 process.kill(processId, 0);
918 }
919 catch (ex) {
920 // Parent process doesn't exist anymore. Exit the server.
921 process.exit(shutdownReceived ? 0 : 1);
922 }
923 }, 3000);
924 }
925 if (Is.string(params.trace)) {
926 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
927 }
928 for (let remote of allRemotes) {
929 remote.initialize(params.capabilities);
930 }
931 if (initializeHandler) {
932 let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token);
933 return asThenable(result).then((value) => {
934 if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
935 return value;
936 }
937 let result = value;
938 if (!result) {
939 result = { capabilities: {} };
940 }
941 let capabilities = result.capabilities;
942 if (!capabilities) {
943 capabilities = {};
944 result.capabilities = capabilities;
945 }
946 if (capabilities.textDocumentSync === void 0 || capabilities.textDocumentSync === null) {
947 capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
948 }
949 else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
950 capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
951 }
952 for (let remote of allRemotes) {
953 remote.fillServerCapabilities(capabilities);
954 }
955 return result;
956 });
957 }
958 else {
959 let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
960 for (let remote of allRemotes) {
961 remote.fillServerCapabilities(result.capabilities);
962 }
963 return result;
964 }
965 });
966 connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
967 shutdownReceived = true;
968 if (shutdownHandler) {
969 return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
970 }
971 else {
972 return undefined;
973 }
974 });
975 connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
976 try {
977 if (exitHandler) {
978 exitHandler();
979 }
980 }
981 finally {
982 if (shutdownReceived) {
983 process.exit(0);
984 }
985 else {
986 process.exit(1);
987 }
988 }
989 });
990 connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
991 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
992 });
993 return protocolConnection;
994}
995// Export the protocol currently in proposed state.
996var ProposedFeatures;
997(function (ProposedFeatures) {
998 ProposedFeatures.all = {
999 __brand: 'features',
1000 };
1001})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
1002
1003
1004/***/ }),
1005/* 5 */
1006/***/ (function(module, exports, __webpack_require__) {
1007
1008"use strict";
1009/* --------------------------------------------------------------------------------------------
1010 * Copyright (c) Microsoft Corporation. All rights reserved.
1011 * Licensed under the MIT License. See License.txt in the project root for license information.
1012 * ------------------------------------------------------------------------------------------ */
1013
1014function __export(m) {
1015 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1016}
1017Object.defineProperty(exports, "__esModule", { value: true });
1018const vscode_jsonrpc_1 = __webpack_require__(6);
1019exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
1020exports.ResponseError = vscode_jsonrpc_1.ResponseError;
1021exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
1022exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
1023exports.Disposable = vscode_jsonrpc_1.Disposable;
1024exports.Event = vscode_jsonrpc_1.Event;
1025exports.Emitter = vscode_jsonrpc_1.Emitter;
1026exports.Trace = vscode_jsonrpc_1.Trace;
1027exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
1028exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
1029exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
1030exports.RequestType = vscode_jsonrpc_1.RequestType;
1031exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
1032exports.NotificationType = vscode_jsonrpc_1.NotificationType;
1033exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
1034exports.MessageReader = vscode_jsonrpc_1.MessageReader;
1035exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
1036exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
1037exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
1038exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
1039exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
1040exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
1041exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
1042exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
1043exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
1044exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
1045exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
1046__export(__webpack_require__(20));
1047__export(__webpack_require__(21));
1048function createProtocolConnection(reader, writer, logger, strategy) {
1049 return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
1050}
1051exports.createProtocolConnection = createProtocolConnection;
1052
1053
1054/***/ }),
1055/* 6 */
1056/***/ (function(module, exports, __webpack_require__) {
1057
1058"use strict";
1059/* --------------------------------------------------------------------------------------------
1060 * Copyright (c) Microsoft Corporation. All rights reserved.
1061 * Licensed under the MIT License. See License.txt in the project root for license information.
1062 * ------------------------------------------------------------------------------------------ */
1063/// <reference path="./thenable.ts" />
1064
1065function __export(m) {
1066 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1067}
1068Object.defineProperty(exports, "__esModule", { value: true });
1069const Is = __webpack_require__(7);
1070const messages_1 = __webpack_require__(8);
1071exports.RequestType = messages_1.RequestType;
1072exports.RequestType0 = messages_1.RequestType0;
1073exports.RequestType1 = messages_1.RequestType1;
1074exports.RequestType2 = messages_1.RequestType2;
1075exports.RequestType3 = messages_1.RequestType3;
1076exports.RequestType4 = messages_1.RequestType4;
1077exports.RequestType5 = messages_1.RequestType5;
1078exports.RequestType6 = messages_1.RequestType6;
1079exports.RequestType7 = messages_1.RequestType7;
1080exports.RequestType8 = messages_1.RequestType8;
1081exports.RequestType9 = messages_1.RequestType9;
1082exports.ResponseError = messages_1.ResponseError;
1083exports.ErrorCodes = messages_1.ErrorCodes;
1084exports.NotificationType = messages_1.NotificationType;
1085exports.NotificationType0 = messages_1.NotificationType0;
1086exports.NotificationType1 = messages_1.NotificationType1;
1087exports.NotificationType2 = messages_1.NotificationType2;
1088exports.NotificationType3 = messages_1.NotificationType3;
1089exports.NotificationType4 = messages_1.NotificationType4;
1090exports.NotificationType5 = messages_1.NotificationType5;
1091exports.NotificationType6 = messages_1.NotificationType6;
1092exports.NotificationType7 = messages_1.NotificationType7;
1093exports.NotificationType8 = messages_1.NotificationType8;
1094exports.NotificationType9 = messages_1.NotificationType9;
1095const messageReader_1 = __webpack_require__(9);
1096exports.MessageReader = messageReader_1.MessageReader;
1097exports.StreamMessageReader = messageReader_1.StreamMessageReader;
1098exports.IPCMessageReader = messageReader_1.IPCMessageReader;
1099exports.SocketMessageReader = messageReader_1.SocketMessageReader;
1100const messageWriter_1 = __webpack_require__(11);
1101exports.MessageWriter = messageWriter_1.MessageWriter;
1102exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;
1103exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;
1104exports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;
1105const events_1 = __webpack_require__(10);
1106exports.Disposable = events_1.Disposable;
1107exports.Event = events_1.Event;
1108exports.Emitter = events_1.Emitter;
1109const cancellation_1 = __webpack_require__(12);
1110exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
1111exports.CancellationToken = cancellation_1.CancellationToken;
1112const linkedMap_1 = __webpack_require__(13);
1113__export(__webpack_require__(14));
1114__export(__webpack_require__(19));
1115var CancelNotification;
1116(function (CancelNotification) {
1117 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
1118})(CancelNotification || (CancelNotification = {}));
1119exports.NullLogger = Object.freeze({
1120 error: () => { },
1121 warn: () => { },
1122 info: () => { },
1123 log: () => { }
1124});
1125var Trace;
1126(function (Trace) {
1127 Trace[Trace["Off"] = 0] = "Off";
1128 Trace[Trace["Messages"] = 1] = "Messages";
1129 Trace[Trace["Verbose"] = 2] = "Verbose";
1130})(Trace = exports.Trace || (exports.Trace = {}));
1131(function (Trace) {
1132 function fromString(value) {
1133 value = value.toLowerCase();
1134 switch (value) {
1135 case 'off':
1136 return Trace.Off;
1137 case 'messages':
1138 return Trace.Messages;
1139 case 'verbose':
1140 return Trace.Verbose;
1141 default:
1142 return Trace.Off;
1143 }
1144 }
1145 Trace.fromString = fromString;
1146 function toString(value) {
1147 switch (value) {
1148 case Trace.Off:
1149 return 'off';
1150 case Trace.Messages:
1151 return 'messages';
1152 case Trace.Verbose:
1153 return 'verbose';
1154 default:
1155 return 'off';
1156 }
1157 }
1158 Trace.toString = toString;
1159})(Trace = exports.Trace || (exports.Trace = {}));
1160var TraceFormat;
1161(function (TraceFormat) {
1162 TraceFormat["Text"] = "text";
1163 TraceFormat["JSON"] = "json";
1164})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1165(function (TraceFormat) {
1166 function fromString(value) {
1167 value = value.toLowerCase();
1168 if (value === 'json') {
1169 return TraceFormat.JSON;
1170 }
1171 else {
1172 return TraceFormat.Text;
1173 }
1174 }
1175 TraceFormat.fromString = fromString;
1176})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1177var SetTraceNotification;
1178(function (SetTraceNotification) {
1179 SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
1180})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
1181var LogTraceNotification;
1182(function (LogTraceNotification) {
1183 LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
1184})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
1185var ConnectionErrors;
1186(function (ConnectionErrors) {
1187 /**
1188 * The connection is closed.
1189 */
1190 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
1191 /**
1192 * The connection got disposed.
1193 */
1194 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
1195 /**
1196 * The connection is already in listening mode.
1197 */
1198 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
1199})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
1200class ConnectionError extends Error {
1201 constructor(code, message) {
1202 super(message);
1203 this.code = code;
1204 Object.setPrototypeOf(this, ConnectionError.prototype);
1205 }
1206}
1207exports.ConnectionError = ConnectionError;
1208var ConnectionStrategy;
1209(function (ConnectionStrategy) {
1210 function is(value) {
1211 let candidate = value;
1212 return candidate && Is.func(candidate.cancelUndispatched);
1213 }
1214 ConnectionStrategy.is = is;
1215})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
1216var ConnectionState;
1217(function (ConnectionState) {
1218 ConnectionState[ConnectionState["New"] = 1] = "New";
1219 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
1220 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
1221 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
1222})(ConnectionState || (ConnectionState = {}));
1223function _createMessageConnection(messageReader, messageWriter, logger, strategy) {
1224 let sequenceNumber = 0;
1225 let notificationSquenceNumber = 0;
1226 let unknownResponseSquenceNumber = 0;
1227 const version = '2.0';
1228 let starRequestHandler = undefined;
1229 let requestHandlers = Object.create(null);
1230 let starNotificationHandler = undefined;
1231 let notificationHandlers = Object.create(null);
1232 let timer;
1233 let messageQueue = new linkedMap_1.LinkedMap();
1234 let responsePromises = Object.create(null);
1235 let requestTokens = Object.create(null);
1236 let trace = Trace.Off;
1237 let traceFormat = TraceFormat.Text;
1238 let tracer;
1239 let state = ConnectionState.New;
1240 let errorEmitter = new events_1.Emitter();
1241 let closeEmitter = new events_1.Emitter();
1242 let unhandledNotificationEmitter = new events_1.Emitter();
1243 let disposeEmitter = new events_1.Emitter();
1244 function createRequestQueueKey(id) {
1245 return 'req-' + id.toString();
1246 }
1247 function createResponseQueueKey(id) {
1248 if (id === null) {
1249 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
1250 }
1251 else {
1252 return 'res-' + id.toString();
1253 }
1254 }
1255 function createNotificationQueueKey() {
1256 return 'not-' + (++notificationSquenceNumber).toString();
1257 }
1258 function addMessageToQueue(queue, message) {
1259 if (messages_1.isRequestMessage(message)) {
1260 queue.set(createRequestQueueKey(message.id), message);
1261 }
1262 else if (messages_1.isResponseMessage(message)) {
1263 queue.set(createResponseQueueKey(message.id), message);
1264 }
1265 else {
1266 queue.set(createNotificationQueueKey(), message);
1267 }
1268 }
1269 function cancelUndispatched(_message) {
1270 return undefined;
1271 }
1272 function isListening() {
1273 return state === ConnectionState.Listening;
1274 }
1275 function isClosed() {
1276 return state === ConnectionState.Closed;
1277 }
1278 function isDisposed() {
1279 return state === ConnectionState.Disposed;
1280 }
1281 function closeHandler() {
1282 if (state === ConnectionState.New || state === ConnectionState.Listening) {
1283 state = ConnectionState.Closed;
1284 closeEmitter.fire(undefined);
1285 }
1286 // If the connection is disposed don't sent close events.
1287 }
1288 ;
1289 function readErrorHandler(error) {
1290 errorEmitter.fire([error, undefined, undefined]);
1291 }
1292 function writeErrorHandler(data) {
1293 errorEmitter.fire(data);
1294 }
1295 messageReader.onClose(closeHandler);
1296 messageReader.onError(readErrorHandler);
1297 messageWriter.onClose(closeHandler);
1298 messageWriter.onError(writeErrorHandler);
1299 function triggerMessageQueue() {
1300 if (timer || messageQueue.size === 0) {
1301 return;
1302 }
1303 timer = setImmediate(() => {
1304 timer = undefined;
1305 processMessageQueue();
1306 });
1307 }
1308 function processMessageQueue() {
1309 if (messageQueue.size === 0) {
1310 return;
1311 }
1312 let message = messageQueue.shift();
1313 try {
1314 if (messages_1.isRequestMessage(message)) {
1315 handleRequest(message);
1316 }
1317 else if (messages_1.isNotificationMessage(message)) {
1318 handleNotification(message);
1319 }
1320 else if (messages_1.isResponseMessage(message)) {
1321 handleResponse(message);
1322 }
1323 else {
1324 handleInvalidMessage(message);
1325 }
1326 }
1327 finally {
1328 triggerMessageQueue();
1329 }
1330 }
1331 let callback = (message) => {
1332 try {
1333 // We have received a cancellation message. Check if the message is still in the queue
1334 // and cancel it if allowed to do so.
1335 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
1336 let key = createRequestQueueKey(message.params.id);
1337 let toCancel = messageQueue.get(key);
1338 if (messages_1.isRequestMessage(toCancel)) {
1339 let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
1340 if (response && (response.error !== void 0 || response.result !== void 0)) {
1341 messageQueue.delete(key);
1342 response.id = toCancel.id;
1343 traceSendingResponse(response, message.method, Date.now());
1344 messageWriter.write(response);
1345 return;
1346 }
1347 }
1348 }
1349 addMessageToQueue(messageQueue, message);
1350 }
1351 finally {
1352 triggerMessageQueue();
1353 }
1354 };
1355 function handleRequest(requestMessage) {
1356 if (isDisposed()) {
1357 // we return here silently since we fired an event when the
1358 // connection got disposed.
1359 return;
1360 }
1361 function reply(resultOrError, method, startTime) {
1362 let message = {
1363 jsonrpc: version,
1364 id: requestMessage.id
1365 };
1366 if (resultOrError instanceof messages_1.ResponseError) {
1367 message.error = resultOrError.toJson();
1368 }
1369 else {
1370 message.result = resultOrError === void 0 ? null : resultOrError;
1371 }
1372 traceSendingResponse(message, method, startTime);
1373 messageWriter.write(message);
1374 }
1375 function replyError(error, method, startTime) {
1376 let message = {
1377 jsonrpc: version,
1378 id: requestMessage.id,
1379 error: error.toJson()
1380 };
1381 traceSendingResponse(message, method, startTime);
1382 messageWriter.write(message);
1383 }
1384 function replySuccess(result, method, startTime) {
1385 // The JSON RPC defines that a response must either have a result or an error
1386 // So we can't treat undefined as a valid response result.
1387 if (result === void 0) {
1388 result = null;
1389 }
1390 let message = {
1391 jsonrpc: version,
1392 id: requestMessage.id,
1393 result: result
1394 };
1395 traceSendingResponse(message, method, startTime);
1396 messageWriter.write(message);
1397 }
1398 traceReceivedRequest(requestMessage);
1399 let element = requestHandlers[requestMessage.method];
1400 let type;
1401 let requestHandler;
1402 if (element) {
1403 type = element.type;
1404 requestHandler = element.handler;
1405 }
1406 let startTime = Date.now();
1407 if (requestHandler || starRequestHandler) {
1408 let cancellationSource = new cancellation_1.CancellationTokenSource();
1409 let tokenKey = String(requestMessage.id);
1410 requestTokens[tokenKey] = cancellationSource;
1411 try {
1412 let handlerResult;
1413 if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1414 handlerResult = requestHandler
1415 ? requestHandler(cancellationSource.token)
1416 : starRequestHandler(requestMessage.method, cancellationSource.token);
1417 }
1418 else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {
1419 handlerResult = requestHandler
1420 ? requestHandler(...requestMessage.params, cancellationSource.token)
1421 : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
1422 }
1423 else {
1424 handlerResult = requestHandler
1425 ? requestHandler(requestMessage.params, cancellationSource.token)
1426 : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
1427 }
1428 let promise = handlerResult;
1429 if (!handlerResult) {
1430 delete requestTokens[tokenKey];
1431 replySuccess(handlerResult, requestMessage.method, startTime);
1432 }
1433 else if (promise.then) {
1434 promise.then((resultOrError) => {
1435 delete requestTokens[tokenKey];
1436 reply(resultOrError, requestMessage.method, startTime);
1437 }, error => {
1438 delete requestTokens[tokenKey];
1439 if (error instanceof messages_1.ResponseError) {
1440 replyError(error, requestMessage.method, startTime);
1441 }
1442 else if (error && Is.string(error.message)) {
1443 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1444 }
1445 else {
1446 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1447 }
1448 });
1449 }
1450 else {
1451 delete requestTokens[tokenKey];
1452 reply(handlerResult, requestMessage.method, startTime);
1453 }
1454 }
1455 catch (error) {
1456 delete requestTokens[tokenKey];
1457 if (error instanceof messages_1.ResponseError) {
1458 reply(error, requestMessage.method, startTime);
1459 }
1460 else if (error && Is.string(error.message)) {
1461 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1462 }
1463 else {
1464 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1465 }
1466 }
1467 }
1468 else {
1469 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
1470 }
1471 }
1472 function handleResponse(responseMessage) {
1473 if (isDisposed()) {
1474 // See handle request.
1475 return;
1476 }
1477 if (responseMessage.id === null) {
1478 if (responseMessage.error) {
1479 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
1480 }
1481 else {
1482 logger.error(`Received response message without id. No further error information provided.`);
1483 }
1484 }
1485 else {
1486 let key = String(responseMessage.id);
1487 let responsePromise = responsePromises[key];
1488 traceReceivedResponse(responseMessage, responsePromise);
1489 if (responsePromise) {
1490 delete responsePromises[key];
1491 try {
1492 if (responseMessage.error) {
1493 let error = responseMessage.error;
1494 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
1495 }
1496 else if (responseMessage.result !== void 0) {
1497 responsePromise.resolve(responseMessage.result);
1498 }
1499 else {
1500 throw new Error('Should never happen.');
1501 }
1502 }
1503 catch (error) {
1504 if (error.message) {
1505 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
1506 }
1507 else {
1508 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
1509 }
1510 }
1511 }
1512 }
1513 }
1514 function handleNotification(message) {
1515 if (isDisposed()) {
1516 // See handle request.
1517 return;
1518 }
1519 let type = undefined;
1520 let notificationHandler;
1521 if (message.method === CancelNotification.type.method) {
1522 notificationHandler = (params) => {
1523 let id = params.id;
1524 let source = requestTokens[String(id)];
1525 if (source) {
1526 source.cancel();
1527 }
1528 };
1529 }
1530 else {
1531 let element = notificationHandlers[message.method];
1532 if (element) {
1533 notificationHandler = element.handler;
1534 type = element.type;
1535 }
1536 }
1537 if (notificationHandler || starNotificationHandler) {
1538 try {
1539 traceReceivedNotification(message);
1540 if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1541 notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
1542 }
1543 else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {
1544 notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
1545 }
1546 else {
1547 notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
1548 }
1549 }
1550 catch (error) {
1551 if (error.message) {
1552 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
1553 }
1554 else {
1555 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
1556 }
1557 }
1558 }
1559 else {
1560 unhandledNotificationEmitter.fire(message);
1561 }
1562 }
1563 function handleInvalidMessage(message) {
1564 if (!message) {
1565 logger.error('Received empty message.');
1566 return;
1567 }
1568 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
1569 // Test whether we find an id to reject the promise
1570 let responseMessage = message;
1571 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
1572 let key = String(responseMessage.id);
1573 let responseHandler = responsePromises[key];
1574 if (responseHandler) {
1575 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
1576 }
1577 }
1578 }
1579 function traceSendingRequest(message) {
1580 if (trace === Trace.Off || !tracer) {
1581 return;
1582 }
1583 if (traceFormat === TraceFormat.Text) {
1584 let data = undefined;
1585 if (trace === Trace.Verbose && message.params) {
1586 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1587 }
1588 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
1589 }
1590 else {
1591 logLSPMessage('send-request', message);
1592 }
1593 }
1594 function traceSendingNotification(message) {
1595 if (trace === Trace.Off || !tracer) {
1596 return;
1597 }
1598 if (traceFormat === TraceFormat.Text) {
1599 let data = undefined;
1600 if (trace === Trace.Verbose) {
1601 if (message.params) {
1602 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1603 }
1604 else {
1605 data = 'No parameters provided.\n\n';
1606 }
1607 }
1608 tracer.log(`Sending notification '${message.method}'.`, data);
1609 }
1610 else {
1611 logLSPMessage('send-notification', message);
1612 }
1613 }
1614 function traceSendingResponse(message, method, startTime) {
1615 if (trace === Trace.Off || !tracer) {
1616 return;
1617 }
1618 if (traceFormat === TraceFormat.Text) {
1619 let data = undefined;
1620 if (trace === Trace.Verbose) {
1621 if (message.error && message.error.data) {
1622 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1623 }
1624 else {
1625 if (message.result) {
1626 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1627 }
1628 else if (message.error === void 0) {
1629 data = 'No result returned.\n\n';
1630 }
1631 }
1632 }
1633 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
1634 }
1635 else {
1636 logLSPMessage('send-response', message);
1637 }
1638 }
1639 function traceReceivedRequest(message) {
1640 if (trace === Trace.Off || !tracer) {
1641 return;
1642 }
1643 if (traceFormat === TraceFormat.Text) {
1644 let data = undefined;
1645 if (trace === Trace.Verbose && message.params) {
1646 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1647 }
1648 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
1649 }
1650 else {
1651 logLSPMessage('receive-request', message);
1652 }
1653 }
1654 function traceReceivedNotification(message) {
1655 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
1656 return;
1657 }
1658 if (traceFormat === TraceFormat.Text) {
1659 let data = undefined;
1660 if (trace === Trace.Verbose) {
1661 if (message.params) {
1662 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1663 }
1664 else {
1665 data = 'No parameters provided.\n\n';
1666 }
1667 }
1668 tracer.log(`Received notification '${message.method}'.`, data);
1669 }
1670 else {
1671 logLSPMessage('receive-notification', message);
1672 }
1673 }
1674 function traceReceivedResponse(message, responsePromise) {
1675 if (trace === Trace.Off || !tracer) {
1676 return;
1677 }
1678 if (traceFormat === TraceFormat.Text) {
1679 let data = undefined;
1680 if (trace === Trace.Verbose) {
1681 if (message.error && message.error.data) {
1682 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1683 }
1684 else {
1685 if (message.result) {
1686 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1687 }
1688 else if (message.error === void 0) {
1689 data = 'No result returned.\n\n';
1690 }
1691 }
1692 }
1693 if (responsePromise) {
1694 let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
1695 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
1696 }
1697 else {
1698 tracer.log(`Received response ${message.id} without active response promise.`, data);
1699 }
1700 }
1701 else {
1702 logLSPMessage('receive-response', message);
1703 }
1704 }
1705 function logLSPMessage(type, message) {
1706 if (!tracer || trace === Trace.Off) {
1707 return;
1708 }
1709 const lspMessage = {
1710 isLSPMessage: true,
1711 type,
1712 message,
1713 timestamp: Date.now()
1714 };
1715 tracer.log(lspMessage);
1716 }
1717 function throwIfClosedOrDisposed() {
1718 if (isClosed()) {
1719 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
1720 }
1721 if (isDisposed()) {
1722 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
1723 }
1724 }
1725 function throwIfListening() {
1726 if (isListening()) {
1727 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
1728 }
1729 }
1730 function throwIfNotListening() {
1731 if (!isListening()) {
1732 throw new Error('Call listen() first.');
1733 }
1734 }
1735 function undefinedToNull(param) {
1736 if (param === void 0) {
1737 return null;
1738 }
1739 else {
1740 return param;
1741 }
1742 }
1743 function computeMessageParams(type, params) {
1744 let result;
1745 let numberOfParams = type.numberOfParams;
1746 switch (numberOfParams) {
1747 case 0:
1748 result = null;
1749 break;
1750 case 1:
1751 result = undefinedToNull(params[0]);
1752 break;
1753 default:
1754 result = [];
1755 for (let i = 0; i < params.length && i < numberOfParams; i++) {
1756 result.push(undefinedToNull(params[i]));
1757 }
1758 if (params.length < numberOfParams) {
1759 for (let i = params.length; i < numberOfParams; i++) {
1760 result.push(null);
1761 }
1762 }
1763 break;
1764 }
1765 return result;
1766 }
1767 let connection = {
1768 sendNotification: (type, ...params) => {
1769 throwIfClosedOrDisposed();
1770 let method;
1771 let messageParams;
1772 if (Is.string(type)) {
1773 method = type;
1774 switch (params.length) {
1775 case 0:
1776 messageParams = null;
1777 break;
1778 case 1:
1779 messageParams = params[0];
1780 break;
1781 default:
1782 messageParams = params;
1783 break;
1784 }
1785 }
1786 else {
1787 method = type.method;
1788 messageParams = computeMessageParams(type, params);
1789 }
1790 let notificationMessage = {
1791 jsonrpc: version,
1792 method: method,
1793 params: messageParams
1794 };
1795 traceSendingNotification(notificationMessage);
1796 messageWriter.write(notificationMessage);
1797 },
1798 onNotification: (type, handler) => {
1799 throwIfClosedOrDisposed();
1800 if (Is.func(type)) {
1801 starNotificationHandler = type;
1802 }
1803 else if (handler) {
1804 if (Is.string(type)) {
1805 notificationHandlers[type] = { type: undefined, handler };
1806 }
1807 else {
1808 notificationHandlers[type.method] = { type, handler };
1809 }
1810 }
1811 },
1812 sendRequest: (type, ...params) => {
1813 throwIfClosedOrDisposed();
1814 throwIfNotListening();
1815 let method;
1816 let messageParams;
1817 let token = undefined;
1818 if (Is.string(type)) {
1819 method = type;
1820 switch (params.length) {
1821 case 0:
1822 messageParams = null;
1823 break;
1824 case 1:
1825 // The cancellation token is optional so it can also be undefined.
1826 if (cancellation_1.CancellationToken.is(params[0])) {
1827 messageParams = null;
1828 token = params[0];
1829 }
1830 else {
1831 messageParams = undefinedToNull(params[0]);
1832 }
1833 break;
1834 default:
1835 const last = params.length - 1;
1836 if (cancellation_1.CancellationToken.is(params[last])) {
1837 token = params[last];
1838 if (params.length === 2) {
1839 messageParams = undefinedToNull(params[0]);
1840 }
1841 else {
1842 messageParams = params.slice(0, last).map(value => undefinedToNull(value));
1843 }
1844 }
1845 else {
1846 messageParams = params.map(value => undefinedToNull(value));
1847 }
1848 break;
1849 }
1850 }
1851 else {
1852 method = type.method;
1853 messageParams = computeMessageParams(type, params);
1854 let numberOfParams = type.numberOfParams;
1855 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
1856 }
1857 let id = sequenceNumber++;
1858 let result = new Promise((resolve, reject) => {
1859 let requestMessage = {
1860 jsonrpc: version,
1861 id: id,
1862 method: method,
1863 params: messageParams
1864 };
1865 let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };
1866 traceSendingRequest(requestMessage);
1867 try {
1868 messageWriter.write(requestMessage);
1869 }
1870 catch (e) {
1871 // Writing the message failed. So we need to reject the promise.
1872 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
1873 responsePromise = null;
1874 }
1875 if (responsePromise) {
1876 responsePromises[String(id)] = responsePromise;
1877 }
1878 });
1879 if (token) {
1880 token.onCancellationRequested(() => {
1881 connection.sendNotification(CancelNotification.type, { id });
1882 });
1883 }
1884 return result;
1885 },
1886 onRequest: (type, handler) => {
1887 throwIfClosedOrDisposed();
1888 if (Is.func(type)) {
1889 starRequestHandler = type;
1890 }
1891 else if (handler) {
1892 if (Is.string(type)) {
1893 requestHandlers[type] = { type: undefined, handler };
1894 }
1895 else {
1896 requestHandlers[type.method] = { type, handler };
1897 }
1898 }
1899 },
1900 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
1901 let _sendNotification = false;
1902 let _traceFormat = TraceFormat.Text;
1903 if (sendNotificationOrTraceOptions !== void 0) {
1904 if (Is.boolean(sendNotificationOrTraceOptions)) {
1905 _sendNotification = sendNotificationOrTraceOptions;
1906 }
1907 else {
1908 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
1909 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
1910 }
1911 }
1912 trace = _value;
1913 traceFormat = _traceFormat;
1914 if (trace === Trace.Off) {
1915 tracer = undefined;
1916 }
1917 else {
1918 tracer = _tracer;
1919 }
1920 if (_sendNotification && !isClosed() && !isDisposed()) {
1921 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
1922 }
1923 },
1924 onError: errorEmitter.event,
1925 onClose: closeEmitter.event,
1926 onUnhandledNotification: unhandledNotificationEmitter.event,
1927 onDispose: disposeEmitter.event,
1928 dispose: () => {
1929 if (isDisposed()) {
1930 return;
1931 }
1932 state = ConnectionState.Disposed;
1933 disposeEmitter.fire(undefined);
1934 let error = new Error('Connection got disposed.');
1935 Object.keys(responsePromises).forEach((key) => {
1936 responsePromises[key].reject(error);
1937 });
1938 responsePromises = Object.create(null);
1939 requestTokens = Object.create(null);
1940 messageQueue = new linkedMap_1.LinkedMap();
1941 // Test for backwards compatibility
1942 if (Is.func(messageWriter.dispose)) {
1943 messageWriter.dispose();
1944 }
1945 if (Is.func(messageReader.dispose)) {
1946 messageReader.dispose();
1947 }
1948 },
1949 listen: () => {
1950 throwIfClosedOrDisposed();
1951 throwIfListening();
1952 state = ConnectionState.Listening;
1953 messageReader.listen(callback);
1954 },
1955 inspect: () => {
1956 console.log("inspect");
1957 }
1958 };
1959 connection.onNotification(LogTraceNotification.type, (params) => {
1960 if (trace === Trace.Off || !tracer) {
1961 return;
1962 }
1963 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
1964 });
1965 return connection;
1966}
1967function isMessageReader(value) {
1968 return value.listen !== void 0 && value.read === void 0;
1969}
1970function isMessageWriter(value) {
1971 return value.write !== void 0 && value.end === void 0;
1972}
1973function createMessageConnection(input, output, logger, strategy) {
1974 if (!logger) {
1975 logger = exports.NullLogger;
1976 }
1977 let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);
1978 let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);
1979 return _createMessageConnection(reader, writer, logger, strategy);
1980}
1981exports.createMessageConnection = createMessageConnection;
1982
1983
1984/***/ }),
1985/* 7 */
1986/***/ (function(module, exports, __webpack_require__) {
1987
1988"use strict";
1989/* --------------------------------------------------------------------------------------------
1990 * Copyright (c) Microsoft Corporation. All rights reserved.
1991 * Licensed under the MIT License. See License.txt in the project root for license information.
1992 * ------------------------------------------------------------------------------------------ */
1993
1994Object.defineProperty(exports, "__esModule", { value: true });
1995function boolean(value) {
1996 return value === true || value === false;
1997}
1998exports.boolean = boolean;
1999function string(value) {
2000 return typeof value === 'string' || value instanceof String;
2001}
2002exports.string = string;
2003function number(value) {
2004 return typeof value === 'number' || value instanceof Number;
2005}
2006exports.number = number;
2007function error(value) {
2008 return value instanceof Error;
2009}
2010exports.error = error;
2011function func(value) {
2012 return typeof value === 'function';
2013}
2014exports.func = func;
2015function array(value) {
2016 return Array.isArray(value);
2017}
2018exports.array = array;
2019function stringArray(value) {
2020 return array(value) && value.every(elem => string(elem));
2021}
2022exports.stringArray = stringArray;
2023
2024
2025/***/ }),
2026/* 8 */
2027/***/ (function(module, exports, __webpack_require__) {
2028
2029"use strict";
2030/* --------------------------------------------------------------------------------------------
2031 * Copyright (c) Microsoft Corporation. All rights reserved.
2032 * Licensed under the MIT License. See License.txt in the project root for license information.
2033 * ------------------------------------------------------------------------------------------ */
2034
2035Object.defineProperty(exports, "__esModule", { value: true });
2036const is = __webpack_require__(7);
2037/**
2038 * Predefined error codes.
2039 */
2040var ErrorCodes;
2041(function (ErrorCodes) {
2042 // Defined by JSON RPC
2043 ErrorCodes.ParseError = -32700;
2044 ErrorCodes.InvalidRequest = -32600;
2045 ErrorCodes.MethodNotFound = -32601;
2046 ErrorCodes.InvalidParams = -32602;
2047 ErrorCodes.InternalError = -32603;
2048 ErrorCodes.serverErrorStart = -32099;
2049 ErrorCodes.serverErrorEnd = -32000;
2050 ErrorCodes.ServerNotInitialized = -32002;
2051 ErrorCodes.UnknownErrorCode = -32001;
2052 // Defined by the protocol.
2053 ErrorCodes.RequestCancelled = -32800;
2054 // Defined by VSCode library.
2055 ErrorCodes.MessageWriteError = 1;
2056 ErrorCodes.MessageReadError = 2;
2057})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
2058/**
2059 * An error object return in a response in case a request
2060 * has failed.
2061 */
2062class ResponseError extends Error {
2063 constructor(code, message, data) {
2064 super(message);
2065 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
2066 this.data = data;
2067 Object.setPrototypeOf(this, ResponseError.prototype);
2068 }
2069 toJson() {
2070 return {
2071 code: this.code,
2072 message: this.message,
2073 data: this.data,
2074 };
2075 }
2076}
2077exports.ResponseError = ResponseError;
2078/**
2079 * An abstract implementation of a MessageType.
2080 */
2081class AbstractMessageType {
2082 constructor(_method, _numberOfParams) {
2083 this._method = _method;
2084 this._numberOfParams = _numberOfParams;
2085 }
2086 get method() {
2087 return this._method;
2088 }
2089 get numberOfParams() {
2090 return this._numberOfParams;
2091 }
2092}
2093exports.AbstractMessageType = AbstractMessageType;
2094/**
2095 * Classes to type request response pairs
2096 */
2097class RequestType0 extends AbstractMessageType {
2098 constructor(method) {
2099 super(method, 0);
2100 this._ = undefined;
2101 }
2102}
2103exports.RequestType0 = RequestType0;
2104class RequestType extends AbstractMessageType {
2105 constructor(method) {
2106 super(method, 1);
2107 this._ = undefined;
2108 }
2109}
2110exports.RequestType = RequestType;
2111class RequestType1 extends AbstractMessageType {
2112 constructor(method) {
2113 super(method, 1);
2114 this._ = undefined;
2115 }
2116}
2117exports.RequestType1 = RequestType1;
2118class RequestType2 extends AbstractMessageType {
2119 constructor(method) {
2120 super(method, 2);
2121 this._ = undefined;
2122 }
2123}
2124exports.RequestType2 = RequestType2;
2125class RequestType3 extends AbstractMessageType {
2126 constructor(method) {
2127 super(method, 3);
2128 this._ = undefined;
2129 }
2130}
2131exports.RequestType3 = RequestType3;
2132class RequestType4 extends AbstractMessageType {
2133 constructor(method) {
2134 super(method, 4);
2135 this._ = undefined;
2136 }
2137}
2138exports.RequestType4 = RequestType4;
2139class RequestType5 extends AbstractMessageType {
2140 constructor(method) {
2141 super(method, 5);
2142 this._ = undefined;
2143 }
2144}
2145exports.RequestType5 = RequestType5;
2146class RequestType6 extends AbstractMessageType {
2147 constructor(method) {
2148 super(method, 6);
2149 this._ = undefined;
2150 }
2151}
2152exports.RequestType6 = RequestType6;
2153class RequestType7 extends AbstractMessageType {
2154 constructor(method) {
2155 super(method, 7);
2156 this._ = undefined;
2157 }
2158}
2159exports.RequestType7 = RequestType7;
2160class RequestType8 extends AbstractMessageType {
2161 constructor(method) {
2162 super(method, 8);
2163 this._ = undefined;
2164 }
2165}
2166exports.RequestType8 = RequestType8;
2167class RequestType9 extends AbstractMessageType {
2168 constructor(method) {
2169 super(method, 9);
2170 this._ = undefined;
2171 }
2172}
2173exports.RequestType9 = RequestType9;
2174class NotificationType extends AbstractMessageType {
2175 constructor(method) {
2176 super(method, 1);
2177 this._ = undefined;
2178 }
2179}
2180exports.NotificationType = NotificationType;
2181class NotificationType0 extends AbstractMessageType {
2182 constructor(method) {
2183 super(method, 0);
2184 this._ = undefined;
2185 }
2186}
2187exports.NotificationType0 = NotificationType0;
2188class NotificationType1 extends AbstractMessageType {
2189 constructor(method) {
2190 super(method, 1);
2191 this._ = undefined;
2192 }
2193}
2194exports.NotificationType1 = NotificationType1;
2195class NotificationType2 extends AbstractMessageType {
2196 constructor(method) {
2197 super(method, 2);
2198 this._ = undefined;
2199 }
2200}
2201exports.NotificationType2 = NotificationType2;
2202class NotificationType3 extends AbstractMessageType {
2203 constructor(method) {
2204 super(method, 3);
2205 this._ = undefined;
2206 }
2207}
2208exports.NotificationType3 = NotificationType3;
2209class NotificationType4 extends AbstractMessageType {
2210 constructor(method) {
2211 super(method, 4);
2212 this._ = undefined;
2213 }
2214}
2215exports.NotificationType4 = NotificationType4;
2216class NotificationType5 extends AbstractMessageType {
2217 constructor(method) {
2218 super(method, 5);
2219 this._ = undefined;
2220 }
2221}
2222exports.NotificationType5 = NotificationType5;
2223class NotificationType6 extends AbstractMessageType {
2224 constructor(method) {
2225 super(method, 6);
2226 this._ = undefined;
2227 }
2228}
2229exports.NotificationType6 = NotificationType6;
2230class NotificationType7 extends AbstractMessageType {
2231 constructor(method) {
2232 super(method, 7);
2233 this._ = undefined;
2234 }
2235}
2236exports.NotificationType7 = NotificationType7;
2237class NotificationType8 extends AbstractMessageType {
2238 constructor(method) {
2239 super(method, 8);
2240 this._ = undefined;
2241 }
2242}
2243exports.NotificationType8 = NotificationType8;
2244class NotificationType9 extends AbstractMessageType {
2245 constructor(method) {
2246 super(method, 9);
2247 this._ = undefined;
2248 }
2249}
2250exports.NotificationType9 = NotificationType9;
2251/**
2252 * Tests if the given message is a request message
2253 */
2254function isRequestMessage(message) {
2255 let candidate = message;
2256 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
2257}
2258exports.isRequestMessage = isRequestMessage;
2259/**
2260 * Tests if the given message is a notification message
2261 */
2262function isNotificationMessage(message) {
2263 let candidate = message;
2264 return candidate && is.string(candidate.method) && message.id === void 0;
2265}
2266exports.isNotificationMessage = isNotificationMessage;
2267/**
2268 * Tests if the given message is a response message
2269 */
2270function isResponseMessage(message) {
2271 let candidate = message;
2272 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
2273}
2274exports.isResponseMessage = isResponseMessage;
2275
2276
2277/***/ }),
2278/* 9 */
2279/***/ (function(module, exports, __webpack_require__) {
2280
2281"use strict";
2282/* --------------------------------------------------------------------------------------------
2283 * Copyright (c) Microsoft Corporation. All rights reserved.
2284 * Licensed under the MIT License. See License.txt in the project root for license information.
2285 * ------------------------------------------------------------------------------------------ */
2286
2287Object.defineProperty(exports, "__esModule", { value: true });
2288const events_1 = __webpack_require__(10);
2289const Is = __webpack_require__(7);
2290let DefaultSize = 8192;
2291let CR = Buffer.from('\r', 'ascii')[0];
2292let LF = Buffer.from('\n', 'ascii')[0];
2293let CRLF = '\r\n';
2294class MessageBuffer {
2295 constructor(encoding = 'utf8') {
2296 this.encoding = encoding;
2297 this.index = 0;
2298 this.buffer = Buffer.allocUnsafe(DefaultSize);
2299 }
2300 append(chunk) {
2301 var toAppend = chunk;
2302 if (typeof (chunk) === 'string') {
2303 var str = chunk;
2304 var bufferLen = Buffer.byteLength(str, this.encoding);
2305 toAppend = Buffer.allocUnsafe(bufferLen);
2306 toAppend.write(str, 0, bufferLen, this.encoding);
2307 }
2308 if (this.buffer.length - this.index >= toAppend.length) {
2309 toAppend.copy(this.buffer, this.index, 0, toAppend.length);
2310 }
2311 else {
2312 var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
2313 if (this.index === 0) {
2314 this.buffer = Buffer.allocUnsafe(newSize);
2315 toAppend.copy(this.buffer, 0, 0, toAppend.length);
2316 }
2317 else {
2318 this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
2319 }
2320 }
2321 this.index += toAppend.length;
2322 }
2323 tryReadHeaders() {
2324 let result = undefined;
2325 let current = 0;
2326 while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
2327 current++;
2328 }
2329 // No header / body separator found (e.g CRLFCRLF)
2330 if (current + 3 >= this.index) {
2331 return result;
2332 }
2333 result = Object.create(null);
2334 let headers = this.buffer.toString('ascii', 0, current).split(CRLF);
2335 headers.forEach((header) => {
2336 let index = header.indexOf(':');
2337 if (index === -1) {
2338 throw new Error('Message header must separate key and value using :');
2339 }
2340 let key = header.substr(0, index);
2341 let value = header.substr(index + 1).trim();
2342 result[key] = value;
2343 });
2344 let nextStart = current + 4;
2345 this.buffer = this.buffer.slice(nextStart);
2346 this.index = this.index - nextStart;
2347 return result;
2348 }
2349 tryReadContent(length) {
2350 if (this.index < length) {
2351 return null;
2352 }
2353 let result = this.buffer.toString(this.encoding, 0, length);
2354 let nextStart = length;
2355 this.buffer.copy(this.buffer, 0, nextStart);
2356 this.index = this.index - nextStart;
2357 return result;
2358 }
2359 get numberOfBytes() {
2360 return this.index;
2361 }
2362}
2363var MessageReader;
2364(function (MessageReader) {
2365 function is(value) {
2366 let candidate = value;
2367 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
2368 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
2369 }
2370 MessageReader.is = is;
2371})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
2372class AbstractMessageReader {
2373 constructor() {
2374 this.errorEmitter = new events_1.Emitter();
2375 this.closeEmitter = new events_1.Emitter();
2376 this.partialMessageEmitter = new events_1.Emitter();
2377 }
2378 dispose() {
2379 this.errorEmitter.dispose();
2380 this.closeEmitter.dispose();
2381 }
2382 get onError() {
2383 return this.errorEmitter.event;
2384 }
2385 fireError(error) {
2386 this.errorEmitter.fire(this.asError(error));
2387 }
2388 get onClose() {
2389 return this.closeEmitter.event;
2390 }
2391 fireClose() {
2392 this.closeEmitter.fire(undefined);
2393 }
2394 get onPartialMessage() {
2395 return this.partialMessageEmitter.event;
2396 }
2397 firePartialMessage(info) {
2398 this.partialMessageEmitter.fire(info);
2399 }
2400 asError(error) {
2401 if (error instanceof Error) {
2402 return error;
2403 }
2404 else {
2405 return new Error(`Reader recevied error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2406 }
2407 }
2408}
2409exports.AbstractMessageReader = AbstractMessageReader;
2410class StreamMessageReader extends AbstractMessageReader {
2411 constructor(readable, encoding = 'utf8') {
2412 super();
2413 this.readable = readable;
2414 this.buffer = new MessageBuffer(encoding);
2415 this._partialMessageTimeout = 10000;
2416 }
2417 set partialMessageTimeout(timeout) {
2418 this._partialMessageTimeout = timeout;
2419 }
2420 get partialMessageTimeout() {
2421 return this._partialMessageTimeout;
2422 }
2423 listen(callback) {
2424 this.nextMessageLength = -1;
2425 this.messageToken = 0;
2426 this.partialMessageTimer = undefined;
2427 this.callback = callback;
2428 this.readable.on('data', (data) => {
2429 this.onData(data);
2430 });
2431 this.readable.on('error', (error) => this.fireError(error));
2432 this.readable.on('close', () => this.fireClose());
2433 }
2434 onData(data) {
2435 this.buffer.append(data);
2436 while (true) {
2437 if (this.nextMessageLength === -1) {
2438 let headers = this.buffer.tryReadHeaders();
2439 if (!headers) {
2440 return;
2441 }
2442 let contentLength = headers['Content-Length'];
2443 if (!contentLength) {
2444 throw new Error('Header must provide a Content-Length property.');
2445 }
2446 let length = parseInt(contentLength);
2447 if (isNaN(length)) {
2448 throw new Error('Content-Length value must be a number.');
2449 }
2450 this.nextMessageLength = length;
2451 // Take the encoding form the header. For compatibility
2452 // treat both utf-8 and utf8 as node utf8
2453 }
2454 var msg = this.buffer.tryReadContent(this.nextMessageLength);
2455 if (msg === null) {
2456 /** We haven't recevied the full message yet. */
2457 this.setPartialMessageTimer();
2458 return;
2459 }
2460 this.clearPartialMessageTimer();
2461 this.nextMessageLength = -1;
2462 this.messageToken++;
2463 var json = JSON.parse(msg);
2464 this.callback(json);
2465 }
2466 }
2467 clearPartialMessageTimer() {
2468 if (this.partialMessageTimer) {
2469 clearTimeout(this.partialMessageTimer);
2470 this.partialMessageTimer = undefined;
2471 }
2472 }
2473 setPartialMessageTimer() {
2474 this.clearPartialMessageTimer();
2475 if (this._partialMessageTimeout <= 0) {
2476 return;
2477 }
2478 this.partialMessageTimer = setTimeout((token, timeout) => {
2479 this.partialMessageTimer = undefined;
2480 if (token === this.messageToken) {
2481 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
2482 this.setPartialMessageTimer();
2483 }
2484 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
2485 }
2486}
2487exports.StreamMessageReader = StreamMessageReader;
2488class IPCMessageReader extends AbstractMessageReader {
2489 constructor(process) {
2490 super();
2491 this.process = process;
2492 let eventEmitter = this.process;
2493 eventEmitter.on('error', (error) => this.fireError(error));
2494 eventEmitter.on('close', () => this.fireClose());
2495 }
2496 listen(callback) {
2497 this.process.on('message', callback);
2498 }
2499}
2500exports.IPCMessageReader = IPCMessageReader;
2501class SocketMessageReader extends StreamMessageReader {
2502 constructor(socket, encoding = 'utf-8') {
2503 super(socket, encoding);
2504 }
2505}
2506exports.SocketMessageReader = SocketMessageReader;
2507
2508
2509/***/ }),
2510/* 10 */
2511/***/ (function(module, exports, __webpack_require__) {
2512
2513"use strict";
2514/* --------------------------------------------------------------------------------------------
2515 * Copyright (c) Microsoft Corporation. All rights reserved.
2516 * Licensed under the MIT License. See License.txt in the project root for license information.
2517 * ------------------------------------------------------------------------------------------ */
2518
2519Object.defineProperty(exports, "__esModule", { value: true });
2520var Disposable;
2521(function (Disposable) {
2522 function create(func) {
2523 return {
2524 dispose: func
2525 };
2526 }
2527 Disposable.create = create;
2528})(Disposable = exports.Disposable || (exports.Disposable = {}));
2529var Event;
2530(function (Event) {
2531 const _disposable = { dispose() { } };
2532 Event.None = function () { return _disposable; };
2533})(Event = exports.Event || (exports.Event = {}));
2534class CallbackList {
2535 add(callback, context = null, bucket) {
2536 if (!this._callbacks) {
2537 this._callbacks = [];
2538 this._contexts = [];
2539 }
2540 this._callbacks.push(callback);
2541 this._contexts.push(context);
2542 if (Array.isArray(bucket)) {
2543 bucket.push({ dispose: () => this.remove(callback, context) });
2544 }
2545 }
2546 remove(callback, context = null) {
2547 if (!this._callbacks) {
2548 return;
2549 }
2550 var foundCallbackWithDifferentContext = false;
2551 for (var i = 0, len = this._callbacks.length; i < len; i++) {
2552 if (this._callbacks[i] === callback) {
2553 if (this._contexts[i] === context) {
2554 // callback & context match => remove it
2555 this._callbacks.splice(i, 1);
2556 this._contexts.splice(i, 1);
2557 return;
2558 }
2559 else {
2560 foundCallbackWithDifferentContext = true;
2561 }
2562 }
2563 }
2564 if (foundCallbackWithDifferentContext) {
2565 throw new Error('When adding a listener with a context, you should remove it with the same context');
2566 }
2567 }
2568 invoke(...args) {
2569 if (!this._callbacks) {
2570 return [];
2571 }
2572 var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
2573 for (var i = 0, len = callbacks.length; i < len; i++) {
2574 try {
2575 ret.push(callbacks[i].apply(contexts[i], args));
2576 }
2577 catch (e) {
2578 console.error(e);
2579 }
2580 }
2581 return ret;
2582 }
2583 isEmpty() {
2584 return !this._callbacks || this._callbacks.length === 0;
2585 }
2586 dispose() {
2587 this._callbacks = undefined;
2588 this._contexts = undefined;
2589 }
2590}
2591class Emitter {
2592 constructor(_options) {
2593 this._options = _options;
2594 }
2595 /**
2596 * For the public to allow to subscribe
2597 * to events from this Emitter
2598 */
2599 get event() {
2600 if (!this._event) {
2601 this._event = (listener, thisArgs, disposables) => {
2602 if (!this._callbacks) {
2603 this._callbacks = new CallbackList();
2604 }
2605 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
2606 this._options.onFirstListenerAdd(this);
2607 }
2608 this._callbacks.add(listener, thisArgs);
2609 let result;
2610 result = {
2611 dispose: () => {
2612 this._callbacks.remove(listener, thisArgs);
2613 result.dispose = Emitter._noop;
2614 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
2615 this._options.onLastListenerRemove(this);
2616 }
2617 }
2618 };
2619 if (Array.isArray(disposables)) {
2620 disposables.push(result);
2621 }
2622 return result;
2623 };
2624 }
2625 return this._event;
2626 }
2627 /**
2628 * To be kept private to fire an event to
2629 * subscribers
2630 */
2631 fire(event) {
2632 if (this._callbacks) {
2633 this._callbacks.invoke.call(this._callbacks, event);
2634 }
2635 }
2636 dispose() {
2637 if (this._callbacks) {
2638 this._callbacks.dispose();
2639 this._callbacks = undefined;
2640 }
2641 }
2642}
2643Emitter._noop = function () { };
2644exports.Emitter = Emitter;
2645
2646
2647/***/ }),
2648/* 11 */
2649/***/ (function(module, exports, __webpack_require__) {
2650
2651"use strict";
2652/* --------------------------------------------------------------------------------------------
2653 * Copyright (c) Microsoft Corporation. All rights reserved.
2654 * Licensed under the MIT License. See License.txt in the project root for license information.
2655 * ------------------------------------------------------------------------------------------ */
2656
2657Object.defineProperty(exports, "__esModule", { value: true });
2658const events_1 = __webpack_require__(10);
2659const Is = __webpack_require__(7);
2660let ContentLength = 'Content-Length: ';
2661let CRLF = '\r\n';
2662var MessageWriter;
2663(function (MessageWriter) {
2664 function is(value) {
2665 let candidate = value;
2666 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
2667 Is.func(candidate.onError) && Is.func(candidate.write);
2668 }
2669 MessageWriter.is = is;
2670})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
2671class AbstractMessageWriter {
2672 constructor() {
2673 this.errorEmitter = new events_1.Emitter();
2674 this.closeEmitter = new events_1.Emitter();
2675 }
2676 dispose() {
2677 this.errorEmitter.dispose();
2678 this.closeEmitter.dispose();
2679 }
2680 get onError() {
2681 return this.errorEmitter.event;
2682 }
2683 fireError(error, message, count) {
2684 this.errorEmitter.fire([this.asError(error), message, count]);
2685 }
2686 get onClose() {
2687 return this.closeEmitter.event;
2688 }
2689 fireClose() {
2690 this.closeEmitter.fire(undefined);
2691 }
2692 asError(error) {
2693 if (error instanceof Error) {
2694 return error;
2695 }
2696 else {
2697 return new Error(`Writer recevied error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2698 }
2699 }
2700}
2701exports.AbstractMessageWriter = AbstractMessageWriter;
2702class StreamMessageWriter extends AbstractMessageWriter {
2703 constructor(writable, encoding = 'utf8') {
2704 super();
2705 this.writable = writable;
2706 this.encoding = encoding;
2707 this.errorCount = 0;
2708 this.writable.on('error', (error) => this.fireError(error));
2709 this.writable.on('close', () => this.fireClose());
2710 }
2711 write(msg) {
2712 let json = JSON.stringify(msg);
2713 let contentLength = Buffer.byteLength(json, this.encoding);
2714 let headers = [
2715 ContentLength, contentLength.toString(), CRLF,
2716 CRLF
2717 ];
2718 try {
2719 // Header must be written in ASCII encoding
2720 this.writable.write(headers.join(''), 'ascii');
2721 // Now write the content. This can be written in any encoding
2722 this.writable.write(json, this.encoding);
2723 this.errorCount = 0;
2724 }
2725 catch (error) {
2726 this.errorCount++;
2727 this.fireError(error, msg, this.errorCount);
2728 }
2729 }
2730}
2731exports.StreamMessageWriter = StreamMessageWriter;
2732class IPCMessageWriter extends AbstractMessageWriter {
2733 constructor(process) {
2734 super();
2735 this.process = process;
2736 this.errorCount = 0;
2737 this.queue = [];
2738 this.sending = false;
2739 let eventEmitter = this.process;
2740 eventEmitter.on('error', (error) => this.fireError(error));
2741 eventEmitter.on('close', () => this.fireClose);
2742 }
2743 write(msg) {
2744 if (!this.sending && this.queue.length === 0) {
2745 // See https://github.com/nodejs/node/issues/7657
2746 this.doWriteMessage(msg);
2747 }
2748 else {
2749 this.queue.push(msg);
2750 }
2751 }
2752 doWriteMessage(msg) {
2753 try {
2754 if (this.process.send) {
2755 this.sending = true;
2756 this.process.send(msg, undefined, undefined, (error) => {
2757 this.sending = false;
2758 if (error) {
2759 this.errorCount++;
2760 this.fireError(error, msg, this.errorCount);
2761 }
2762 else {
2763 this.errorCount = 0;
2764 }
2765 if (this.queue.length > 0) {
2766 this.doWriteMessage(this.queue.shift());
2767 }
2768 });
2769 }
2770 }
2771 catch (error) {
2772 this.errorCount++;
2773 this.fireError(error, msg, this.errorCount);
2774 }
2775 }
2776}
2777exports.IPCMessageWriter = IPCMessageWriter;
2778class SocketMessageWriter extends AbstractMessageWriter {
2779 constructor(socket, encoding = 'utf8') {
2780 super();
2781 this.socket = socket;
2782 this.queue = [];
2783 this.sending = false;
2784 this.encoding = encoding;
2785 this.errorCount = 0;
2786 this.socket.on('error', (error) => this.fireError(error));
2787 this.socket.on('close', () => this.fireClose());
2788 }
2789 write(msg) {
2790 if (!this.sending && this.queue.length === 0) {
2791 // See https://github.com/nodejs/node/issues/7657
2792 this.doWriteMessage(msg);
2793 }
2794 else {
2795 this.queue.push(msg);
2796 }
2797 }
2798 doWriteMessage(msg) {
2799 let json = JSON.stringify(msg);
2800 let contentLength = Buffer.byteLength(json, this.encoding);
2801 let headers = [
2802 ContentLength, contentLength.toString(), CRLF,
2803 CRLF
2804 ];
2805 try {
2806 // Header must be written in ASCII encoding
2807 this.sending = true;
2808 this.socket.write(headers.join(''), 'ascii', (error) => {
2809 if (error) {
2810 this.handleError(error, msg);
2811 }
2812 try {
2813 // Now write the content. This can be written in any encoding
2814 this.socket.write(json, this.encoding, (error) => {
2815 this.sending = false;
2816 if (error) {
2817 this.handleError(error, msg);
2818 }
2819 else {
2820 this.errorCount = 0;
2821 }
2822 if (this.queue.length > 0) {
2823 this.doWriteMessage(this.queue.shift());
2824 }
2825 });
2826 }
2827 catch (error) {
2828 this.handleError(error, msg);
2829 }
2830 });
2831 }
2832 catch (error) {
2833 this.handleError(error, msg);
2834 }
2835 }
2836 handleError(error, msg) {
2837 this.errorCount++;
2838 this.fireError(error, msg, this.errorCount);
2839 }
2840}
2841exports.SocketMessageWriter = SocketMessageWriter;
2842
2843
2844/***/ }),
2845/* 12 */
2846/***/ (function(module, exports, __webpack_require__) {
2847
2848"use strict";
2849/*---------------------------------------------------------------------------------------------
2850 * Copyright (c) Microsoft Corporation. All rights reserved.
2851 * Licensed under the MIT License. See License.txt in the project root for license information.
2852 *--------------------------------------------------------------------------------------------*/
2853
2854Object.defineProperty(exports, "__esModule", { value: true });
2855const events_1 = __webpack_require__(10);
2856const Is = __webpack_require__(7);
2857var CancellationToken;
2858(function (CancellationToken) {
2859 CancellationToken.None = Object.freeze({
2860 isCancellationRequested: false,
2861 onCancellationRequested: events_1.Event.None
2862 });
2863 CancellationToken.Cancelled = Object.freeze({
2864 isCancellationRequested: true,
2865 onCancellationRequested: events_1.Event.None
2866 });
2867 function is(value) {
2868 let candidate = value;
2869 return candidate && (candidate === CancellationToken.None
2870 || candidate === CancellationToken.Cancelled
2871 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
2872 }
2873 CancellationToken.is = is;
2874})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
2875const shortcutEvent = Object.freeze(function (callback, context) {
2876 let handle = setTimeout(callback.bind(context), 0);
2877 return { dispose() { clearTimeout(handle); } };
2878});
2879class MutableToken {
2880 constructor() {
2881 this._isCancelled = false;
2882 }
2883 cancel() {
2884 if (!this._isCancelled) {
2885 this._isCancelled = true;
2886 if (this._emitter) {
2887 this._emitter.fire(undefined);
2888 this._emitter = undefined;
2889 }
2890 }
2891 }
2892 get isCancellationRequested() {
2893 return this._isCancelled;
2894 }
2895 get onCancellationRequested() {
2896 if (this._isCancelled) {
2897 return shortcutEvent;
2898 }
2899 if (!this._emitter) {
2900 this._emitter = new events_1.Emitter();
2901 }
2902 return this._emitter.event;
2903 }
2904}
2905class CancellationTokenSource {
2906 get token() {
2907 if (!this._token) {
2908 // be lazy and create the token only when
2909 // actually needed
2910 this._token = new MutableToken();
2911 }
2912 return this._token;
2913 }
2914 cancel() {
2915 if (!this._token) {
2916 // save an object by returning the default
2917 // cancelled token when cancellation happens
2918 // before someone asks for the token
2919 this._token = CancellationToken.Cancelled;
2920 }
2921 else {
2922 this._token.cancel();
2923 }
2924 }
2925 dispose() {
2926 this.cancel();
2927 }
2928}
2929exports.CancellationTokenSource = CancellationTokenSource;
2930
2931
2932/***/ }),
2933/* 13 */
2934/***/ (function(module, exports, __webpack_require__) {
2935
2936"use strict";
2937
2938/*---------------------------------------------------------------------------------------------
2939 * Copyright (c) Microsoft Corporation. All rights reserved.
2940 * Licensed under the MIT License. See License.txt in the project root for license information.
2941 *--------------------------------------------------------------------------------------------*/
2942Object.defineProperty(exports, "__esModule", { value: true });
2943var Touch;
2944(function (Touch) {
2945 Touch.None = 0;
2946 Touch.First = 1;
2947 Touch.Last = 2;
2948})(Touch = exports.Touch || (exports.Touch = {}));
2949class LinkedMap {
2950 constructor() {
2951 this._map = new Map();
2952 this._head = undefined;
2953 this._tail = undefined;
2954 this._size = 0;
2955 }
2956 clear() {
2957 this._map.clear();
2958 this._head = undefined;
2959 this._tail = undefined;
2960 this._size = 0;
2961 }
2962 isEmpty() {
2963 return !this._head && !this._tail;
2964 }
2965 get size() {
2966 return this._size;
2967 }
2968 has(key) {
2969 return this._map.has(key);
2970 }
2971 get(key) {
2972 const item = this._map.get(key);
2973 if (!item) {
2974 return undefined;
2975 }
2976 return item.value;
2977 }
2978 set(key, value, touch = Touch.None) {
2979 let item = this._map.get(key);
2980 if (item) {
2981 item.value = value;
2982 if (touch !== Touch.None) {
2983 this.touch(item, touch);
2984 }
2985 }
2986 else {
2987 item = { key, value, next: undefined, previous: undefined };
2988 switch (touch) {
2989 case Touch.None:
2990 this.addItemLast(item);
2991 break;
2992 case Touch.First:
2993 this.addItemFirst(item);
2994 break;
2995 case Touch.Last:
2996 this.addItemLast(item);
2997 break;
2998 default:
2999 this.addItemLast(item);
3000 break;
3001 }
3002 this._map.set(key, item);
3003 this._size++;
3004 }
3005 }
3006 delete(key) {
3007 const item = this._map.get(key);
3008 if (!item) {
3009 return false;
3010 }
3011 this._map.delete(key);
3012 this.removeItem(item);
3013 this._size--;
3014 return true;
3015 }
3016 shift() {
3017 if (!this._head && !this._tail) {
3018 return undefined;
3019 }
3020 if (!this._head || !this._tail) {
3021 throw new Error('Invalid list');
3022 }
3023 const item = this._head;
3024 this._map.delete(item.key);
3025 this.removeItem(item);
3026 this._size--;
3027 return item.value;
3028 }
3029 forEach(callbackfn, thisArg) {
3030 let current = this._head;
3031 while (current) {
3032 if (thisArg) {
3033 callbackfn.bind(thisArg)(current.value, current.key, this);
3034 }
3035 else {
3036 callbackfn(current.value, current.key, this);
3037 }
3038 current = current.next;
3039 }
3040 }
3041 forEachReverse(callbackfn, thisArg) {
3042 let current = this._tail;
3043 while (current) {
3044 if (thisArg) {
3045 callbackfn.bind(thisArg)(current.value, current.key, this);
3046 }
3047 else {
3048 callbackfn(current.value, current.key, this);
3049 }
3050 current = current.previous;
3051 }
3052 }
3053 values() {
3054 let result = [];
3055 let current = this._head;
3056 while (current) {
3057 result.push(current.value);
3058 current = current.next;
3059 }
3060 return result;
3061 }
3062 keys() {
3063 let result = [];
3064 let current = this._head;
3065 while (current) {
3066 result.push(current.key);
3067 current = current.next;
3068 }
3069 return result;
3070 }
3071 /* JSON RPC run on es5 which has no Symbol.iterator
3072 public keys(): IterableIterator<K> {
3073 let current = this._head;
3074 let iterator: IterableIterator<K> = {
3075 [Symbol.iterator]() {
3076 return iterator;
3077 },
3078 next():IteratorResult<K> {
3079 if (current) {
3080 let result = { value: current.key, done: false };
3081 current = current.next;
3082 return result;
3083 } else {
3084 return { value: undefined, done: true };
3085 }
3086 }
3087 };
3088 return iterator;
3089 }
3090
3091 public values(): IterableIterator<V> {
3092 let current = this._head;
3093 let iterator: IterableIterator<V> = {
3094 [Symbol.iterator]() {
3095 return iterator;
3096 },
3097 next():IteratorResult<V> {
3098 if (current) {
3099 let result = { value: current.value, done: false };
3100 current = current.next;
3101 return result;
3102 } else {
3103 return { value: undefined, done: true };
3104 }
3105 }
3106 };
3107 return iterator;
3108 }
3109 */
3110 addItemFirst(item) {
3111 // First time Insert
3112 if (!this._head && !this._tail) {
3113 this._tail = item;
3114 }
3115 else if (!this._head) {
3116 throw new Error('Invalid list');
3117 }
3118 else {
3119 item.next = this._head;
3120 this._head.previous = item;
3121 }
3122 this._head = item;
3123 }
3124 addItemLast(item) {
3125 // First time Insert
3126 if (!this._head && !this._tail) {
3127 this._head = item;
3128 }
3129 else if (!this._tail) {
3130 throw new Error('Invalid list');
3131 }
3132 else {
3133 item.previous = this._tail;
3134 this._tail.next = item;
3135 }
3136 this._tail = item;
3137 }
3138 removeItem(item) {
3139 if (item === this._head && item === this._tail) {
3140 this._head = undefined;
3141 this._tail = undefined;
3142 }
3143 else if (item === this._head) {
3144 this._head = item.next;
3145 }
3146 else if (item === this._tail) {
3147 this._tail = item.previous;
3148 }
3149 else {
3150 const next = item.next;
3151 const previous = item.previous;
3152 if (!next || !previous) {
3153 throw new Error('Invalid list');
3154 }
3155 next.previous = previous;
3156 previous.next = next;
3157 }
3158 }
3159 touch(item, touch) {
3160 if (!this._head || !this._tail) {
3161 throw new Error('Invalid list');
3162 }
3163 if ((touch !== Touch.First && touch !== Touch.Last)) {
3164 return;
3165 }
3166 if (touch === Touch.First) {
3167 if (item === this._head) {
3168 return;
3169 }
3170 const next = item.next;
3171 const previous = item.previous;
3172 // Unlink the item
3173 if (item === this._tail) {
3174 // previous must be defined since item was not head but is tail
3175 // So there are more than on item in the map
3176 previous.next = undefined;
3177 this._tail = previous;
3178 }
3179 else {
3180 // Both next and previous are not undefined since item was neither head nor tail.
3181 next.previous = previous;
3182 previous.next = next;
3183 }
3184 // Insert the node at head
3185 item.previous = undefined;
3186 item.next = this._head;
3187 this._head.previous = item;
3188 this._head = item;
3189 }
3190 else if (touch === Touch.Last) {
3191 if (item === this._tail) {
3192 return;
3193 }
3194 const next = item.next;
3195 const previous = item.previous;
3196 // Unlink the item.
3197 if (item === this._head) {
3198 // next must be defined since item was not tail but is head
3199 // So there are more than on item in the map
3200 next.previous = undefined;
3201 this._head = next;
3202 }
3203 else {
3204 // Both next and previous are not undefined since item was neither head nor tail.
3205 next.previous = previous;
3206 previous.next = next;
3207 }
3208 item.next = undefined;
3209 item.previous = this._tail;
3210 this._tail.next = item;
3211 this._tail = item;
3212 }
3213 }
3214}
3215exports.LinkedMap = LinkedMap;
3216
3217
3218/***/ }),
3219/* 14 */
3220/***/ (function(module, exports, __webpack_require__) {
3221
3222"use strict";
3223/* --------------------------------------------------------------------------------------------
3224 * Copyright (c) Microsoft Corporation. All rights reserved.
3225 * Licensed under the MIT License. See License.txt in the project root for license information.
3226 * ------------------------------------------------------------------------------------------ */
3227
3228Object.defineProperty(exports, "__esModule", { value: true });
3229const path_1 = __webpack_require__(15);
3230const os_1 = __webpack_require__(16);
3231const crypto_1 = __webpack_require__(17);
3232const net_1 = __webpack_require__(18);
3233const messageReader_1 = __webpack_require__(9);
3234const messageWriter_1 = __webpack_require__(11);
3235function generateRandomPipeName() {
3236 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
3237 if (process.platform === 'win32') {
3238 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
3239 }
3240 else {
3241 // Mac/Unix: use socket file
3242 return path_1.join(os_1.tmpdir(), `vscode-${randomSuffix}.sock`);
3243 }
3244}
3245exports.generateRandomPipeName = generateRandomPipeName;
3246function createClientPipeTransport(pipeName, encoding = 'utf-8') {
3247 let connectResolve;
3248 let connected = new Promise((resolve, _reject) => {
3249 connectResolve = resolve;
3250 });
3251 return new Promise((resolve, reject) => {
3252 let server = net_1.createServer((socket) => {
3253 server.close();
3254 connectResolve([
3255 new messageReader_1.SocketMessageReader(socket, encoding),
3256 new messageWriter_1.SocketMessageWriter(socket, encoding)
3257 ]);
3258 });
3259 server.on('error', reject);
3260 server.listen(pipeName, () => {
3261 server.removeListener('error', reject);
3262 resolve({
3263 onConnected: () => { return connected; }
3264 });
3265 });
3266 });
3267}
3268exports.createClientPipeTransport = createClientPipeTransport;
3269function createServerPipeTransport(pipeName, encoding = 'utf-8') {
3270 const socket = net_1.createConnection(pipeName);
3271 return [
3272 new messageReader_1.SocketMessageReader(socket, encoding),
3273 new messageWriter_1.SocketMessageWriter(socket, encoding)
3274 ];
3275}
3276exports.createServerPipeTransport = createServerPipeTransport;
3277
3278
3279/***/ }),
3280/* 15 */
3281/***/ (function(module, exports) {
3282
3283module.exports = require("path");
3284
3285/***/ }),
3286/* 16 */
3287/***/ (function(module, exports) {
3288
3289module.exports = require("os");
3290
3291/***/ }),
3292/* 17 */
3293/***/ (function(module, exports) {
3294
3295module.exports = require("crypto");
3296
3297/***/ }),
3298/* 18 */
3299/***/ (function(module, exports) {
3300
3301module.exports = require("net");
3302
3303/***/ }),
3304/* 19 */
3305/***/ (function(module, exports, __webpack_require__) {
3306
3307"use strict";
3308/* --------------------------------------------------------------------------------------------
3309 * Copyright (c) Microsoft Corporation. All rights reserved.
3310 * Licensed under the MIT License. See License.txt in the project root for license information.
3311 * ------------------------------------------------------------------------------------------ */
3312
3313Object.defineProperty(exports, "__esModule", { value: true });
3314const net_1 = __webpack_require__(18);
3315const messageReader_1 = __webpack_require__(9);
3316const messageWriter_1 = __webpack_require__(11);
3317function createClientSocketTransport(port, encoding = 'utf-8') {
3318 let connectResolve;
3319 let connected = new Promise((resolve, _reject) => {
3320 connectResolve = resolve;
3321 });
3322 return new Promise((resolve, reject) => {
3323 let server = net_1.createServer((socket) => {
3324 server.close();
3325 connectResolve([
3326 new messageReader_1.SocketMessageReader(socket, encoding),
3327 new messageWriter_1.SocketMessageWriter(socket, encoding)
3328 ]);
3329 });
3330 server.on('error', reject);
3331 server.listen(port, '127.0.0.1', () => {
3332 server.removeListener('error', reject);
3333 resolve({
3334 onConnected: () => { return connected; }
3335 });
3336 });
3337 });
3338}
3339exports.createClientSocketTransport = createClientSocketTransport;
3340function createServerSocketTransport(port, encoding = 'utf-8') {
3341 const socket = net_1.createConnection(port, '127.0.0.1');
3342 return [
3343 new messageReader_1.SocketMessageReader(socket, encoding),
3344 new messageWriter_1.SocketMessageWriter(socket, encoding)
3345 ];
3346}
3347exports.createServerSocketTransport = createServerSocketTransport;
3348
3349
3350/***/ }),
3351/* 20 */
3352/***/ (function(module, __webpack_exports__, __webpack_require__) {
3353
3354"use strict";
3355__webpack_require__.r(__webpack_exports__);
3356/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
3357/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
3358/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
3359/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
3360/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
3361/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
3362/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
3363/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
3364/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
3365/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
3366/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
3367/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
3368/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
3369/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
3370/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
3371/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
3372/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
3373/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
3374/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
3375/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
3376/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
3377/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
3378/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
3379/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
3380/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
3381/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
3382/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
3383/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
3384/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
3385/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
3386/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
3387/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
3388/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
3389/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
3390/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
3391/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
3392/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
3393/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
3394/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
3395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
3396/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
3397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
3398/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
3399/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
3400/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
3401/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
3402/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentSaveReason", function() { return TextDocumentSaveReason; });
3403/* --------------------------------------------------------------------------------------------
3404 * Copyright (c) Microsoft Corporation. All rights reserved.
3405 * Licensed under the MIT License. See License.txt in the project root for license information.
3406 * ------------------------------------------------------------------------------------------ */
3407
3408/**
3409 * The Position namespace provides helper functions to work with
3410 * [Position](#Position) literals.
3411 */
3412var Position;
3413(function (Position) {
3414 /**
3415 * Creates a new Position literal from the given line and character.
3416 * @param line The position's line.
3417 * @param character The position's character.
3418 */
3419 function create(line, character) {
3420 return { line: line, character: character };
3421 }
3422 Position.create = create;
3423 /**
3424 * Checks whether the given liternal conforms to the [Position](#Position) interface.
3425 */
3426 function is(value) {
3427 var candidate = value;
3428 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
3429 }
3430 Position.is = is;
3431})(Position || (Position = {}));
3432/**
3433 * The Range namespace provides helper functions to work with
3434 * [Range](#Range) literals.
3435 */
3436var Range;
3437(function (Range) {
3438 function create(one, two, three, four) {
3439 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
3440 return { start: Position.create(one, two), end: Position.create(three, four) };
3441 }
3442 else if (Position.is(one) && Position.is(two)) {
3443 return { start: one, end: two };
3444 }
3445 else {
3446 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
3447 }
3448 }
3449 Range.create = create;
3450 /**
3451 * Checks whether the given literal conforms to the [Range](#Range) interface.
3452 */
3453 function is(value) {
3454 var candidate = value;
3455 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
3456 }
3457 Range.is = is;
3458})(Range || (Range = {}));
3459/**
3460 * The Location namespace provides helper functions to work with
3461 * [Location](#Location) literals.
3462 */
3463var Location;
3464(function (Location) {
3465 /**
3466 * Creates a Location literal.
3467 * @param uri The location's uri.
3468 * @param range The location's range.
3469 */
3470 function create(uri, range) {
3471 return { uri: uri, range: range };
3472 }
3473 Location.create = create;
3474 /**
3475 * Checks whether the given literal conforms to the [Location](#Location) interface.
3476 */
3477 function is(value) {
3478 var candidate = value;
3479 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
3480 }
3481 Location.is = is;
3482})(Location || (Location = {}));
3483/**
3484 * The LocationLink namespace provides helper functions to work with
3485 * [LocationLink](#LocationLink) literals.
3486 */
3487var LocationLink;
3488(function (LocationLink) {
3489 /**
3490 * Creates a LocationLink literal.
3491 * @param targetUri The definition's uri.
3492 * @param targetRange The full range of the definition.
3493 * @param targetSelectionRange The span of the symbol definition at the target.
3494 * @param originSelectionRange The span of the symbol being defined in the originating source file.
3495 */
3496 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
3497 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
3498 }
3499 LocationLink.create = create;
3500 /**
3501 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
3502 */
3503 function is(value) {
3504 var candidate = value;
3505 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
3506 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
3507 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
3508 }
3509 LocationLink.is = is;
3510})(LocationLink || (LocationLink = {}));
3511/**
3512 * The Color namespace provides helper functions to work with
3513 * [Color](#Color) literals.
3514 */
3515var Color;
3516(function (Color) {
3517 /**
3518 * Creates a new Color literal.
3519 */
3520 function create(red, green, blue, alpha) {
3521 return {
3522 red: red,
3523 green: green,
3524 blue: blue,
3525 alpha: alpha,
3526 };
3527 }
3528 Color.create = create;
3529 /**
3530 * Checks whether the given literal conforms to the [Color](#Color) interface.
3531 */
3532 function is(value) {
3533 var candidate = value;
3534 return Is.number(candidate.red)
3535 && Is.number(candidate.green)
3536 && Is.number(candidate.blue)
3537 && Is.number(candidate.alpha);
3538 }
3539 Color.is = is;
3540})(Color || (Color = {}));
3541/**
3542 * The ColorInformation namespace provides helper functions to work with
3543 * [ColorInformation](#ColorInformation) literals.
3544 */
3545var ColorInformation;
3546(function (ColorInformation) {
3547 /**
3548 * Creates a new ColorInformation literal.
3549 */
3550 function create(range, color) {
3551 return {
3552 range: range,
3553 color: color,
3554 };
3555 }
3556 ColorInformation.create = create;
3557 /**
3558 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3559 */
3560 function is(value) {
3561 var candidate = value;
3562 return Range.is(candidate.range) && Color.is(candidate.color);
3563 }
3564 ColorInformation.is = is;
3565})(ColorInformation || (ColorInformation = {}));
3566/**
3567 * The Color namespace provides helper functions to work with
3568 * [ColorPresentation](#ColorPresentation) literals.
3569 */
3570var ColorPresentation;
3571(function (ColorPresentation) {
3572 /**
3573 * Creates a new ColorInformation literal.
3574 */
3575 function create(label, textEdit, additionalTextEdits) {
3576 return {
3577 label: label,
3578 textEdit: textEdit,
3579 additionalTextEdits: additionalTextEdits,
3580 };
3581 }
3582 ColorPresentation.create = create;
3583 /**
3584 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3585 */
3586 function is(value) {
3587 var candidate = value;
3588 return Is.string(candidate.label)
3589 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
3590 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
3591 }
3592 ColorPresentation.is = is;
3593})(ColorPresentation || (ColorPresentation = {}));
3594/**
3595 * Enum of known range kinds
3596 */
3597var FoldingRangeKind;
3598(function (FoldingRangeKind) {
3599 /**
3600 * Folding range for a comment
3601 */
3602 FoldingRangeKind["Comment"] = "comment";
3603 /**
3604 * Folding range for a imports or includes
3605 */
3606 FoldingRangeKind["Imports"] = "imports";
3607 /**
3608 * Folding range for a region (e.g. `#region`)
3609 */
3610 FoldingRangeKind["Region"] = "region";
3611})(FoldingRangeKind || (FoldingRangeKind = {}));
3612/**
3613 * The folding range namespace provides helper functions to work with
3614 * [FoldingRange](#FoldingRange) literals.
3615 */
3616var FoldingRange;
3617(function (FoldingRange) {
3618 /**
3619 * Creates a new FoldingRange literal.
3620 */
3621 function create(startLine, endLine, startCharacter, endCharacter, kind) {
3622 var result = {
3623 startLine: startLine,
3624 endLine: endLine
3625 };
3626 if (Is.defined(startCharacter)) {
3627 result.startCharacter = startCharacter;
3628 }
3629 if (Is.defined(endCharacter)) {
3630 result.endCharacter = endCharacter;
3631 }
3632 if (Is.defined(kind)) {
3633 result.kind = kind;
3634 }
3635 return result;
3636 }
3637 FoldingRange.create = create;
3638 /**
3639 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
3640 */
3641 function is(value) {
3642 var candidate = value;
3643 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
3644 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
3645 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
3646 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
3647 }
3648 FoldingRange.is = is;
3649})(FoldingRange || (FoldingRange = {}));
3650/**
3651 * The DiagnosticRelatedInformation namespace provides helper functions to work with
3652 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
3653 */
3654var DiagnosticRelatedInformation;
3655(function (DiagnosticRelatedInformation) {
3656 /**
3657 * Creates a new DiagnosticRelatedInformation literal.
3658 */
3659 function create(location, message) {
3660 return {
3661 location: location,
3662 message: message
3663 };
3664 }
3665 DiagnosticRelatedInformation.create = create;
3666 /**
3667 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
3668 */
3669 function is(value) {
3670 var candidate = value;
3671 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
3672 }
3673 DiagnosticRelatedInformation.is = is;
3674})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
3675/**
3676 * The diagnostic's severity.
3677 */
3678var DiagnosticSeverity;
3679(function (DiagnosticSeverity) {
3680 /**
3681 * Reports an error.
3682 */
3683 DiagnosticSeverity.Error = 1;
3684 /**
3685 * Reports a warning.
3686 */
3687 DiagnosticSeverity.Warning = 2;
3688 /**
3689 * Reports an information.
3690 */
3691 DiagnosticSeverity.Information = 3;
3692 /**
3693 * Reports a hint.
3694 */
3695 DiagnosticSeverity.Hint = 4;
3696})(DiagnosticSeverity || (DiagnosticSeverity = {}));
3697/**
3698 * The Diagnostic namespace provides helper functions to work with
3699 * [Diagnostic](#Diagnostic) literals.
3700 */
3701var Diagnostic;
3702(function (Diagnostic) {
3703 /**
3704 * Creates a new Diagnostic literal.
3705 */
3706 function create(range, message, severity, code, source, relatedInformation) {
3707 var result = { range: range, message: message };
3708 if (Is.defined(severity)) {
3709 result.severity = severity;
3710 }
3711 if (Is.defined(code)) {
3712 result.code = code;
3713 }
3714 if (Is.defined(source)) {
3715 result.source = source;
3716 }
3717 if (Is.defined(relatedInformation)) {
3718 result.relatedInformation = relatedInformation;
3719 }
3720 return result;
3721 }
3722 Diagnostic.create = create;
3723 /**
3724 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
3725 */
3726 function is(value) {
3727 var candidate = value;
3728 return Is.defined(candidate)
3729 && Range.is(candidate.range)
3730 && Is.string(candidate.message)
3731 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
3732 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
3733 && (Is.string(candidate.source) || Is.undefined(candidate.source))
3734 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
3735 }
3736 Diagnostic.is = is;
3737})(Diagnostic || (Diagnostic = {}));
3738/**
3739 * The Command namespace provides helper functions to work with
3740 * [Command](#Command) literals.
3741 */
3742var Command;
3743(function (Command) {
3744 /**
3745 * Creates a new Command literal.
3746 */
3747 function create(title, command) {
3748 var args = [];
3749 for (var _i = 2; _i < arguments.length; _i++) {
3750 args[_i - 2] = arguments[_i];
3751 }
3752 var result = { title: title, command: command };
3753 if (Is.defined(args) && args.length > 0) {
3754 result.arguments = args;
3755 }
3756 return result;
3757 }
3758 Command.create = create;
3759 /**
3760 * Checks whether the given literal conforms to the [Command](#Command) interface.
3761 */
3762 function is(value) {
3763 var candidate = value;
3764 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
3765 }
3766 Command.is = is;
3767})(Command || (Command = {}));
3768/**
3769 * The TextEdit namespace provides helper function to create replace,
3770 * insert and delete edits more easily.
3771 */
3772var TextEdit;
3773(function (TextEdit) {
3774 /**
3775 * Creates a replace text edit.
3776 * @param range The range of text to be replaced.
3777 * @param newText The new text.
3778 */
3779 function replace(range, newText) {
3780 return { range: range, newText: newText };
3781 }
3782 TextEdit.replace = replace;
3783 /**
3784 * Creates a insert text edit.
3785 * @param position The position to insert the text at.
3786 * @param newText The text to be inserted.
3787 */
3788 function insert(position, newText) {
3789 return { range: { start: position, end: position }, newText: newText };
3790 }
3791 TextEdit.insert = insert;
3792 /**
3793 * Creates a delete text edit.
3794 * @param range The range of text to be deleted.
3795 */
3796 function del(range) {
3797 return { range: range, newText: '' };
3798 }
3799 TextEdit.del = del;
3800 function is(value) {
3801 var candidate = value;
3802 return Is.objectLiteral(candidate)
3803 && Is.string(candidate.newText)
3804 && Range.is(candidate.range);
3805 }
3806 TextEdit.is = is;
3807})(TextEdit || (TextEdit = {}));
3808/**
3809 * The TextDocumentEdit namespace provides helper function to create
3810 * an edit that manipulates a text document.
3811 */
3812var TextDocumentEdit;
3813(function (TextDocumentEdit) {
3814 /**
3815 * Creates a new `TextDocumentEdit`
3816 */
3817 function create(textDocument, edits) {
3818 return { textDocument: textDocument, edits: edits };
3819 }
3820 TextDocumentEdit.create = create;
3821 function is(value) {
3822 var candidate = value;
3823 return Is.defined(candidate)
3824 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
3825 && Array.isArray(candidate.edits);
3826 }
3827 TextDocumentEdit.is = is;
3828})(TextDocumentEdit || (TextDocumentEdit = {}));
3829var CreateFile;
3830(function (CreateFile) {
3831 function create(uri, options) {
3832 var result = {
3833 kind: 'create',
3834 uri: uri
3835 };
3836 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
3837 result.options = options;
3838 }
3839 return result;
3840 }
3841 CreateFile.create = create;
3842 function is(value) {
3843 var candidate = value;
3844 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
3845 (candidate.options === void 0 ||
3846 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
3847 }
3848 CreateFile.is = is;
3849})(CreateFile || (CreateFile = {}));
3850var RenameFile;
3851(function (RenameFile) {
3852 function create(oldUri, newUri, options) {
3853 var result = {
3854 kind: 'rename',
3855 oldUri: oldUri,
3856 newUri: newUri
3857 };
3858 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
3859 result.options = options;
3860 }
3861 return result;
3862 }
3863 RenameFile.create = create;
3864 function is(value) {
3865 var candidate = value;
3866 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
3867 (candidate.options === void 0 ||
3868 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
3869 }
3870 RenameFile.is = is;
3871})(RenameFile || (RenameFile = {}));
3872var DeleteFile;
3873(function (DeleteFile) {
3874 function create(uri, options) {
3875 var result = {
3876 kind: 'delete',
3877 uri: uri
3878 };
3879 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
3880 result.options = options;
3881 }
3882 return result;
3883 }
3884 DeleteFile.create = create;
3885 function is(value) {
3886 var candidate = value;
3887 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
3888 (candidate.options === void 0 ||
3889 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
3890 }
3891 DeleteFile.is = is;
3892})(DeleteFile || (DeleteFile = {}));
3893var WorkspaceEdit;
3894(function (WorkspaceEdit) {
3895 function is(value) {
3896 var candidate = value;
3897 return candidate &&
3898 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
3899 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
3900 if (Is.string(change.kind)) {
3901 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
3902 }
3903 else {
3904 return TextDocumentEdit.is(change);
3905 }
3906 }));
3907 }
3908 WorkspaceEdit.is = is;
3909})(WorkspaceEdit || (WorkspaceEdit = {}));
3910var TextEditChangeImpl = /** @class */ (function () {
3911 function TextEditChangeImpl(edits) {
3912 this.edits = edits;
3913 }
3914 TextEditChangeImpl.prototype.insert = function (position, newText) {
3915 this.edits.push(TextEdit.insert(position, newText));
3916 };
3917 TextEditChangeImpl.prototype.replace = function (range, newText) {
3918 this.edits.push(TextEdit.replace(range, newText));
3919 };
3920 TextEditChangeImpl.prototype.delete = function (range) {
3921 this.edits.push(TextEdit.del(range));
3922 };
3923 TextEditChangeImpl.prototype.add = function (edit) {
3924 this.edits.push(edit);
3925 };
3926 TextEditChangeImpl.prototype.all = function () {
3927 return this.edits;
3928 };
3929 TextEditChangeImpl.prototype.clear = function () {
3930 this.edits.splice(0, this.edits.length);
3931 };
3932 return TextEditChangeImpl;
3933}());
3934/**
3935 * A workspace change helps constructing changes to a workspace.
3936 */
3937var WorkspaceChange = /** @class */ (function () {
3938 function WorkspaceChange(workspaceEdit) {
3939 var _this = this;
3940 this._textEditChanges = Object.create(null);
3941 if (workspaceEdit) {
3942 this._workspaceEdit = workspaceEdit;
3943 if (workspaceEdit.documentChanges) {
3944 workspaceEdit.documentChanges.forEach(function (change) {
3945 if (TextDocumentEdit.is(change)) {
3946 var textEditChange = new TextEditChangeImpl(change.edits);
3947 _this._textEditChanges[change.textDocument.uri] = textEditChange;
3948 }
3949 });
3950 }
3951 else if (workspaceEdit.changes) {
3952 Object.keys(workspaceEdit.changes).forEach(function (key) {
3953 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
3954 _this._textEditChanges[key] = textEditChange;
3955 });
3956 }
3957 }
3958 }
3959 Object.defineProperty(WorkspaceChange.prototype, "edit", {
3960 /**
3961 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
3962 * use to be returned from a workspace edit operation like rename.
3963 */
3964 get: function () {
3965 return this._workspaceEdit;
3966 },
3967 enumerable: true,
3968 configurable: true
3969 });
3970 WorkspaceChange.prototype.getTextEditChange = function (key) {
3971 if (VersionedTextDocumentIdentifier.is(key)) {
3972 if (!this._workspaceEdit) {
3973 this._workspaceEdit = {
3974 documentChanges: []
3975 };
3976 }
3977 if (!this._workspaceEdit.documentChanges) {
3978 throw new Error('Workspace edit is not configured for document changes.');
3979 }
3980 var textDocument = key;
3981 var result = this._textEditChanges[textDocument.uri];
3982 if (!result) {
3983 var edits = [];
3984 var textDocumentEdit = {
3985 textDocument: textDocument,
3986 edits: edits
3987 };
3988 this._workspaceEdit.documentChanges.push(textDocumentEdit);
3989 result = new TextEditChangeImpl(edits);
3990 this._textEditChanges[textDocument.uri] = result;
3991 }
3992 return result;
3993 }
3994 else {
3995 if (!this._workspaceEdit) {
3996 this._workspaceEdit = {
3997 changes: Object.create(null)
3998 };
3999 }
4000 if (!this._workspaceEdit.changes) {
4001 throw new Error('Workspace edit is not configured for normal text edit changes.');
4002 }
4003 var result = this._textEditChanges[key];
4004 if (!result) {
4005 var edits = [];
4006 this._workspaceEdit.changes[key] = edits;
4007 result = new TextEditChangeImpl(edits);
4008 this._textEditChanges[key] = result;
4009 }
4010 return result;
4011 }
4012 };
4013 WorkspaceChange.prototype.createFile = function (uri, options) {
4014 this.checkDocumentChanges();
4015 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
4016 };
4017 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
4018 this.checkDocumentChanges();
4019 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
4020 };
4021 WorkspaceChange.prototype.deleteFile = function (uri, options) {
4022 this.checkDocumentChanges();
4023 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
4024 };
4025 WorkspaceChange.prototype.checkDocumentChanges = function () {
4026 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
4027 throw new Error('Workspace edit is not configured for document changes.');
4028 }
4029 };
4030 return WorkspaceChange;
4031}());
4032
4033/**
4034 * The TextDocumentIdentifier namespace provides helper functions to work with
4035 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
4036 */
4037var TextDocumentIdentifier;
4038(function (TextDocumentIdentifier) {
4039 /**
4040 * Creates a new TextDocumentIdentifier literal.
4041 * @param uri The document's uri.
4042 */
4043 function create(uri) {
4044 return { uri: uri };
4045 }
4046 TextDocumentIdentifier.create = create;
4047 /**
4048 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
4049 */
4050 function is(value) {
4051 var candidate = value;
4052 return Is.defined(candidate) && Is.string(candidate.uri);
4053 }
4054 TextDocumentIdentifier.is = is;
4055})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
4056/**
4057 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
4058 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
4059 */
4060var VersionedTextDocumentIdentifier;
4061(function (VersionedTextDocumentIdentifier) {
4062 /**
4063 * Creates a new VersionedTextDocumentIdentifier literal.
4064 * @param uri The document's uri.
4065 * @param uri The document's text.
4066 */
4067 function create(uri, version) {
4068 return { uri: uri, version: version };
4069 }
4070 VersionedTextDocumentIdentifier.create = create;
4071 /**
4072 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
4073 */
4074 function is(value) {
4075 var candidate = value;
4076 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
4077 }
4078 VersionedTextDocumentIdentifier.is = is;
4079})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
4080/**
4081 * The TextDocumentItem namespace provides helper functions to work with
4082 * [TextDocumentItem](#TextDocumentItem) literals.
4083 */
4084var TextDocumentItem;
4085(function (TextDocumentItem) {
4086 /**
4087 * Creates a new TextDocumentItem literal.
4088 * @param uri The document's uri.
4089 * @param languageId The document's language identifier.
4090 * @param version The document's version number.
4091 * @param text The document's text.
4092 */
4093 function create(uri, languageId, version, text) {
4094 return { uri: uri, languageId: languageId, version: version, text: text };
4095 }
4096 TextDocumentItem.create = create;
4097 /**
4098 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
4099 */
4100 function is(value) {
4101 var candidate = value;
4102 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
4103 }
4104 TextDocumentItem.is = is;
4105})(TextDocumentItem || (TextDocumentItem = {}));
4106/**
4107 * Describes the content type that a client supports in various
4108 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
4109 *
4110 * Please note that `MarkupKinds` must not start with a `$`. This kinds
4111 * are reserved for internal usage.
4112 */
4113var MarkupKind;
4114(function (MarkupKind) {
4115 /**
4116 * Plain text is supported as a content format
4117 */
4118 MarkupKind.PlainText = 'plaintext';
4119 /**
4120 * Markdown is supported as a content format
4121 */
4122 MarkupKind.Markdown = 'markdown';
4123})(MarkupKind || (MarkupKind = {}));
4124(function (MarkupKind) {
4125 /**
4126 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
4127 */
4128 function is(value) {
4129 var candidate = value;
4130 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
4131 }
4132 MarkupKind.is = is;
4133})(MarkupKind || (MarkupKind = {}));
4134var MarkupContent;
4135(function (MarkupContent) {
4136 /**
4137 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
4138 */
4139 function is(value) {
4140 var candidate = value;
4141 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
4142 }
4143 MarkupContent.is = is;
4144})(MarkupContent || (MarkupContent = {}));
4145/**
4146 * The kind of a completion entry.
4147 */
4148var CompletionItemKind;
4149(function (CompletionItemKind) {
4150 CompletionItemKind.Text = 1;
4151 CompletionItemKind.Method = 2;
4152 CompletionItemKind.Function = 3;
4153 CompletionItemKind.Constructor = 4;
4154 CompletionItemKind.Field = 5;
4155 CompletionItemKind.Variable = 6;
4156 CompletionItemKind.Class = 7;
4157 CompletionItemKind.Interface = 8;
4158 CompletionItemKind.Module = 9;
4159 CompletionItemKind.Property = 10;
4160 CompletionItemKind.Unit = 11;
4161 CompletionItemKind.Value = 12;
4162 CompletionItemKind.Enum = 13;
4163 CompletionItemKind.Keyword = 14;
4164 CompletionItemKind.Snippet = 15;
4165 CompletionItemKind.Color = 16;
4166 CompletionItemKind.File = 17;
4167 CompletionItemKind.Reference = 18;
4168 CompletionItemKind.Folder = 19;
4169 CompletionItemKind.EnumMember = 20;
4170 CompletionItemKind.Constant = 21;
4171 CompletionItemKind.Struct = 22;
4172 CompletionItemKind.Event = 23;
4173 CompletionItemKind.Operator = 24;
4174 CompletionItemKind.TypeParameter = 25;
4175})(CompletionItemKind || (CompletionItemKind = {}));
4176/**
4177 * Defines whether the insert text in a completion item should be interpreted as
4178 * plain text or a snippet.
4179 */
4180var InsertTextFormat;
4181(function (InsertTextFormat) {
4182 /**
4183 * The primary text to be inserted is treated as a plain string.
4184 */
4185 InsertTextFormat.PlainText = 1;
4186 /**
4187 * The primary text to be inserted is treated as a snippet.
4188 *
4189 * A snippet can define tab stops and placeholders with `$1`, `$2`
4190 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4191 * the end of the snippet. Placeholders with equal identifiers are linked,
4192 * that is typing in one will update others too.
4193 *
4194 * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
4195 */
4196 InsertTextFormat.Snippet = 2;
4197})(InsertTextFormat || (InsertTextFormat = {}));
4198/**
4199 * The CompletionItem namespace provides functions to deal with
4200 * completion items.
4201 */
4202var CompletionItem;
4203(function (CompletionItem) {
4204 /**
4205 * Create a completion item and seed it with a label.
4206 * @param label The completion item's label
4207 */
4208 function create(label) {
4209 return { label: label };
4210 }
4211 CompletionItem.create = create;
4212})(CompletionItem || (CompletionItem = {}));
4213/**
4214 * The CompletionList namespace provides functions to deal with
4215 * completion lists.
4216 */
4217var CompletionList;
4218(function (CompletionList) {
4219 /**
4220 * Creates a new completion list.
4221 *
4222 * @param items The completion items.
4223 * @param isIncomplete The list is not complete.
4224 */
4225 function create(items, isIncomplete) {
4226 return { items: items ? items : [], isIncomplete: !!isIncomplete };
4227 }
4228 CompletionList.create = create;
4229})(CompletionList || (CompletionList = {}));
4230var MarkedString;
4231(function (MarkedString) {
4232 /**
4233 * Creates a marked string from plain text.
4234 *
4235 * @param plainText The plain text.
4236 */
4237 function fromPlainText(plainText) {
4238 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
4239 }
4240 MarkedString.fromPlainText = fromPlainText;
4241 /**
4242 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
4243 */
4244 function is(value) {
4245 var candidate = value;
4246 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
4247 }
4248 MarkedString.is = is;
4249})(MarkedString || (MarkedString = {}));
4250var Hover;
4251(function (Hover) {
4252 /**
4253 * Checks whether the given value conforms to the [Hover](#Hover) interface.
4254 */
4255 function is(value) {
4256 var candidate = value;
4257 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
4258 MarkedString.is(candidate.contents) ||
4259 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
4260 }
4261 Hover.is = is;
4262})(Hover || (Hover = {}));
4263/**
4264 * The ParameterInformation namespace provides helper functions to work with
4265 * [ParameterInformation](#ParameterInformation) literals.
4266 */
4267var ParameterInformation;
4268(function (ParameterInformation) {
4269 /**
4270 * Creates a new parameter information literal.
4271 *
4272 * @param label A label string.
4273 * @param documentation A doc string.
4274 */
4275 function create(label, documentation) {
4276 return documentation ? { label: label, documentation: documentation } : { label: label };
4277 }
4278 ParameterInformation.create = create;
4279 ;
4280})(ParameterInformation || (ParameterInformation = {}));
4281/**
4282 * The SignatureInformation namespace provides helper functions to work with
4283 * [SignatureInformation](#SignatureInformation) literals.
4284 */
4285var SignatureInformation;
4286(function (SignatureInformation) {
4287 function create(label, documentation) {
4288 var parameters = [];
4289 for (var _i = 2; _i < arguments.length; _i++) {
4290 parameters[_i - 2] = arguments[_i];
4291 }
4292 var result = { label: label };
4293 if (Is.defined(documentation)) {
4294 result.documentation = documentation;
4295 }
4296 if (Is.defined(parameters)) {
4297 result.parameters = parameters;
4298 }
4299 else {
4300 result.parameters = [];
4301 }
4302 return result;
4303 }
4304 SignatureInformation.create = create;
4305})(SignatureInformation || (SignatureInformation = {}));
4306/**
4307 * A document highlight kind.
4308 */
4309var DocumentHighlightKind;
4310(function (DocumentHighlightKind) {
4311 /**
4312 * A textual occurrence.
4313 */
4314 DocumentHighlightKind.Text = 1;
4315 /**
4316 * Read-access of a symbol, like reading a variable.
4317 */
4318 DocumentHighlightKind.Read = 2;
4319 /**
4320 * Write-access of a symbol, like writing to a variable.
4321 */
4322 DocumentHighlightKind.Write = 3;
4323})(DocumentHighlightKind || (DocumentHighlightKind = {}));
4324/**
4325 * DocumentHighlight namespace to provide helper functions to work with
4326 * [DocumentHighlight](#DocumentHighlight) literals.
4327 */
4328var DocumentHighlight;
4329(function (DocumentHighlight) {
4330 /**
4331 * Create a DocumentHighlight object.
4332 * @param range The range the highlight applies to.
4333 */
4334 function create(range, kind) {
4335 var result = { range: range };
4336 if (Is.number(kind)) {
4337 result.kind = kind;
4338 }
4339 return result;
4340 }
4341 DocumentHighlight.create = create;
4342})(DocumentHighlight || (DocumentHighlight = {}));
4343/**
4344 * A symbol kind.
4345 */
4346var SymbolKind;
4347(function (SymbolKind) {
4348 SymbolKind.File = 1;
4349 SymbolKind.Module = 2;
4350 SymbolKind.Namespace = 3;
4351 SymbolKind.Package = 4;
4352 SymbolKind.Class = 5;
4353 SymbolKind.Method = 6;
4354 SymbolKind.Property = 7;
4355 SymbolKind.Field = 8;
4356 SymbolKind.Constructor = 9;
4357 SymbolKind.Enum = 10;
4358 SymbolKind.Interface = 11;
4359 SymbolKind.Function = 12;
4360 SymbolKind.Variable = 13;
4361 SymbolKind.Constant = 14;
4362 SymbolKind.String = 15;
4363 SymbolKind.Number = 16;
4364 SymbolKind.Boolean = 17;
4365 SymbolKind.Array = 18;
4366 SymbolKind.Object = 19;
4367 SymbolKind.Key = 20;
4368 SymbolKind.Null = 21;
4369 SymbolKind.EnumMember = 22;
4370 SymbolKind.Struct = 23;
4371 SymbolKind.Event = 24;
4372 SymbolKind.Operator = 25;
4373 SymbolKind.TypeParameter = 26;
4374})(SymbolKind || (SymbolKind = {}));
4375var SymbolInformation;
4376(function (SymbolInformation) {
4377 /**
4378 * Creates a new symbol information literal.
4379 *
4380 * @param name The name of the symbol.
4381 * @param kind The kind of the symbol.
4382 * @param range The range of the location of the symbol.
4383 * @param uri The resource of the location of symbol, defaults to the current document.
4384 * @param containerName The name of the symbol containing the symbol.
4385 */
4386 function create(name, kind, range, uri, containerName) {
4387 var result = {
4388 name: name,
4389 kind: kind,
4390 location: { uri: uri, range: range }
4391 };
4392 if (containerName) {
4393 result.containerName = containerName;
4394 }
4395 return result;
4396 }
4397 SymbolInformation.create = create;
4398})(SymbolInformation || (SymbolInformation = {}));
4399/**
4400 * Represents programming constructs like variables, classes, interfaces etc.
4401 * that appear in a document. Document symbols can be hierarchical and they
4402 * have two ranges: one that encloses its definition and one that points to
4403 * its most interesting range, e.g. the range of an identifier.
4404 */
4405var DocumentSymbol = /** @class */ (function () {
4406 function DocumentSymbol() {
4407 }
4408 return DocumentSymbol;
4409}());
4410
4411(function (DocumentSymbol) {
4412 /**
4413 * Creates a new symbol information literal.
4414 *
4415 * @param name The name of the symbol.
4416 * @param detail The detail of the symbol.
4417 * @param kind The kind of the symbol.
4418 * @param range The range of the symbol.
4419 * @param selectionRange The selectionRange of the symbol.
4420 * @param children Children of the symbol.
4421 */
4422 function create(name, detail, kind, range, selectionRange, children) {
4423 var result = {
4424 name: name,
4425 detail: detail,
4426 kind: kind,
4427 range: range,
4428 selectionRange: selectionRange
4429 };
4430 if (children !== void 0) {
4431 result.children = children;
4432 }
4433 return result;
4434 }
4435 DocumentSymbol.create = create;
4436 /**
4437 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
4438 */
4439 function is(value) {
4440 var candidate = value;
4441 return candidate &&
4442 Is.string(candidate.name) && Is.number(candidate.kind) &&
4443 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
4444 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
4445 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
4446 (candidate.children === void 0 || Array.isArray(candidate.children));
4447 }
4448 DocumentSymbol.is = is;
4449})(DocumentSymbol || (DocumentSymbol = {}));
4450/**
4451 * A set of predefined code action kinds
4452 */
4453var CodeActionKind;
4454(function (CodeActionKind) {
4455 /**
4456 * Base kind for quickfix actions: 'quickfix'
4457 */
4458 CodeActionKind.QuickFix = 'quickfix';
4459 /**
4460 * Base kind for refactoring actions: 'refactor'
4461 */
4462 CodeActionKind.Refactor = 'refactor';
4463 /**
4464 * Base kind for refactoring extraction actions: 'refactor.extract'
4465 *
4466 * Example extract actions:
4467 *
4468 * - Extract method
4469 * - Extract function
4470 * - Extract variable
4471 * - Extract interface from class
4472 * - ...
4473 */
4474 CodeActionKind.RefactorExtract = 'refactor.extract';
4475 /**
4476 * Base kind for refactoring inline actions: 'refactor.inline'
4477 *
4478 * Example inline actions:
4479 *
4480 * - Inline function
4481 * - Inline variable
4482 * - Inline constant
4483 * - ...
4484 */
4485 CodeActionKind.RefactorInline = 'refactor.inline';
4486 /**
4487 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
4488 *
4489 * Example rewrite actions:
4490 *
4491 * - Convert JavaScript function to class
4492 * - Add or remove parameter
4493 * - Encapsulate field
4494 * - Make method static
4495 * - Move method to base class
4496 * - ...
4497 */
4498 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
4499 /**
4500 * Base kind for source actions: `source`
4501 *
4502 * Source code actions apply to the entire file.
4503 */
4504 CodeActionKind.Source = 'source';
4505 /**
4506 * Base kind for an organize imports source action: `source.organizeImports`
4507 */
4508 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
4509})(CodeActionKind || (CodeActionKind = {}));
4510/**
4511 * The CodeActionContext namespace provides helper functions to work with
4512 * [CodeActionContext](#CodeActionContext) literals.
4513 */
4514var CodeActionContext;
4515(function (CodeActionContext) {
4516 /**
4517 * Creates a new CodeActionContext literal.
4518 */
4519 function create(diagnostics, only) {
4520 var result = { diagnostics: diagnostics };
4521 if (only !== void 0 && only !== null) {
4522 result.only = only;
4523 }
4524 return result;
4525 }
4526 CodeActionContext.create = create;
4527 /**
4528 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
4529 */
4530 function is(value) {
4531 var candidate = value;
4532 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
4533 }
4534 CodeActionContext.is = is;
4535})(CodeActionContext || (CodeActionContext = {}));
4536var CodeAction;
4537(function (CodeAction) {
4538 function create(title, commandOrEdit, kind) {
4539 var result = { title: title };
4540 if (Command.is(commandOrEdit)) {
4541 result.command = commandOrEdit;
4542 }
4543 else {
4544 result.edit = commandOrEdit;
4545 }
4546 if (kind !== void null) {
4547 result.kind = kind;
4548 }
4549 return result;
4550 }
4551 CodeAction.create = create;
4552 function is(value) {
4553 var candidate = value;
4554 return candidate && Is.string(candidate.title) &&
4555 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
4556 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
4557 (candidate.edit !== void 0 || candidate.command !== void 0) &&
4558 (candidate.command === void 0 || Command.is(candidate.command)) &&
4559 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
4560 }
4561 CodeAction.is = is;
4562})(CodeAction || (CodeAction = {}));
4563/**
4564 * The CodeLens namespace provides helper functions to work with
4565 * [CodeLens](#CodeLens) literals.
4566 */
4567var CodeLens;
4568(function (CodeLens) {
4569 /**
4570 * Creates a new CodeLens literal.
4571 */
4572 function create(range, data) {
4573 var result = { range: range };
4574 if (Is.defined(data))
4575 result.data = data;
4576 return result;
4577 }
4578 CodeLens.create = create;
4579 /**
4580 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
4581 */
4582 function is(value) {
4583 var candidate = value;
4584 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
4585 }
4586 CodeLens.is = is;
4587})(CodeLens || (CodeLens = {}));
4588/**
4589 * The FormattingOptions namespace provides helper functions to work with
4590 * [FormattingOptions](#FormattingOptions) literals.
4591 */
4592var FormattingOptions;
4593(function (FormattingOptions) {
4594 /**
4595 * Creates a new FormattingOptions literal.
4596 */
4597 function create(tabSize, insertSpaces) {
4598 return { tabSize: tabSize, insertSpaces: insertSpaces };
4599 }
4600 FormattingOptions.create = create;
4601 /**
4602 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
4603 */
4604 function is(value) {
4605 var candidate = value;
4606 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
4607 }
4608 FormattingOptions.is = is;
4609})(FormattingOptions || (FormattingOptions = {}));
4610/**
4611 * A document link is a range in a text document that links to an internal or external resource, like another
4612 * text document or a web site.
4613 */
4614var DocumentLink = /** @class */ (function () {
4615 function DocumentLink() {
4616 }
4617 return DocumentLink;
4618}());
4619
4620/**
4621 * The DocumentLink namespace provides helper functions to work with
4622 * [DocumentLink](#DocumentLink) literals.
4623 */
4624(function (DocumentLink) {
4625 /**
4626 * Creates a new DocumentLink literal.
4627 */
4628 function create(range, target, data) {
4629 return { range: range, target: target, data: data };
4630 }
4631 DocumentLink.create = create;
4632 /**
4633 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
4634 */
4635 function is(value) {
4636 var candidate = value;
4637 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
4638 }
4639 DocumentLink.is = is;
4640})(DocumentLink || (DocumentLink = {}));
4641var EOL = ['\n', '\r\n', '\r'];
4642var TextDocument;
4643(function (TextDocument) {
4644 /**
4645 * Creates a new ITextDocument literal from the given uri and content.
4646 * @param uri The document's uri.
4647 * @param languageId The document's language Id.
4648 * @param content The document's content.
4649 */
4650 function create(uri, languageId, version, content) {
4651 return new FullTextDocument(uri, languageId, version, content);
4652 }
4653 TextDocument.create = create;
4654 /**
4655 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
4656 */
4657 function is(value) {
4658 var candidate = value;
4659 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
4660 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
4661 }
4662 TextDocument.is = is;
4663 function applyEdits(document, edits) {
4664 var text = document.getText();
4665 var sortedEdits = mergeSort(edits, function (a, b) {
4666 var diff = a.range.start.line - b.range.start.line;
4667 if (diff === 0) {
4668 return a.range.start.character - b.range.start.character;
4669 }
4670 return diff;
4671 });
4672 var lastModifiedOffset = text.length;
4673 for (var i = sortedEdits.length - 1; i >= 0; i--) {
4674 var e = sortedEdits[i];
4675 var startOffset = document.offsetAt(e.range.start);
4676 var endOffset = document.offsetAt(e.range.end);
4677 if (endOffset <= lastModifiedOffset) {
4678 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
4679 }
4680 else {
4681 throw new Error('Overlapping edit');
4682 }
4683 lastModifiedOffset = startOffset;
4684 }
4685 return text;
4686 }
4687 TextDocument.applyEdits = applyEdits;
4688 function mergeSort(data, compare) {
4689 if (data.length <= 1) {
4690 // sorted
4691 return data;
4692 }
4693 var p = (data.length / 2) | 0;
4694 var left = data.slice(0, p);
4695 var right = data.slice(p);
4696 mergeSort(left, compare);
4697 mergeSort(right, compare);
4698 var leftIdx = 0;
4699 var rightIdx = 0;
4700 var i = 0;
4701 while (leftIdx < left.length && rightIdx < right.length) {
4702 var ret = compare(left[leftIdx], right[rightIdx]);
4703 if (ret <= 0) {
4704 // smaller_equal -> take left to preserve order
4705 data[i++] = left[leftIdx++];
4706 }
4707 else {
4708 // greater -> take right
4709 data[i++] = right[rightIdx++];
4710 }
4711 }
4712 while (leftIdx < left.length) {
4713 data[i++] = left[leftIdx++];
4714 }
4715 while (rightIdx < right.length) {
4716 data[i++] = right[rightIdx++];
4717 }
4718 return data;
4719 }
4720})(TextDocument || (TextDocument = {}));
4721/**
4722 * Represents reasons why a text document is saved.
4723 */
4724var TextDocumentSaveReason;
4725(function (TextDocumentSaveReason) {
4726 /**
4727 * Manually triggered, e.g. by the user pressing save, by starting debugging,
4728 * or by an API call.
4729 */
4730 TextDocumentSaveReason.Manual = 1;
4731 /**
4732 * Automatic after a delay.
4733 */
4734 TextDocumentSaveReason.AfterDelay = 2;
4735 /**
4736 * When the editor lost focus.
4737 */
4738 TextDocumentSaveReason.FocusOut = 3;
4739})(TextDocumentSaveReason || (TextDocumentSaveReason = {}));
4740var FullTextDocument = /** @class */ (function () {
4741 function FullTextDocument(uri, languageId, version, content) {
4742 this._uri = uri;
4743 this._languageId = languageId;
4744 this._version = version;
4745 this._content = content;
4746 this._lineOffsets = null;
4747 }
4748 Object.defineProperty(FullTextDocument.prototype, "uri", {
4749 get: function () {
4750 return this._uri;
4751 },
4752 enumerable: true,
4753 configurable: true
4754 });
4755 Object.defineProperty(FullTextDocument.prototype, "languageId", {
4756 get: function () {
4757 return this._languageId;
4758 },
4759 enumerable: true,
4760 configurable: true
4761 });
4762 Object.defineProperty(FullTextDocument.prototype, "version", {
4763 get: function () {
4764 return this._version;
4765 },
4766 enumerable: true,
4767 configurable: true
4768 });
4769 FullTextDocument.prototype.getText = function (range) {
4770 if (range) {
4771 var start = this.offsetAt(range.start);
4772 var end = this.offsetAt(range.end);
4773 return this._content.substring(start, end);
4774 }
4775 return this._content;
4776 };
4777 FullTextDocument.prototype.update = function (event, version) {
4778 this._content = event.text;
4779 this._version = version;
4780 this._lineOffsets = null;
4781 };
4782 FullTextDocument.prototype.getLineOffsets = function () {
4783 if (this._lineOffsets === null) {
4784 var lineOffsets = [];
4785 var text = this._content;
4786 var isLineStart = true;
4787 for (var i = 0; i < text.length; i++) {
4788 if (isLineStart) {
4789 lineOffsets.push(i);
4790 isLineStart = false;
4791 }
4792 var ch = text.charAt(i);
4793 isLineStart = (ch === '\r' || ch === '\n');
4794 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
4795 i++;
4796 }
4797 }
4798 if (isLineStart && text.length > 0) {
4799 lineOffsets.push(text.length);
4800 }
4801 this._lineOffsets = lineOffsets;
4802 }
4803 return this._lineOffsets;
4804 };
4805 FullTextDocument.prototype.positionAt = function (offset) {
4806 offset = Math.max(Math.min(offset, this._content.length), 0);
4807 var lineOffsets = this.getLineOffsets();
4808 var low = 0, high = lineOffsets.length;
4809 if (high === 0) {
4810 return Position.create(0, offset);
4811 }
4812 while (low < high) {
4813 var mid = Math.floor((low + high) / 2);
4814 if (lineOffsets[mid] > offset) {
4815 high = mid;
4816 }
4817 else {
4818 low = mid + 1;
4819 }
4820 }
4821 // low is the least x for which the line offset is larger than the current offset
4822 // or array.length if no line offset is larger than the current offset
4823 var line = low - 1;
4824 return Position.create(line, offset - lineOffsets[line]);
4825 };
4826 FullTextDocument.prototype.offsetAt = function (position) {
4827 var lineOffsets = this.getLineOffsets();
4828 if (position.line >= lineOffsets.length) {
4829 return this._content.length;
4830 }
4831 else if (position.line < 0) {
4832 return 0;
4833 }
4834 var lineOffset = lineOffsets[position.line];
4835 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
4836 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
4837 };
4838 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
4839 get: function () {
4840 return this.getLineOffsets().length;
4841 },
4842 enumerable: true,
4843 configurable: true
4844 });
4845 return FullTextDocument;
4846}());
4847var Is;
4848(function (Is) {
4849 var toString = Object.prototype.toString;
4850 function defined(value) {
4851 return typeof value !== 'undefined';
4852 }
4853 Is.defined = defined;
4854 function undefined(value) {
4855 return typeof value === 'undefined';
4856 }
4857 Is.undefined = undefined;
4858 function boolean(value) {
4859 return value === true || value === false;
4860 }
4861 Is.boolean = boolean;
4862 function string(value) {
4863 return toString.call(value) === '[object String]';
4864 }
4865 Is.string = string;
4866 function number(value) {
4867 return toString.call(value) === '[object Number]';
4868 }
4869 Is.number = number;
4870 function func(value) {
4871 return toString.call(value) === '[object Function]';
4872 }
4873 Is.func = func;
4874 function objectLiteral(value) {
4875 // Strictly speaking class instances pass this check as well. Since the LSP
4876 // doesn't use classes we ignore this for now. If we do we need to add something
4877 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
4878 return value !== null && typeof value === 'object';
4879 }
4880 Is.objectLiteral = objectLiteral;
4881 function typedArray(value, check) {
4882 return Array.isArray(value) && value.every(check);
4883 }
4884 Is.typedArray = typedArray;
4885})(Is || (Is = {}));
4886
4887
4888/***/ }),
4889/* 21 */
4890/***/ (function(module, exports, __webpack_require__) {
4891
4892"use strict";
4893/* --------------------------------------------------------------------------------------------
4894 * Copyright (c) Microsoft Corporation. All rights reserved.
4895 * Licensed under the MIT License. See License.txt in the project root for license information.
4896 * ------------------------------------------------------------------------------------------ */
4897
4898Object.defineProperty(exports, "__esModule", { value: true });
4899const Is = __webpack_require__(22);
4900const vscode_jsonrpc_1 = __webpack_require__(6);
4901const protocol_implementation_1 = __webpack_require__(23);
4902exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
4903const protocol_typeDefinition_1 = __webpack_require__(24);
4904exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
4905const protocol_workspaceFolders_1 = __webpack_require__(25);
4906exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
4907exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
4908const protocol_configuration_1 = __webpack_require__(26);
4909exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
4910const protocol_colorProvider_1 = __webpack_require__(27);
4911exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
4912exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
4913const protocol_foldingRange_1 = __webpack_require__(28);
4914exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
4915const protocol_declaration_1 = __webpack_require__(29);
4916exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
4917// @ts-ignore: to avoid inlining LocatioLink as dynamic import
4918let __noDynamicImport;
4919var DocumentFilter;
4920(function (DocumentFilter) {
4921 function is(value) {
4922 let candidate = value;
4923 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
4924 }
4925 DocumentFilter.is = is;
4926})(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
4927/**
4928 * The `client/registerCapability` request is sent from the server to the client to register a new capability
4929 * handler on the client side.
4930 */
4931var RegistrationRequest;
4932(function (RegistrationRequest) {
4933 RegistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/registerCapability');
4934})(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
4935/**
4936 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
4937 * handler on the client side.
4938 */
4939var UnregistrationRequest;
4940(function (UnregistrationRequest) {
4941 UnregistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/unregisterCapability');
4942})(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
4943var ResourceOperationKind;
4944(function (ResourceOperationKind) {
4945 /**
4946 * Supports creating new files and folders.
4947 */
4948 ResourceOperationKind.Create = 'create';
4949 /**
4950 * Supports renaming existing files and folders.
4951 */
4952 ResourceOperationKind.Rename = 'rename';
4953 /**
4954 * Supports deleting existing files and folders.
4955 */
4956 ResourceOperationKind.Delete = 'delete';
4957})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
4958var FailureHandlingKind;
4959(function (FailureHandlingKind) {
4960 /**
4961 * Applying the workspace change is simply aborted if one of the changes provided
4962 * fails. All operations executed before the failing operation stay executed.
4963 */
4964 FailureHandlingKind.Abort = 'abort';
4965 /**
4966 * All operations are executed transactional. That means they either all
4967 * succeed or no changes at all are applied to the workspace.
4968 */
4969 FailureHandlingKind.Transactional = 'transactional';
4970 /**
4971 * If the workspace edit contains only textual file changes they are executed transactional.
4972 * If resource changes (create, rename or delete file) are part of the change the failure
4973 * handling startegy is abort.
4974 */
4975 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
4976 /**
4977 * The client tries to undo the operations already executed. But there is no
4978 * guaruntee that this is succeeding.
4979 */
4980 FailureHandlingKind.Undo = 'undo';
4981})(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
4982/**
4983 * Defines how the host (editor) should sync
4984 * document changes to the language server.
4985 */
4986var TextDocumentSyncKind;
4987(function (TextDocumentSyncKind) {
4988 /**
4989 * Documents should not be synced at all.
4990 */
4991 TextDocumentSyncKind.None = 0;
4992 /**
4993 * Documents are synced by always sending the full content
4994 * of the document.
4995 */
4996 TextDocumentSyncKind.Full = 1;
4997 /**
4998 * Documents are synced by sending the full content on open.
4999 * After that only incremental updates to the document are
5000 * send.
5001 */
5002 TextDocumentSyncKind.Incremental = 2;
5003})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
5004/**
5005 * The initialize request is sent from the client to the server.
5006 * It is sent once as the request after starting up the server.
5007 * The requests parameter is of type [InitializeParams](#InitializeParams)
5008 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
5009 * resolves to such.
5010 */
5011var InitializeRequest;
5012(function (InitializeRequest) {
5013 InitializeRequest.type = new vscode_jsonrpc_1.RequestType('initialize');
5014})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
5015/**
5016 * Known error codes for an `InitializeError`;
5017 */
5018var InitializeError;
5019(function (InitializeError) {
5020 /**
5021 * If the protocol version provided by the client can't be handled by the server.
5022 * @deprecated This initialize error got replaced by client capabilities. There is
5023 * no version handshake in version 3.0x
5024 */
5025 InitializeError.unknownProtocolVersion = 1;
5026})(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
5027/**
5028 * The intialized notification is sent from the client to the
5029 * server after the client is fully initialized and the server
5030 * is allowed to send requests from the server to the client.
5031 */
5032var InitializedNotification;
5033(function (InitializedNotification) {
5034 InitializedNotification.type = new vscode_jsonrpc_1.NotificationType('initialized');
5035})(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
5036//---- Shutdown Method ----
5037/**
5038 * A shutdown request is sent from the client to the server.
5039 * It is sent once when the client decides to shutdown the
5040 * server. The only notification that is sent after a shutdown request
5041 * is the exit event.
5042 */
5043var ShutdownRequest;
5044(function (ShutdownRequest) {
5045 ShutdownRequest.type = new vscode_jsonrpc_1.RequestType0('shutdown');
5046})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
5047//---- Exit Notification ----
5048/**
5049 * The exit event is sent from the client to the server to
5050 * ask the server to exit its process.
5051 */
5052var ExitNotification;
5053(function (ExitNotification) {
5054 ExitNotification.type = new vscode_jsonrpc_1.NotificationType0('exit');
5055})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
5056//---- Configuration notification ----
5057/**
5058 * The configuration change notification is sent from the client to the server
5059 * when the client's configuration has changed. The notification contains
5060 * the changed configuration as defined by the language client.
5061 */
5062var DidChangeConfigurationNotification;
5063(function (DidChangeConfigurationNotification) {
5064 DidChangeConfigurationNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeConfiguration');
5065})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
5066//---- Message show and log notifications ----
5067/**
5068 * The message type
5069 */
5070var MessageType;
5071(function (MessageType) {
5072 /**
5073 * An error message.
5074 */
5075 MessageType.Error = 1;
5076 /**
5077 * A warning message.
5078 */
5079 MessageType.Warning = 2;
5080 /**
5081 * An information message.
5082 */
5083 MessageType.Info = 3;
5084 /**
5085 * A log message.
5086 */
5087 MessageType.Log = 4;
5088})(MessageType = exports.MessageType || (exports.MessageType = {}));
5089/**
5090 * The show message notification is sent from a server to a client to ask
5091 * the client to display a particular message in the user interface.
5092 */
5093var ShowMessageNotification;
5094(function (ShowMessageNotification) {
5095 ShowMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/showMessage');
5096})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
5097/**
5098 * The show message request is sent from the server to the client to show a message
5099 * and a set of options actions to the user.
5100 */
5101var ShowMessageRequest;
5102(function (ShowMessageRequest) {
5103 ShowMessageRequest.type = new vscode_jsonrpc_1.RequestType('window/showMessageRequest');
5104})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
5105/**
5106 * The log message notification is sent from the server to the client to ask
5107 * the client to log a particular message.
5108 */
5109var LogMessageNotification;
5110(function (LogMessageNotification) {
5111 LogMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/logMessage');
5112})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
5113//---- Telemetry notification
5114/**
5115 * The telemetry event notification is sent from the server to the client to ask
5116 * the client to log telemetry data.
5117 */
5118var TelemetryEventNotification;
5119(function (TelemetryEventNotification) {
5120 TelemetryEventNotification.type = new vscode_jsonrpc_1.NotificationType('telemetry/event');
5121})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
5122/**
5123 * The document open notification is sent from the client to the server to signal
5124 * newly opened text documents. The document's truth is now managed by the client
5125 * and the server must not try to read the document's truth using the document's
5126 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
5127 * mean that its content is presented in an editor. An open notification must not
5128 * be sent more than once without a corresponding close notification send before.
5129 * This means open and close notification must be balanced and the max open count
5130 * is one.
5131 */
5132var DidOpenTextDocumentNotification;
5133(function (DidOpenTextDocumentNotification) {
5134 DidOpenTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didOpen');
5135})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
5136/**
5137 * The document change notification is sent from the client to the server to signal
5138 * changes to a text document.
5139 */
5140var DidChangeTextDocumentNotification;
5141(function (DidChangeTextDocumentNotification) {
5142 DidChangeTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didChange');
5143})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
5144/**
5145 * The document close notification is sent from the client to the server when
5146 * the document got closed in the client. The document's truth now exists where
5147 * the document's uri points to (e.g. if the document's uri is a file uri the
5148 * truth now exists on disk). As with the open notification the close notification
5149 * is about managing the document's content. Receiving a close notification
5150 * doesn't mean that the document was open in an editor before. A close
5151 * notification requires a previous open notification to be sent.
5152 */
5153var DidCloseTextDocumentNotification;
5154(function (DidCloseTextDocumentNotification) {
5155 DidCloseTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didClose');
5156})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
5157/**
5158 * The document save notification is sent from the client to the server when
5159 * the document got saved in the client.
5160 */
5161var DidSaveTextDocumentNotification;
5162(function (DidSaveTextDocumentNotification) {
5163 DidSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didSave');
5164})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
5165/**
5166 * A document will save notification is sent from the client to the server before
5167 * the document is actually saved.
5168 */
5169var WillSaveTextDocumentNotification;
5170(function (WillSaveTextDocumentNotification) {
5171 WillSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/willSave');
5172})(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
5173/**
5174 * A document will save request is sent from the client to the server before
5175 * the document is actually saved. The request can return an array of TextEdits
5176 * which will be applied to the text document before it is saved. Please note that
5177 * clients might drop results if computing the text edits took too long or if a
5178 * server constantly fails on this request. This is done to keep the save fast and
5179 * reliable.
5180 */
5181var WillSaveTextDocumentWaitUntilRequest;
5182(function (WillSaveTextDocumentWaitUntilRequest) {
5183 WillSaveTextDocumentWaitUntilRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/willSaveWaitUntil');
5184})(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
5185//---- File eventing ----
5186/**
5187 * The watched files notification is sent from the client to the server when
5188 * the client detects changes to file watched by the language client.
5189 */
5190var DidChangeWatchedFilesNotification;
5191(function (DidChangeWatchedFilesNotification) {
5192 DidChangeWatchedFilesNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWatchedFiles');
5193})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
5194/**
5195 * The file event type
5196 */
5197var FileChangeType;
5198(function (FileChangeType) {
5199 /**
5200 * The file got created.
5201 */
5202 FileChangeType.Created = 1;
5203 /**
5204 * The file got changed.
5205 */
5206 FileChangeType.Changed = 2;
5207 /**
5208 * The file got deleted.
5209 */
5210 FileChangeType.Deleted = 3;
5211})(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
5212var WatchKind;
5213(function (WatchKind) {
5214 /**
5215 * Interested in create events.
5216 */
5217 WatchKind.Create = 1;
5218 /**
5219 * Interested in change events
5220 */
5221 WatchKind.Change = 2;
5222 /**
5223 * Interested in delete events
5224 */
5225 WatchKind.Delete = 4;
5226})(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
5227//---- Diagnostic notification ----
5228/**
5229 * Diagnostics notification are sent from the server to the client to signal
5230 * results of validation runs.
5231 */
5232var PublishDiagnosticsNotification;
5233(function (PublishDiagnosticsNotification) {
5234 PublishDiagnosticsNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/publishDiagnostics');
5235})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
5236/**
5237 * How a completion was triggered
5238 */
5239var CompletionTriggerKind;
5240(function (CompletionTriggerKind) {
5241 /**
5242 * Completion was triggered by typing an identifier (24x7 code
5243 * complete), manual invocation (e.g Ctrl+Space) or via API.
5244 */
5245 CompletionTriggerKind.Invoked = 1;
5246 /**
5247 * Completion was triggered by a trigger character specified by
5248 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
5249 */
5250 CompletionTriggerKind.TriggerCharacter = 2;
5251 /**
5252 * Completion was re-triggered as current completion list is incomplete
5253 */
5254 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
5255})(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
5256/**
5257 * Request to request completion at a given text document position. The request's
5258 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
5259 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
5260 * or a Thenable that resolves to such.
5261 *
5262 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
5263 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
5264 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
5265 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
5266 */
5267var CompletionRequest;
5268(function (CompletionRequest) {
5269 CompletionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/completion');
5270})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
5271/**
5272 * Request to resolve additional information for a given completion item.The request's
5273 * parameter is of type [CompletionItem](#CompletionItem) the response
5274 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
5275 */
5276var CompletionResolveRequest;
5277(function (CompletionResolveRequest) {
5278 CompletionResolveRequest.type = new vscode_jsonrpc_1.RequestType('completionItem/resolve');
5279})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
5280//---- Hover Support -------------------------------
5281/**
5282 * Request to request hover information at a given text document position. The request's
5283 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
5284 * type [Hover](#Hover) or a Thenable that resolves to such.
5285 */
5286var HoverRequest;
5287(function (HoverRequest) {
5288 HoverRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/hover');
5289})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
5290var SignatureHelpRequest;
5291(function (SignatureHelpRequest) {
5292 SignatureHelpRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/signatureHelp');
5293})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
5294//---- Goto Definition -------------------------------------
5295/**
5296 * A request to resolve the definition location of a symbol at a given text
5297 * document position. The request's parameter is of type [TextDocumentPosition]
5298 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
5299 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
5300 * to such.
5301 */
5302var DefinitionRequest;
5303(function (DefinitionRequest) {
5304 DefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/definition');
5305})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
5306/**
5307 * A request to resolve project-wide references for the symbol denoted
5308 * by the given text document position. The request's parameter is of
5309 * type [ReferenceParams](#ReferenceParams) the response is of type
5310 * [Location[]](#Location) or a Thenable that resolves to such.
5311 */
5312var ReferencesRequest;
5313(function (ReferencesRequest) {
5314 ReferencesRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/references');
5315})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
5316//---- Document Highlight ----------------------------------
5317/**
5318 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
5319 * text document position. The request's parameter is of type [TextDocumentPosition]
5320 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
5321 * (#DocumentHighlight) or a Thenable that resolves to such.
5322 */
5323var DocumentHighlightRequest;
5324(function (DocumentHighlightRequest) {
5325 DocumentHighlightRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentHighlight');
5326})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
5327//---- Document Symbol Provider ---------------------------
5328/**
5329 * A request to list all symbols found in a given text document. The request's
5330 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
5331 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
5332 * that resolves to such.
5333 */
5334var DocumentSymbolRequest;
5335(function (DocumentSymbolRequest) {
5336 DocumentSymbolRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentSymbol');
5337})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
5338//---- Workspace Symbol Provider ---------------------------
5339/**
5340 * A request to list project-wide symbols matching the query string given
5341 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
5342 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
5343 * resolves to such.
5344 */
5345var WorkspaceSymbolRequest;
5346(function (WorkspaceSymbolRequest) {
5347 WorkspaceSymbolRequest.type = new vscode_jsonrpc_1.RequestType('workspace/symbol');
5348})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
5349/**
5350 * A request to provide commands for the given text document and range.
5351 */
5352var CodeActionRequest;
5353(function (CodeActionRequest) {
5354 CodeActionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeAction');
5355})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
5356/**
5357 * A request to provide code lens for the given text document.
5358 */
5359var CodeLensRequest;
5360(function (CodeLensRequest) {
5361 CodeLensRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeLens');
5362})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
5363/**
5364 * A request to resolve a command for a given code lens.
5365 */
5366var CodeLensResolveRequest;
5367(function (CodeLensResolveRequest) {
5368 CodeLensResolveRequest.type = new vscode_jsonrpc_1.RequestType('codeLens/resolve');
5369})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
5370/**
5371 * A request to to format a whole document.
5372 */
5373var DocumentFormattingRequest;
5374(function (DocumentFormattingRequest) {
5375 DocumentFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/formatting');
5376})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
5377/**
5378 * A request to to format a range in a document.
5379 */
5380var DocumentRangeFormattingRequest;
5381(function (DocumentRangeFormattingRequest) {
5382 DocumentRangeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rangeFormatting');
5383})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
5384/**
5385 * A request to format a document on type.
5386 */
5387var DocumentOnTypeFormattingRequest;
5388(function (DocumentOnTypeFormattingRequest) {
5389 DocumentOnTypeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/onTypeFormatting');
5390})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
5391/**
5392 * A request to rename a symbol.
5393 */
5394var RenameRequest;
5395(function (RenameRequest) {
5396 RenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rename');
5397})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
5398/**
5399 * A request to test and perform the setup necessary for a rename.
5400 */
5401var PrepareRenameRequest;
5402(function (PrepareRenameRequest) {
5403 PrepareRenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/prepareRename');
5404})(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
5405/**
5406 * A request to provide document links
5407 */
5408var DocumentLinkRequest;
5409(function (DocumentLinkRequest) {
5410 DocumentLinkRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentLink');
5411})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
5412/**
5413 * Request to resolve additional information for a given document link. The request's
5414 * parameter is of type [DocumentLink](#DocumentLink) the response
5415 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
5416 */
5417var DocumentLinkResolveRequest;
5418(function (DocumentLinkResolveRequest) {
5419 DocumentLinkResolveRequest.type = new vscode_jsonrpc_1.RequestType('documentLink/resolve');
5420})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
5421/**
5422 * A request send from the client to the server to execute a command. The request might return
5423 * a workspace edit which the client will apply to the workspace.
5424 */
5425var ExecuteCommandRequest;
5426(function (ExecuteCommandRequest) {
5427 ExecuteCommandRequest.type = new vscode_jsonrpc_1.RequestType('workspace/executeCommand');
5428})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
5429/**
5430 * A request sent from the server to the client to modified certain resources.
5431 */
5432var ApplyWorkspaceEditRequest;
5433(function (ApplyWorkspaceEditRequest) {
5434 ApplyWorkspaceEditRequest.type = new vscode_jsonrpc_1.RequestType('workspace/applyEdit');
5435})(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
5436
5437
5438/***/ }),
5439/* 22 */
5440/***/ (function(module, exports, __webpack_require__) {
5441
5442"use strict";
5443/* --------------------------------------------------------------------------------------------
5444 * Copyright (c) Microsoft Corporation. All rights reserved.
5445 * Licensed under the MIT License. See License.txt in the project root for license information.
5446 * ------------------------------------------------------------------------------------------ */
5447
5448Object.defineProperty(exports, "__esModule", { value: true });
5449function boolean(value) {
5450 return value === true || value === false;
5451}
5452exports.boolean = boolean;
5453function string(value) {
5454 return typeof value === 'string' || value instanceof String;
5455}
5456exports.string = string;
5457function number(value) {
5458 return typeof value === 'number' || value instanceof Number;
5459}
5460exports.number = number;
5461function error(value) {
5462 return value instanceof Error;
5463}
5464exports.error = error;
5465function func(value) {
5466 return typeof value === 'function';
5467}
5468exports.func = func;
5469function array(value) {
5470 return Array.isArray(value);
5471}
5472exports.array = array;
5473function stringArray(value) {
5474 return array(value) && value.every(elem => string(elem));
5475}
5476exports.stringArray = stringArray;
5477function typedArray(value, check) {
5478 return Array.isArray(value) && value.every(check);
5479}
5480exports.typedArray = typedArray;
5481function thenable(value) {
5482 return value && func(value.then);
5483}
5484exports.thenable = thenable;
5485
5486
5487/***/ }),
5488/* 23 */
5489/***/ (function(module, exports, __webpack_require__) {
5490
5491"use strict";
5492/* --------------------------------------------------------------------------------------------
5493 * Copyright (c) Microsoft Corporation. All rights reserved.
5494 * Licensed under the MIT License. See License.txt in the project root for license information.
5495 * ------------------------------------------------------------------------------------------ */
5496
5497Object.defineProperty(exports, "__esModule", { value: true });
5498const vscode_jsonrpc_1 = __webpack_require__(6);
5499// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5500let __noDynamicImport;
5501/**
5502 * A request to resolve the implementation locations of a symbol at a given text
5503 * document position. The request's parameter is of type [TextDocumentPositioParams]
5504 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5505 * Thenable that resolves to such.
5506 */
5507var ImplementationRequest;
5508(function (ImplementationRequest) {
5509 ImplementationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/implementation');
5510})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
5511
5512
5513/***/ }),
5514/* 24 */
5515/***/ (function(module, exports, __webpack_require__) {
5516
5517"use strict";
5518/* --------------------------------------------------------------------------------------------
5519 * Copyright (c) Microsoft Corporation. All rights reserved.
5520 * Licensed under the MIT License. See License.txt in the project root for license information.
5521 * ------------------------------------------------------------------------------------------ */
5522
5523Object.defineProperty(exports, "__esModule", { value: true });
5524const vscode_jsonrpc_1 = __webpack_require__(6);
5525// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5526let __noDynamicImport;
5527/**
5528 * A request to resolve the type definition locations of a symbol at a given text
5529 * document position. The request's parameter is of type [TextDocumentPositioParams]
5530 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5531 * Thenable that resolves to such.
5532 */
5533var TypeDefinitionRequest;
5534(function (TypeDefinitionRequest) {
5535 TypeDefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/typeDefinition');
5536})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
5537
5538
5539/***/ }),
5540/* 25 */
5541/***/ (function(module, exports, __webpack_require__) {
5542
5543"use strict";
5544/* --------------------------------------------------------------------------------------------
5545 * Copyright (c) Microsoft Corporation. All rights reserved.
5546 * Licensed under the MIT License. See License.txt in the project root for license information.
5547 * ------------------------------------------------------------------------------------------ */
5548
5549Object.defineProperty(exports, "__esModule", { value: true });
5550const vscode_jsonrpc_1 = __webpack_require__(6);
5551/**
5552 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
5553 */
5554var WorkspaceFoldersRequest;
5555(function (WorkspaceFoldersRequest) {
5556 WorkspaceFoldersRequest.type = new vscode_jsonrpc_1.RequestType0('workspace/workspaceFolders');
5557})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
5558/**
5559 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
5560 * folder configuration changes.
5561 */
5562var DidChangeWorkspaceFoldersNotification;
5563(function (DidChangeWorkspaceFoldersNotification) {
5564 DidChangeWorkspaceFoldersNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWorkspaceFolders');
5565})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
5566
5567
5568/***/ }),
5569/* 26 */
5570/***/ (function(module, exports, __webpack_require__) {
5571
5572"use strict";
5573/* --------------------------------------------------------------------------------------------
5574 * Copyright (c) Microsoft Corporation. All rights reserved.
5575 * Licensed under the MIT License. See License.txt in the project root for license information.
5576 * ------------------------------------------------------------------------------------------ */
5577
5578Object.defineProperty(exports, "__esModule", { value: true });
5579const vscode_jsonrpc_1 = __webpack_require__(6);
5580/**
5581 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
5582 * configuration setting.
5583 *
5584 * This pull model replaces the old push model were the client signaled configuration change via an
5585 * event. If the server still needs to react to configuration changes (since the server caches the
5586 * result of `workspace/configuration` requests) the server should register for an empty configuration
5587 * change event and empty the cache if such an event is received.
5588 */
5589var ConfigurationRequest;
5590(function (ConfigurationRequest) {
5591 ConfigurationRequest.type = new vscode_jsonrpc_1.RequestType('workspace/configuration');
5592})(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
5593
5594
5595/***/ }),
5596/* 27 */
5597/***/ (function(module, exports, __webpack_require__) {
5598
5599"use strict";
5600/* --------------------------------------------------------------------------------------------
5601 * Copyright (c) Microsoft Corporation. All rights reserved.
5602 * Licensed under the MIT License. See License.txt in the project root for license information.
5603 * ------------------------------------------------------------------------------------------ */
5604
5605Object.defineProperty(exports, "__esModule", { value: true });
5606const vscode_jsonrpc_1 = __webpack_require__(6);
5607/**
5608 * A request to list all color symbols found in a given text document. The request's
5609 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
5610 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
5611 * that resolves to such.
5612 */
5613var DocumentColorRequest;
5614(function (DocumentColorRequest) {
5615 DocumentColorRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentColor');
5616})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
5617/**
5618 * A request to list all presentation for a color. The request's
5619 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
5620 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
5621 * that resolves to such.
5622 */
5623var ColorPresentationRequest;
5624(function (ColorPresentationRequest) {
5625 ColorPresentationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/colorPresentation');
5626})(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
5627
5628
5629/***/ }),
5630/* 28 */
5631/***/ (function(module, exports, __webpack_require__) {
5632
5633"use strict";
5634
5635/*---------------------------------------------------------------------------------------------
5636 * Copyright (c) Microsoft Corporation. All rights reserved.
5637 * Licensed under the MIT License. See License.txt in the project root for license information.
5638 *--------------------------------------------------------------------------------------------*/
5639Object.defineProperty(exports, "__esModule", { value: true });
5640const vscode_jsonrpc_1 = __webpack_require__(6);
5641/**
5642 * Enum of known range kinds
5643 */
5644var FoldingRangeKind;
5645(function (FoldingRangeKind) {
5646 /**
5647 * Folding range for a comment
5648 */
5649 FoldingRangeKind["Comment"] = "comment";
5650 /**
5651 * Folding range for a imports or includes
5652 */
5653 FoldingRangeKind["Imports"] = "imports";
5654 /**
5655 * Folding range for a region (e.g. `#region`)
5656 */
5657 FoldingRangeKind["Region"] = "region";
5658})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
5659/**
5660 * A request to provide folding ranges in a document. The request's
5661 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
5662 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
5663 * that resolves to such.
5664 */
5665var FoldingRangeRequest;
5666(function (FoldingRangeRequest) {
5667 FoldingRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/foldingRange');
5668})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
5669
5670
5671/***/ }),
5672/* 29 */
5673/***/ (function(module, exports, __webpack_require__) {
5674
5675"use strict";
5676/* --------------------------------------------------------------------------------------------
5677 * Copyright (c) Microsoft Corporation. All rights reserved.
5678 * Licensed under the MIT License. See License.txt in the project root for license information.
5679 * ------------------------------------------------------------------------------------------ */
5680
5681Object.defineProperty(exports, "__esModule", { value: true });
5682const vscode_jsonrpc_1 = __webpack_require__(6);
5683// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5684let __noDynamicImport;
5685/**
5686 * A request to resolve the type definition locations of a symbol at a given text
5687 * document position. The request's parameter is of type [TextDocumentPositioParams]
5688 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
5689 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
5690 * to such.
5691 */
5692var DeclarationRequest;
5693(function (DeclarationRequest) {
5694 DeclarationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/declaration');
5695})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
5696
5697
5698/***/ }),
5699/* 30 */
5700/***/ (function(module, exports, __webpack_require__) {
5701
5702"use strict";
5703/* --------------------------------------------------------------------------------------------
5704 * Copyright (c) Microsoft Corporation. All rights reserved.
5705 * Licensed under the MIT License. See License.txt in the project root for license information.
5706 * ------------------------------------------------------------------------------------------ */
5707
5708Object.defineProperty(exports, "__esModule", { value: true });
5709const vscode_languageserver_protocol_1 = __webpack_require__(5);
5710const Is = __webpack_require__(31);
5711exports.ConfigurationFeature = (Base) => {
5712 return class extends Base {
5713 getConfiguration(arg) {
5714 if (!arg) {
5715 return this._getConfiguration({});
5716 }
5717 else if (Is.string(arg)) {
5718 return this._getConfiguration({ section: arg });
5719 }
5720 else {
5721 return this._getConfiguration(arg);
5722 }
5723 }
5724 _getConfiguration(arg) {
5725 let params = {
5726 items: Array.isArray(arg) ? arg : [arg]
5727 };
5728 return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
5729 return Array.isArray(arg) ? result : result[0];
5730 });
5731 }
5732 };
5733};
5734
5735
5736/***/ }),
5737/* 31 */
5738/***/ (function(module, exports, __webpack_require__) {
5739
5740"use strict";
5741/* --------------------------------------------------------------------------------------------
5742 * Copyright (c) Microsoft Corporation. All rights reserved.
5743 * Licensed under the MIT License. See License.txt in the project root for license information.
5744 * ------------------------------------------------------------------------------------------ */
5745
5746Object.defineProperty(exports, "__esModule", { value: true });
5747function boolean(value) {
5748 return value === true || value === false;
5749}
5750exports.boolean = boolean;
5751function string(value) {
5752 return typeof value === 'string' || value instanceof String;
5753}
5754exports.string = string;
5755function number(value) {
5756 return typeof value === 'number' || value instanceof Number;
5757}
5758exports.number = number;
5759function error(value) {
5760 return value instanceof Error;
5761}
5762exports.error = error;
5763function func(value) {
5764 return typeof value === 'function';
5765}
5766exports.func = func;
5767function array(value) {
5768 return Array.isArray(value);
5769}
5770exports.array = array;
5771function stringArray(value) {
5772 return array(value) && value.every(elem => string(elem));
5773}
5774exports.stringArray = stringArray;
5775function typedArray(value, check) {
5776 return Array.isArray(value) && value.every(check);
5777}
5778exports.typedArray = typedArray;
5779function thenable(value) {
5780 return value && func(value.then);
5781}
5782exports.thenable = thenable;
5783
5784
5785/***/ }),
5786/* 32 */
5787/***/ (function(module, exports, __webpack_require__) {
5788
5789"use strict";
5790/* --------------------------------------------------------------------------------------------
5791 * Copyright (c) Microsoft Corporation. All rights reserved.
5792 * Licensed under the MIT License. See License.txt in the project root for license information.
5793 * ------------------------------------------------------------------------------------------ */
5794
5795Object.defineProperty(exports, "__esModule", { value: true });
5796const vscode_languageserver_protocol_1 = __webpack_require__(5);
5797exports.WorkspaceFoldersFeature = (Base) => {
5798 return class extends Base {
5799 initialize(capabilities) {
5800 let workspaceCapabilities = capabilities.workspace;
5801 if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
5802 this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
5803 this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
5804 this._onDidChangeWorkspaceFolders.fire(params.event);
5805 });
5806 }
5807 }
5808 getWorkspaceFolders() {
5809 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
5810 }
5811 get onDidChangeWorkspaceFolders() {
5812 if (!this._onDidChangeWorkspaceFolders) {
5813 throw new Error('Client doesn\'t support sending workspace folder change events.');
5814 }
5815 if (!this._unregistration) {
5816 this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
5817 }
5818 return this._onDidChangeWorkspaceFolders.event;
5819 }
5820 };
5821};
5822
5823
5824/***/ }),
5825/* 33 */
5826/***/ (function(module, exports, __webpack_require__) {
5827
5828"use strict";
5829/*---------------------------------------------------------------------------------------------
5830 * Copyright (c) Microsoft Corporation. All rights reserved.
5831 * Licensed under the MIT License. See License.txt in the project root for license information.
5832 *--------------------------------------------------------------------------------------------*/
5833
5834Object.defineProperty(exports, "__esModule", { value: true });
5835class ValueUUID {
5836 constructor(_value) {
5837 this._value = _value;
5838 // empty
5839 }
5840 asHex() {
5841 return this._value;
5842 }
5843 equals(other) {
5844 return this.asHex() === other.asHex();
5845 }
5846}
5847class V4UUID extends ValueUUID {
5848 constructor() {
5849 super([
5850 V4UUID._randomHex(),
5851 V4UUID._randomHex(),
5852 V4UUID._randomHex(),
5853 V4UUID._randomHex(),
5854 V4UUID._randomHex(),
5855 V4UUID._randomHex(),
5856 V4UUID._randomHex(),
5857 V4UUID._randomHex(),
5858 '-',
5859 V4UUID._randomHex(),
5860 V4UUID._randomHex(),
5861 V4UUID._randomHex(),
5862 V4UUID._randomHex(),
5863 '-',
5864 '4',
5865 V4UUID._randomHex(),
5866 V4UUID._randomHex(),
5867 V4UUID._randomHex(),
5868 '-',
5869 V4UUID._oneOf(V4UUID._timeHighBits),
5870 V4UUID._randomHex(),
5871 V4UUID._randomHex(),
5872 V4UUID._randomHex(),
5873 '-',
5874 V4UUID._randomHex(),
5875 V4UUID._randomHex(),
5876 V4UUID._randomHex(),
5877 V4UUID._randomHex(),
5878 V4UUID._randomHex(),
5879 V4UUID._randomHex(),
5880 V4UUID._randomHex(),
5881 V4UUID._randomHex(),
5882 V4UUID._randomHex(),
5883 V4UUID._randomHex(),
5884 V4UUID._randomHex(),
5885 V4UUID._randomHex(),
5886 ].join(''));
5887 }
5888 static _oneOf(array) {
5889 return array[Math.floor(array.length * Math.random())];
5890 }
5891 static _randomHex() {
5892 return V4UUID._oneOf(V4UUID._chars);
5893 }
5894}
5895V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
5896V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
5897/**
5898 * An empty UUID that contains only zeros.
5899 */
5900exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
5901function v4() {
5902 return new V4UUID();
5903}
5904exports.v4 = v4;
5905const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
5906function isUUID(value) {
5907 return _UUIDPattern.test(value);
5908}
5909exports.isUUID = isUUID;
5910/**
5911 * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
5912 * @param value A uuid string.
5913 */
5914function parse(value) {
5915 if (!isUUID(value)) {
5916 throw new Error('invalid uuid');
5917 }
5918 return new ValueUUID(value);
5919}
5920exports.parse = parse;
5921function generateUuid() {
5922 return v4().asHex();
5923}
5924exports.generateUuid = generateUuid;
5925
5926
5927/***/ }),
5928/* 34 */
5929/***/ (function(module, exports, __webpack_require__) {
5930
5931"use strict";
5932/* --------------------------------------------------------------------------------------------
5933 * Copyright (c) Microsoft Corporation. All rights reserved.
5934 * Licensed under the MIT License. See License.txt in the project root for license information.
5935 * ------------------------------------------------------------------------------------------ */
5936
5937Object.defineProperty(exports, "__esModule", { value: true });
5938const url = __webpack_require__(35);
5939const path = __webpack_require__(15);
5940const fs = __webpack_require__(36);
5941const child_process_1 = __webpack_require__(37);
5942/**
5943 * @deprecated Use the `vscode-uri` npm module which provides a more
5944 * complete implementation of handling VS Code URIs.
5945 */
5946function uriToFilePath(uri) {
5947 let parsed = url.parse(uri);
5948 if (parsed.protocol !== 'file:' || !parsed.path) {
5949 return undefined;
5950 }
5951 let segments = parsed.path.split('/');
5952 for (var i = 0, len = segments.length; i < len; i++) {
5953 segments[i] = decodeURIComponent(segments[i]);
5954 }
5955 if (process.platform === 'win32' && segments.length > 1) {
5956 let first = segments[0];
5957 let second = segments[1];
5958 // Do we have a drive letter and we started with a / which is the
5959 // case if the first segement is empty (see split above)
5960 if (first.length === 0 && second.length > 1 && second[1] === ':') {
5961 // Remove first slash
5962 segments.shift();
5963 }
5964 }
5965 return path.normalize(segments.join('/'));
5966}
5967exports.uriToFilePath = uriToFilePath;
5968function isWindows() {
5969 return process.platform === 'win32';
5970}
5971function resolveModule(workspaceRoot, moduleName) {
5972 let nodePathKey = 'NODE_PATH';
5973 return new Promise((resolve, reject) => {
5974 let nodePath = [];
5975 if (workspaceRoot) {
5976 nodePath.push(path.join(workspaceRoot, 'node_modules'));
5977 }
5978 child_process_1.exec('npm config get prefix', (error, stdout, _stderr) => {
5979 if (!error) {
5980 let globalPath = stdout.replace(/[\s\r\n]+$/, '');
5981 if (globalPath.length > 0) {
5982 if (isWindows()) {
5983 nodePath.push(path.join(globalPath, 'node_modules'));
5984 }
5985 else {
5986 nodePath.push(path.join(globalPath, 'lib', 'node_modules'));
5987 }
5988 }
5989 }
5990 let separator = isWindows() ? ';' : ':';
5991 let env = process.env;
5992 let newEnv = Object.create(null);
5993 Object.keys(env).forEach(key => newEnv[key] = env[key]);
5994 if (newEnv[nodePathKey]) {
5995 newEnv[nodePathKey] = nodePath.join(separator) + separator + newEnv[nodePathKey];
5996 }
5997 else {
5998 newEnv[nodePathKey] = nodePath.join(separator);
5999 }
6000 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
6001 try {
6002 let cp = child_process_1.fork(path.join(__dirname, 'resolve.js'), [], { env: newEnv, execArgv: [] });
6003 if (cp.pid === void 0) {
6004 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
6005 return;
6006 }
6007 cp.on('message', (message) => {
6008 if (message.command === 'resolve') {
6009 let toRequire = moduleName;
6010 if (message.success) {
6011 toRequire = message.result;
6012 }
6013 cp.send({ command: 'exit' });
6014 try {
6015 resolve(__webpack_require__(38)(toRequire));
6016 }
6017 catch (error) {
6018 reject(error);
6019 }
6020 }
6021 });
6022 let message = {
6023 command: 'resolve',
6024 args: moduleName
6025 };
6026 cp.send(message);
6027 }
6028 catch (error) {
6029 reject(error);
6030 }
6031 });
6032 });
6033}
6034exports.resolveModule = resolveModule;
6035function resolve(moduleName, nodePath, cwd, tracer) {
6036 const nodePathKey = 'NODE_PATH';
6037 const app = [
6038 "var p = process;",
6039 "p.on('message',function(m){",
6040 "if(m.c==='e'){",
6041 "p.exit(0);",
6042 "}",
6043 "else if(m.c==='rs'){",
6044 "try{",
6045 "var r=require.resolve(m.a);",
6046 "p.send({c:'r',s:true,r:r});",
6047 "}",
6048 "catch(err){",
6049 "p.send({c:'r',s:false});",
6050 "}",
6051 "}",
6052 "});"
6053 ].join('');
6054 return new Promise((resolve, reject) => {
6055 let env = process.env;
6056 let newEnv = Object.create(null);
6057 Object.keys(env).forEach(key => newEnv[key] = env[key]);
6058 if (nodePath) {
6059 if (newEnv[nodePathKey]) {
6060 newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
6061 }
6062 else {
6063 newEnv[nodePathKey] = nodePath;
6064 }
6065 if (tracer) {
6066 tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
6067 }
6068 }
6069 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
6070 try {
6071 let cp = child_process_1.fork('', [], {
6072 cwd: cwd,
6073 env: newEnv,
6074 execArgv: ['-e', app]
6075 });
6076 if (cp.pid === void 0) {
6077 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
6078 return;
6079 }
6080 cp.on('error', (error) => {
6081 reject(error);
6082 });
6083 cp.on('message', (message) => {
6084 if (message.c === 'r') {
6085 cp.send({ c: 'e' });
6086 if (message.s) {
6087 resolve(message.r);
6088 }
6089 else {
6090 reject(new Error(`Failed to resolve module: ${moduleName}`));
6091 }
6092 }
6093 });
6094 let message = {
6095 c: 'rs',
6096 a: moduleName
6097 };
6098 cp.send(message);
6099 }
6100 catch (error) {
6101 reject(error);
6102 }
6103 });
6104}
6105exports.resolve = resolve;
6106function resolveGlobalNodePath(tracer) {
6107 let npmCommand = 'npm';
6108 let options = {
6109 encoding: 'utf8'
6110 };
6111 if (isWindows()) {
6112 npmCommand = 'npm.cmd';
6113 options.shell = true;
6114 }
6115 let handler = () => { };
6116 try {
6117 process.on('SIGPIPE', handler);
6118 let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
6119 if (!stdout) {
6120 if (tracer) {
6121 tracer(`'npm config get prefix' didn't return a value.`);
6122 }
6123 return undefined;
6124 }
6125 let prefix = stdout.trim();
6126 if (tracer) {
6127 tracer(`'npm config get prefix' value is: ${prefix}`);
6128 }
6129 if (prefix.length > 0) {
6130 if (isWindows()) {
6131 return path.join(prefix, 'node_modules');
6132 }
6133 else {
6134 return path.join(prefix, 'lib', 'node_modules');
6135 }
6136 }
6137 return undefined;
6138 }
6139 catch (err) {
6140 return undefined;
6141 }
6142 finally {
6143 process.removeListener('SIGPIPE', handler);
6144 }
6145}
6146exports.resolveGlobalNodePath = resolveGlobalNodePath;
6147function resolveGlobalYarnPath(tracer) {
6148 let yarnCommand = 'yarn';
6149 let options = {
6150 encoding: 'utf8'
6151 };
6152 if (isWindows()) {
6153 yarnCommand = 'yarn.cmd';
6154 options.shell = true;
6155 }
6156 let handler = () => { };
6157 try {
6158 process.on('SIGPIPE', handler);
6159 let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
6160 let stdout = results.stdout;
6161 if (!stdout) {
6162 if (tracer) {
6163 tracer(`'yarn global dir' didn't return a value.`);
6164 if (results.stderr) {
6165 tracer(results.stderr);
6166 }
6167 }
6168 return undefined;
6169 }
6170 let lines = stdout.trim().split(/\r?\n/);
6171 for (let line of lines) {
6172 try {
6173 let yarn = JSON.parse(line);
6174 if (yarn.type === 'log') {
6175 return path.join(yarn.data, 'node_modules');
6176 }
6177 }
6178 catch (e) {
6179 // Do nothing. Ignore the line
6180 }
6181 }
6182 return undefined;
6183 }
6184 catch (err) {
6185 return undefined;
6186 }
6187 finally {
6188 process.removeListener('SIGPIPE', handler);
6189 }
6190}
6191exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
6192var FileSystem;
6193(function (FileSystem) {
6194 let _isCaseSensitive = undefined;
6195 function isCaseSensitive() {
6196 if (_isCaseSensitive !== void 0) {
6197 return _isCaseSensitive;
6198 }
6199 if (process.platform === 'win32') {
6200 _isCaseSensitive = false;
6201 }
6202 else {
6203 // convert current file name to upper case / lower case and check if file exists
6204 // (guards against cases when name is already all uppercase or lowercase)
6205 _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
6206 }
6207 return _isCaseSensitive;
6208 }
6209 FileSystem.isCaseSensitive = isCaseSensitive;
6210 function isParent(parent, child) {
6211 if (isCaseSensitive()) {
6212 return path.normalize(child).indexOf(path.normalize(parent)) === 0;
6213 }
6214 else {
6215 return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) == 0;
6216 }
6217 }
6218 FileSystem.isParent = isParent;
6219})(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
6220function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
6221 if (nodePath) {
6222 if (!path.isAbsolute(nodePath)) {
6223 nodePath = path.join(workspaceRoot, nodePath);
6224 }
6225 return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
6226 if (FileSystem.isParent(nodePath, value)) {
6227 return value;
6228 }
6229 else {
6230 return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
6231 }
6232 }).then(undefined, (_error) => {
6233 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6234 });
6235 }
6236 else {
6237 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6238 }
6239}
6240exports.resolveModulePath = resolveModulePath;
6241/**
6242 * Resolves the given module relative to the given workspace root. In contrast to
6243 * `resolveModule` this method considers the parent chain as well.
6244 */
6245function resolveModule2(workspaceRoot, moduleName, nodePath, tracer) {
6246 return resolveModulePath(workspaceRoot, moduleName, nodePath, tracer).then((path) => {
6247 if (tracer) {
6248 tracer(`Module ${moduleName} got resolved to ${path}`);
6249 }
6250 return __webpack_require__(38)(path);
6251 });
6252}
6253exports.resolveModule2 = resolveModule2;
6254
6255
6256/***/ }),
6257/* 35 */
6258/***/ (function(module, exports) {
6259
6260module.exports = require("url");
6261
6262/***/ }),
6263/* 36 */
6264/***/ (function(module, exports) {
6265
6266module.exports = require("fs");
6267
6268/***/ }),
6269/* 37 */
6270/***/ (function(module, exports) {
6271
6272module.exports = require("child_process");
6273
6274/***/ }),
6275/* 38 */
6276/***/ (function(module, exports) {
6277
6278function webpackEmptyContext(req) {
6279 var e = new Error("Cannot find module '" + req + "'");
6280 e.code = 'MODULE_NOT_FOUND';
6281 throw e;
6282}
6283webpackEmptyContext.keys = function() { return []; };
6284webpackEmptyContext.resolve = webpackEmptyContext;
6285module.exports = webpackEmptyContext;
6286webpackEmptyContext.id = 38;
6287
6288/***/ }),
6289/* 39 */,
6290/* 40 */
6291/***/ (function(module, exports, __webpack_require__) {
6292
6293"use strict";
6294
6295var __assign = (this && this.__assign) || function () {
6296 __assign = Object.assign || function(t) {
6297 for (var s, i = 1, n = arguments.length; i < n; i++) {
6298 s = arguments[i];
6299 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6300 t[p] = s[p];
6301 }
6302 return t;
6303 };
6304 return __assign.apply(this, arguments);
6305};
6306var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6307 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6308 return new (P || (P = Promise))(function (resolve, reject) {
6309 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6310 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6311 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6312 step((generator = generator.apply(thisArg, _arguments || [])).next());
6313 });
6314};
6315var __generator = (this && this.__generator) || function (thisArg, body) {
6316 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
6317 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
6318 function verb(n) { return function (v) { return step([n, v]); }; }
6319 function step(op) {
6320 if (f) throw new TypeError("Generator is already executing.");
6321 while (_) try {
6322 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;
6323 if (y = 0, t) op = [op[0] & 2, t.value];
6324 switch (op[0]) {
6325 case 0: case 1: t = op; break;
6326 case 4: _.label++; return { value: op[1], done: false };
6327 case 5: _.label++; y = op[1]; op = [0]; continue;
6328 case 7: op = _.ops.pop(); _.trys.pop(); continue;
6329 default:
6330 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
6331 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
6332 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
6333 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
6334 if (t[2]) _.ops.pop();
6335 _.trys.pop(); continue;
6336 }
6337 op = body.call(thisArg, _);
6338 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
6339 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
6340 }
6341};
6342var __spreadArrays = (this && this.__spreadArrays) || function () {
6343 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
6344 for (var r = Array(s), k = 0, i = 0; i < il; i++)
6345 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
6346 r[k] = a[j];
6347 return r;
6348};
6349var __importDefault = (this && this.__importDefault) || function (mod) {
6350 return (mod && mod.__esModule) ? mod : { "default": mod };
6351};
6352Object.defineProperty(exports, "__esModule", { value: true });
6353var child_process_1 = __webpack_require__(37);
6354var findup_1 = __importDefault(__webpack_require__(41));
6355var fs_1 = __importDefault(__webpack_require__(36));
6356var path_1 = __importDefault(__webpack_require__(15));
6357var vscode_languageserver_1 = __webpack_require__(4);
6358var vimparser_1 = __webpack_require__(46);
6359var patterns_1 = __webpack_require__(48);
6360function isSomeMatchPattern(patterns, line) {
6361 return patterns.some(function (p) { return p.test(line); });
6362}
6363exports.isSomeMatchPattern = isSomeMatchPattern;
6364function executeFile(input, command, args, option) {
6365 return new Promise(function (resolve, reject) {
6366 var stdout = "";
6367 var stderr = "";
6368 var error;
6369 var isPassAsText = false;
6370 args = (args || []).map(function (arg) {
6371 if (/%text/.test(arg)) {
6372 isPassAsText = true;
6373 return arg.replace(/%text/g, input.toString());
6374 }
6375 return arg;
6376 });
6377 var cp = child_process_1.spawn(command, args, option);
6378 cp.stdout.on("data", function (data) {
6379 stdout += data;
6380 });
6381 cp.stderr.on("data", function (data) {
6382 stderr += data;
6383 });
6384 cp.on("error", function (err) {
6385 error = err;
6386 reject(error);
6387 });
6388 cp.on("close", function (code) {
6389 if (!error) {
6390 resolve({ code: code, stdout: stdout, stderr: stderr });
6391 }
6392 });
6393 // error will occur when cp get error
6394 if (!isPassAsText) {
6395 input.pipe(cp.stdin).on("error", function () { return; });
6396 }
6397 });
6398}
6399exports.executeFile = executeFile;
6400// cover cb type async function to promise
6401function pcb(cb) {
6402 return function () {
6403 var args = [];
6404 for (var _i = 0; _i < arguments.length; _i++) {
6405 args[_i] = arguments[_i];
6406 }
6407 return new Promise(function (resolve) {
6408 cb.apply(void 0, __spreadArrays(args, [function () {
6409 var params = [];
6410 for (var _i = 0; _i < arguments.length; _i++) {
6411 params[_i] = arguments[_i];
6412 }
6413 resolve(params);
6414 }]));
6415 });
6416 };
6417}
6418exports.pcb = pcb;
6419// find work dirname by root patterns
6420function findProjectRoot(filePath, rootPatterns) {
6421 return __awaiter(this, void 0, void 0, function () {
6422 var dirname, patterns, dirCandidate, _i, patterns_2, pattern, _a, err, dir;
6423 return __generator(this, function (_b) {
6424 switch (_b.label) {
6425 case 0:
6426 dirname = path_1.default.dirname(filePath);
6427 patterns = [].concat(rootPatterns);
6428 dirCandidate = "";
6429 _i = 0, patterns_2 = patterns;
6430 _b.label = 1;
6431 case 1:
6432 if (!(_i < patterns_2.length)) return [3 /*break*/, 4];
6433 pattern = patterns_2[_i];
6434 return [4 /*yield*/, pcb(findup_1.default)(dirname, pattern)];
6435 case 2:
6436 _a = _b.sent(), err = _a[0], dir = _a[1];
6437 if (!err && dir && dir !== "/" && dir.length > dirCandidate.length) {
6438 dirCandidate = dir;
6439 }
6440 _b.label = 3;
6441 case 3:
6442 _i++;
6443 return [3 /*break*/, 1];
6444 case 4:
6445 if (dirCandidate.length) {
6446 return [2 /*return*/, dirCandidate];
6447 }
6448 return [2 /*return*/, dirname];
6449 }
6450 });
6451 });
6452}
6453exports.findProjectRoot = findProjectRoot;
6454function markupSnippets(snippets) {
6455 return [
6456 "```vim",
6457 snippets.replace(/\$\{[0-9]+(:([^}]+))?\}/g, "$2"),
6458 "```",
6459 ].join("\n");
6460}
6461exports.markupSnippets = markupSnippets;
6462function getWordFromPosition(doc, position) {
6463 if (!doc) {
6464 return;
6465 }
6466 var character = doc.getText(vscode_languageserver_1.Range.create(vscode_languageserver_1.Position.create(position.line, position.character), vscode_languageserver_1.Position.create(position.line, position.character + 1)));
6467 // not keyword position
6468 if (!character || !patterns_1.keywordPattern.test(character)) {
6469 return;
6470 }
6471 var currentLine = doc.getText(vscode_languageserver_1.Range.create(vscode_languageserver_1.Position.create(position.line, 0), vscode_languageserver_1.Position.create(position.line + 1, 0)));
6472 // comment line
6473 if (patterns_1.commentPattern.test(currentLine)) {
6474 return;
6475 }
6476 var preSegment = currentLine.slice(0, position.character);
6477 var nextSegment = currentLine.slice(position.character);
6478 var wordLeft = preSegment.match(patterns_1.wordPrePattern);
6479 var wordRight = nextSegment.match(patterns_1.wordNextPattern);
6480 var word = "" + (wordLeft && wordLeft[1] || "") + (wordRight && wordRight[1] || "");
6481 return {
6482 word: word,
6483 left: wordLeft && wordLeft[1] || "",
6484 right: wordRight && wordRight[1] || "",
6485 wordLeft: wordLeft && wordLeft[1]
6486 ? preSegment.replace(new RegExp(wordLeft[1] + "$"), word)
6487 : "" + preSegment + word,
6488 wordRight: wordRight && wordRight[1]
6489 ? nextSegment.replace(new RegExp("^" + wordRight[1]), word)
6490 : "" + word + nextSegment,
6491 };
6492}
6493exports.getWordFromPosition = getWordFromPosition;
6494// parse vim buffer
6495function handleParse(textDoc) {
6496 return __awaiter(this, void 0, void 0, function () {
6497 var text, tokens, node;
6498 return __generator(this, function (_a) {
6499 text = textDoc instanceof Object ? textDoc.getText() : textDoc;
6500 tokens = new vimparser_1.StringReader(text.split(/\r\n|\r|\n/));
6501 try {
6502 node = new vimparser_1.VimLParser(true).parse(tokens);
6503 return [2 /*return*/, [node, ""]];
6504 }
6505 catch (error) {
6506 return [2 /*return*/, [null, error]];
6507 }
6508 return [2 /*return*/];
6509 });
6510 });
6511}
6512exports.handleParse = handleParse;
6513// remove snippets of completionItem
6514function removeSnippets(completionItems) {
6515 if (completionItems === void 0) { completionItems = []; }
6516 return completionItems.map(function (item) {
6517 if (item.insertTextFormat === vscode_languageserver_1.InsertTextFormat.Snippet) {
6518 return __assign(__assign({}, item), { insertText: item.label, insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText });
6519 }
6520 return item;
6521 });
6522}
6523exports.removeSnippets = removeSnippets;
6524exports.isSymbolLink = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
6525 return __generator(this, function (_a) {
6526 return [2 /*return*/, new Promise(function (resolve) {
6527 fs_1.default.lstat(filePath, function (err, stats) {
6528 resolve({
6529 err: err,
6530 stats: stats && stats.isSymbolicLink(),
6531 });
6532 });
6533 })];
6534 });
6535}); };
6536exports.getRealPath = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
6537 var _a, err, stats;
6538 return __generator(this, function (_b) {
6539 switch (_b.label) {
6540 case 0: return [4 /*yield*/, exports.isSymbolLink(filePath)];
6541 case 1:
6542 _a = _b.sent(), err = _a.err, stats = _a.stats;
6543 if (!err && stats) {
6544 return [2 /*return*/, new Promise(function (resolve) {
6545 fs_1.default.realpath(filePath, function (error, realPath) {
6546 if (error) {
6547 return resolve(filePath);
6548 }
6549 resolve(realPath);
6550 });
6551 })];
6552 }
6553 return [2 /*return*/, filePath];
6554 }
6555 });
6556}); };
6557
6558
6559/***/ }),
6560/* 41 */
6561/***/ (function(module, exports, __webpack_require__) {
6562
6563var fs = __webpack_require__(36),
6564 Path = __webpack_require__(15),
6565 util = __webpack_require__(42),
6566 colors = __webpack_require__(43),
6567 EE = __webpack_require__(45).EventEmitter,
6568 fsExists = fs.exists ? fs.exists : Path.exists,
6569 fsExistsSync = fs.existsSync ? fs.existsSync : Path.existsSync;
6570
6571module.exports = function(dir, iterator, options, callback){
6572 return FindUp(dir, iterator, options, callback);
6573};
6574
6575function FindUp(dir, iterator, options, callback){
6576 if (!(this instanceof FindUp)) {
6577 return new FindUp(dir, iterator, options, callback);
6578 }
6579 if(typeof options === 'function'){
6580 callback = options;
6581 options = {};
6582 }
6583 options = options || {};
6584
6585 EE.call(this);
6586 this.found = false;
6587 this.stopPlease = false;
6588 var self = this;
6589
6590 if(typeof iterator === 'string'){
6591 var file = iterator;
6592 iterator = function(dir, cb){
6593 return fsExists(Path.join(dir, file), cb);
6594 };
6595 }
6596
6597 if(callback) {
6598 this.on('found', function(dir){
6599 if(options.verbose) console.log(('found '+ dir ).green);
6600 callback(null, dir);
6601 self.stop();
6602 });
6603
6604 this.on('end', function(){
6605 if(options.verbose) console.log('end'.grey);
6606 if(!self.found) callback(new Error('not found'));
6607 });
6608
6609 this.on('error', function(err){
6610 if(options.verbose) console.log('error'.red, err);
6611 callback(err);
6612 });
6613 }
6614
6615 this._find(dir, iterator, options, callback);
6616}
6617util.inherits(FindUp, EE);
6618
6619FindUp.prototype._find = function(dir, iterator, options, callback){
6620 var self = this;
6621
6622 iterator(dir, function(exists){
6623 if(options.verbose) console.log(('traverse '+ dir).grey);
6624 if(exists) {
6625 self.found = true;
6626 self.emit('found', dir);
6627 }
6628
6629 var parentDir = Path.join(dir, '..');
6630 if (self.stopPlease) return self.emit('end');
6631 if (dir === parentDir) return self.emit('end');
6632 if(dir.indexOf('../../') !== -1 ) return self.emit('error', new Error(dir + ' is not correct.'));
6633 self._find(parentDir, iterator, options, callback);
6634 });
6635};
6636
6637FindUp.prototype.stop = function(){
6638 this.stopPlease = true;
6639};
6640
6641module.exports.FindUp = FindUp;
6642
6643module.exports.sync = function(dir, iteratorSync){
6644 if(typeof iteratorSync === 'string'){
6645 var file = iteratorSync;
6646 iteratorSync = function(dir){
6647 return fsExistsSync(Path.join(dir, file));
6648 };
6649 }
6650 var initialDir = dir;
6651 while(dir !== Path.join(dir, '..')){
6652 if(dir.indexOf('../../') !== -1 ) throw new Error(initialDir + ' is not correct.');
6653 if(iteratorSync(dir)) return dir;
6654 dir = Path.join(dir, '..');
6655 }
6656 throw new Error('not found');
6657};
6658
6659
6660/***/ }),
6661/* 42 */
6662/***/ (function(module, exports) {
6663
6664module.exports = require("util");
6665
6666/***/ }),
6667/* 43 */
6668/***/ (function(module, exports, __webpack_require__) {
6669
6670/*
6671colors.js
6672
6673Copyright (c) 2010
6674
6675Marak Squires
6676Alexis Sellier (cloudhead)
6677
6678Permission is hereby granted, free of charge, to any person obtaining a copy
6679of this software and associated documentation files (the "Software"), to deal
6680in the Software without restriction, including without limitation the rights
6681to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6682copies of the Software, and to permit persons to whom the Software is
6683furnished to do so, subject to the following conditions:
6684
6685The above copyright notice and this permission notice shall be included in
6686all copies or substantial portions of the Software.
6687
6688THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6689IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6690FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6691AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
6692LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
6693OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
6694THE SOFTWARE.
6695
6696*/
6697
6698var isHeadless = false;
6699
6700if (typeof module !== 'undefined') {
6701 isHeadless = true;
6702}
6703
6704if (!isHeadless) {
6705 var exports = {};
6706 var module = {};
6707 var colors = exports;
6708 exports.mode = "browser";
6709} else {
6710 exports.mode = "console";
6711}
6712
6713//
6714// Prototypes the string object to have additional method calls that add terminal colors
6715//
6716var addProperty = function (color, func) {
6717 exports[color] = function (str) {
6718 return func.apply(str);
6719 };
6720 String.prototype.__defineGetter__(color, func);
6721};
6722
6723function stylize(str, style) {
6724
6725 var styles;
6726
6727 if (exports.mode === 'console') {
6728 styles = {
6729 //styles
6730 'bold' : ['\x1B[1m', '\x1B[22m'],
6731 'italic' : ['\x1B[3m', '\x1B[23m'],
6732 'underline' : ['\x1B[4m', '\x1B[24m'],
6733 'inverse' : ['\x1B[7m', '\x1B[27m'],
6734 'strikethrough' : ['\x1B[9m', '\x1B[29m'],
6735 //text colors
6736 //grayscale
6737 'white' : ['\x1B[37m', '\x1B[39m'],
6738 'grey' : ['\x1B[90m', '\x1B[39m'],
6739 'black' : ['\x1B[30m', '\x1B[39m'],
6740 //colors
6741 'blue' : ['\x1B[34m', '\x1B[39m'],
6742 'cyan' : ['\x1B[36m', '\x1B[39m'],
6743 'green' : ['\x1B[32m', '\x1B[39m'],
6744 'magenta' : ['\x1B[35m', '\x1B[39m'],
6745 'red' : ['\x1B[31m', '\x1B[39m'],
6746 'yellow' : ['\x1B[33m', '\x1B[39m'],
6747 //background colors
6748 //grayscale
6749 'whiteBG' : ['\x1B[47m', '\x1B[49m'],
6750 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'],
6751 'blackBG' : ['\x1B[40m', '\x1B[49m'],
6752 //colors
6753 'blueBG' : ['\x1B[44m', '\x1B[49m'],
6754 'cyanBG' : ['\x1B[46m', '\x1B[49m'],
6755 'greenBG' : ['\x1B[42m', '\x1B[49m'],
6756 'magentaBG' : ['\x1B[45m', '\x1B[49m'],
6757 'redBG' : ['\x1B[41m', '\x1B[49m'],
6758 'yellowBG' : ['\x1B[43m', '\x1B[49m']
6759 };
6760 } else if (exports.mode === 'browser') {
6761 styles = {
6762 //styles
6763 'bold' : ['<b>', '</b>'],
6764 'italic' : ['<i>', '</i>'],
6765 'underline' : ['<u>', '</u>'],
6766 'inverse' : ['<span style="background-color:black;color:white;">', '</span>'],
6767 'strikethrough' : ['<del>', '</del>'],
6768 //text colors
6769 //grayscale
6770 'white' : ['<span style="color:white;">', '</span>'],
6771 'grey' : ['<span style="color:gray;">', '</span>'],
6772 'black' : ['<span style="color:black;">', '</span>'],
6773 //colors
6774 'blue' : ['<span style="color:blue;">', '</span>'],
6775 'cyan' : ['<span style="color:cyan;">', '</span>'],
6776 'green' : ['<span style="color:green;">', '</span>'],
6777 'magenta' : ['<span style="color:magenta;">', '</span>'],
6778 'red' : ['<span style="color:red;">', '</span>'],
6779 'yellow' : ['<span style="color:yellow;">', '</span>'],
6780 //background colors
6781 //grayscale
6782 'whiteBG' : ['<span style="background-color:white;">', '</span>'],
6783 'greyBG' : ['<span style="background-color:gray;">', '</span>'],
6784 'blackBG' : ['<span style="background-color:black;">', '</span>'],
6785 //colors
6786 'blueBG' : ['<span style="background-color:blue;">', '</span>'],
6787 'cyanBG' : ['<span style="background-color:cyan;">', '</span>'],
6788 'greenBG' : ['<span style="background-color:green;">', '</span>'],
6789 'magentaBG' : ['<span style="background-color:magenta;">', '</span>'],
6790 'redBG' : ['<span style="background-color:red;">', '</span>'],
6791 'yellowBG' : ['<span style="background-color:yellow;">', '</span>']
6792 };
6793 } else if (exports.mode === 'none') {
6794 return str + '';
6795 } else {
6796 console.log('unsupported mode, try "browser", "console" or "none"');
6797 }
6798 return styles[style][0] + str + styles[style][1];
6799}
6800
6801function applyTheme(theme) {
6802
6803 //
6804 // Remark: This is a list of methods that exist
6805 // on String that you should not overwrite.
6806 //
6807 var stringPrototypeBlacklist = [
6808 '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
6809 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
6810 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
6811 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
6812 ];
6813
6814 Object.keys(theme).forEach(function (prop) {
6815 if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
6816 console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
6817 }
6818 else {
6819 if (typeof(theme[prop]) === 'string') {
6820 addProperty(prop, function () {
6821 return exports[theme[prop]](this);
6822 });
6823 }
6824 else {
6825 addProperty(prop, function () {
6826 var ret = this;
6827 for (var t = 0; t < theme[prop].length; t++) {
6828 ret = exports[theme[prop][t]](ret);
6829 }
6830 return ret;
6831 });
6832 }
6833 }
6834 });
6835}
6836
6837
6838//
6839// Iterate through all default styles and colors
6840//
6841var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG'];
6842x.forEach(function (style) {
6843
6844 // __defineGetter__ at the least works in more browsers
6845 // http://robertnyman.com/javascript/javascript-getters-setters.html
6846 // Object.defineProperty only works in Chrome
6847 addProperty(style, function () {
6848 return stylize(this, style);
6849 });
6850});
6851
6852function sequencer(map) {
6853 return function () {
6854 if (!isHeadless) {
6855 return this.replace(/( )/, '$1');
6856 }
6857 var exploded = this.split(""), i = 0;
6858 exploded = exploded.map(map);
6859 return exploded.join("");
6860 };
6861}
6862
6863var rainbowMap = (function () {
6864 var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
6865 return function (letter, i, exploded) {
6866 if (letter === " ") {
6867 return letter;
6868 } else {
6869 return stylize(letter, rainbowColors[i++ % rainbowColors.length]);
6870 }
6871 };
6872})();
6873
6874exports.themes = {};
6875
6876exports.addSequencer = function (name, map) {
6877 addProperty(name, sequencer(map));
6878};
6879
6880exports.addSequencer('rainbow', rainbowMap);
6881exports.addSequencer('zebra', function (letter, i, exploded) {
6882 return i % 2 === 0 ? letter : letter.inverse;
6883});
6884
6885exports.setTheme = function (theme) {
6886 if (typeof theme === 'string') {
6887 try {
6888 exports.themes[theme] = __webpack_require__(44)(theme);
6889 applyTheme(exports.themes[theme]);
6890 return exports.themes[theme];
6891 } catch (err) {
6892 console.log(err);
6893 return err;
6894 }
6895 } else {
6896 applyTheme(theme);
6897 }
6898};
6899
6900
6901addProperty('stripColors', function () {
6902 return ("" + this).replace(/\x1B\[\d+m/g, '');
6903});
6904
6905// please no
6906function zalgo(text, options) {
6907 var soul = {
6908 "up" : [
6909 '̍', '̎', '̄', '̅',
6910 '̿', '̑', '̆', '̐',
6911 '͒', '͗', '͑', '̇',
6912 '̈', '̊', '͂', '̓',
6913 '̈', '͊', '͋', '͌',
6914 '̃', '̂', '̌', '͐',
6915 '̀', '́', '̋', '̏',
6916 '̒', '̓', '̔', '̽',
6917 '̉', 'ͣ', 'ͤ', 'ͥ',
6918 'ͦ', 'ͧ', 'ͨ', 'ͩ',
6919 'ͪ', 'ͫ', 'ͬ', 'ͭ',
6920 'ͮ', 'ͯ', '̾', '͛',
6921 '͆', '̚'
6922 ],
6923 "down" : [
6924 '̖', '̗', '̘', '̙',
6925 '̜', '̝', '̞', '̟',
6926 '̠', '̤', '̥', '̦',
6927 '̩', '̪', '̫', '̬',
6928 '̭', '̮', '̯', '̰',
6929 '̱', '̲', '̳', '̹',
6930 '̺', '̻', '̼', 'ͅ',
6931 '͇', '͈', '͉', '͍',
6932 '͎', '͓', '͔', '͕',
6933 '͖', '͙', '͚', '̣'
6934 ],
6935 "mid" : [
6936 '̕', '̛', '̀', '́',
6937 '͘', '̡', '̢', '̧',
6938 '̨', '̴', '̵', '̶',
6939 '͜', '͝', '͞',
6940 '͟', '͠', '͢', '̸',
6941 '̷', '͡', ' ҉'
6942 ]
6943 },
6944 all = [].concat(soul.up, soul.down, soul.mid),
6945 zalgo = {};
6946
6947 function randomNumber(range) {
6948 var r = Math.floor(Math.random() * range);
6949 return r;
6950 }
6951
6952 function is_char(character) {
6953 var bool = false;
6954 all.filter(function (i) {
6955 bool = (i === character);
6956 });
6957 return bool;
6958 }
6959
6960 function heComes(text, options) {
6961 var result = '', counts, l;
6962 options = options || {};
6963 options["up"] = options["up"] || true;
6964 options["mid"] = options["mid"] || true;
6965 options["down"] = options["down"] || true;
6966 options["size"] = options["size"] || "maxi";
6967 text = text.split('');
6968 for (l in text) {
6969 if (is_char(l)) {
6970 continue;
6971 }
6972 result = result + text[l];
6973 counts = {"up" : 0, "down" : 0, "mid" : 0};
6974 switch (options.size) {
6975 case 'mini':
6976 counts.up = randomNumber(8);
6977 counts.min = randomNumber(2);
6978 counts.down = randomNumber(8);
6979 break;
6980 case 'maxi':
6981 counts.up = randomNumber(16) + 3;
6982 counts.min = randomNumber(4) + 1;
6983 counts.down = randomNumber(64) + 3;
6984 break;
6985 default:
6986 counts.up = randomNumber(8) + 1;
6987 counts.mid = randomNumber(6) / 2;
6988 counts.down = randomNumber(8) + 1;
6989 break;
6990 }
6991
6992 var arr = ["up", "mid", "down"];
6993 for (var d in arr) {
6994 var index = arr[d];
6995 for (var i = 0 ; i <= counts[index]; i++) {
6996 if (options[index]) {
6997 result = result + soul[index][randomNumber(soul[index].length)];
6998 }
6999 }
7000 }
7001 }
7002 return result;
7003 }
7004 return heComes(text);
7005}
7006
7007
7008// don't summon zalgo
7009addProperty('zalgo', function () {
7010 return zalgo(this);
7011});
7012
7013
7014/***/ }),
7015/* 44 */
7016/***/ (function(module, exports) {
7017
7018function webpackEmptyContext(req) {
7019 var e = new Error("Cannot find module '" + req + "'");
7020 e.code = 'MODULE_NOT_FOUND';
7021 throw e;
7022}
7023webpackEmptyContext.keys = function() { return []; };
7024webpackEmptyContext.resolve = webpackEmptyContext;
7025module.exports = webpackEmptyContext;
7026webpackEmptyContext.id = 44;
7027
7028/***/ }),
7029/* 45 */
7030/***/ (function(module, exports) {
7031
7032module.exports = require("events");
7033
7034/***/ }),
7035/* 46 */
7036/***/ (function(module, exports, __webpack_require__) {
7037
7038/* WEBPACK VAR INJECTION */(function(module) {//!/usr/bin/env nodejs
7039// usage: nodejs vimlparser.js [--neovim] foo.vim
7040
7041var fs = __webpack_require__(36);
7042var util = __webpack_require__(42);
7043
7044function main() {
7045 var neovim = false;
7046 var fpath = ''
7047 var args = process.argv;
7048 if (args.length == 4) {
7049 if (args[2] == '--neovim') {
7050 neovim = true;
7051 }
7052 fpath = args[3];
7053 } else if (args.length == 3) {
7054 neovim = false;
7055 fpath = args[2]
7056 }
7057 var r = new StringReader(viml_readfile(fpath));
7058 var p = new VimLParser(neovim);
7059 var c = new Compiler();
7060 try {
7061 var lines = c.compile(p.parse(r));
7062 for (var i in lines) {
7063 process.stdout.write(lines[i] + "\n");
7064 }
7065 } catch (e) {
7066 process.stdout.write(e + '\n');
7067 }
7068}
7069
7070var pat_vim2js = {
7071 "[0-9a-zA-Z]" : "[0-9a-zA-Z]",
7072 "[@*!=><&~#]" : "[@*!=><&~#]",
7073 "\\<ARGOPT\\>" : "\\bARGOPT\\b",
7074 "\\<BANG\\>" : "\\bBANG\\b",
7075 "\\<EDITCMD\\>" : "\\bEDITCMD\\b",
7076 "\\<NOTRLCOM\\>" : "\\bNOTRLCOM\\b",
7077 "\\<TRLBAR\\>" : "\\bTRLBAR\\b",
7078 "\\<USECTRLV\\>" : "\\bUSECTRLV\\b",
7079 "\\<USERCMD\\>" : "\\bUSERCMD\\b",
7080 "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>" : "\\b(XFILE|FILES|FILE1)\\b",
7081 "\\S" : "\\S",
7082 "\\a" : "[A-Za-z]",
7083 "\\d" : "\\d",
7084 "\\h" : "[A-Za-z_]",
7085 "\\s" : "\\s",
7086 "\\v^d%[elete][lp]$" : "^d(elete|elet|ele|el|e)[lp]$",
7087 "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])" : "^s(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])",
7088 "\\w" : "[0-9A-Za-z_]",
7089 "\\w\\|[:#]" : "[0-9A-Za-z_]|[:#]",
7090 "\\x" : "[0-9A-Fa-f]",
7091 "^++" : "^\+\+",
7092 "^++bad=\\(keep\\|drop\\|.\\)\\>" : "^\\+\\+bad=(keep|drop|.)\\b",
7093 "^++bad=drop" : "^\\+\\+bad=drop",
7094 "^++bad=keep" : "^\\+\\+bad=keep",
7095 "^++bin\\>" : "^\\+\\+bin\\b",
7096 "^++edit\\>" : "^\\+\\+edit\\b",
7097 "^++enc=\\S" : "^\\+\\+enc=\\S",
7098 "^++encoding=\\S" : "^\\+\\+encoding=\\S",
7099 "^++ff=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+ff=(dos|unix|mac)\\b",
7100 "^++fileformat=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+fileformat=(dos|unix|mac)\\b",
7101 "^++nobin\\>" : "^\\+\\+nobin\\b",
7102 "^[A-Z]" : "^[A-Z]",
7103 "^\\$\\w\\+" : "^\\$[0-9A-Za-z_]+",
7104 "^\\(!\\|global\\|vglobal\\)$" : "^(!|global|vglobal)$",
7105 "^\\(WHILE\\|FOR\\)$" : "^(WHILE|FOR)$",
7106 "^\\(vimgrep\\|vimgrepadd\\|lvimgrep\\|lvimgrepadd\\)$" : "^(vimgrep|vimgrepadd|lvimgrep|lvimgrepadd)$",
7107 "^\\d" : "^\\d",
7108 "^\\h" : "^[A-Za-z_]",
7109 "^\\s" : "^\\s",
7110 "^\\s*\\\\" : "^\\s*\\\\",
7111 "^[ \\t]$" : "^[ \\t]$",
7112 "^[A-Za-z]$" : "^[A-Za-z]$",
7113 "^[0-9A-Za-z]$" : "^[0-9A-Za-z]$",
7114 "^[0-9]$" : "^[0-9]$",
7115 "^[0-9A-Fa-f]$" : "^[0-9A-Fa-f]$",
7116 "^[0-9A-Za-z_]$" : "^[0-9A-Za-z_]$",
7117 "^[A-Za-z_]$" : "^[A-Za-z_]$",
7118 "^[0-9A-Za-z_:#]$" : "^[0-9A-Za-z_:#]$",
7119 "^[A-Za-z_][0-9A-Za-z_]*$" : "^[A-Za-z_][0-9A-Za-z_]*$",
7120 "^[A-Z]$" : "^[A-Z]$",
7121 "^[a-z]$" : "^[a-z]$",
7122 "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$" : "^[vgslabwt]:$|^([vgslabwt]:)?[A-Za-z_][0-9A-Za-z_#]*$",
7123 "^[0-7]$" : "^[0-7]$",
7124 "^[0-9A-Fa-f][0-9A-Fa-f]$" : "^[0-9A-Fa-f][0-9A-Fa-f]$",
7125 "^\\.[0-9A-Fa-f]$" : "^\\.[0-9A-Fa-f]$",
7126 "^[0-9A-Fa-f][^0-9A-Fa-f]$" : "^[0-9A-Fa-f][^0-9A-Fa-f]$",
7127}
7128
7129function viml_add(lst, item) {
7130 lst.push(item);
7131}
7132
7133function viml_call(func, args) {
7134 return func.apply(null, args);
7135}
7136
7137function viml_char2nr(c) {
7138 return c.charCodeAt(0);
7139}
7140
7141function viml_empty(obj) {
7142 return obj.length == 0;
7143}
7144
7145function viml_equalci(a, b) {
7146 return a.toLowerCase() == b.toLowerCase();
7147}
7148
7149function viml_eqreg(s, reg) {
7150 var mx = new RegExp(pat_vim2js[reg]);
7151 return mx.exec(s) != null;
7152}
7153
7154function viml_eqregh(s, reg) {
7155 var mx = new RegExp(pat_vim2js[reg]);
7156 return mx.exec(s) != null;
7157}
7158
7159function viml_eqregq(s, reg) {
7160 var mx = new RegExp(pat_vim2js[reg], "i");
7161 return mx.exec(s) != null;
7162}
7163
7164function viml_escape(s, chars) {
7165 var r = '';
7166 for (var i = 0; i < s.length; ++i) {
7167 if (chars.indexOf(s.charAt(i)) != -1) {
7168 r = r + "\\" + s.charAt(i);
7169 } else {
7170 r = r + s.charAt(i);
7171 }
7172 }
7173 return r;
7174}
7175
7176function viml_extend(obj, item) {
7177 obj.push.apply(obj, item);
7178}
7179
7180function viml_insert(lst, item) {
7181 var idx = arguments.length >= 3 ? arguments[2] : 0;
7182 lst.splice(0, 0, item);
7183}
7184
7185function viml_join(lst, sep) {
7186 return lst.join(sep);
7187}
7188
7189function viml_keys(obj) {
7190 return Object.keys(obj);
7191}
7192
7193function viml_len(obj) {
7194 if (typeof obj === 'string') {
7195 var len = 0;
7196 for (var i = 0; i < obj.length; i++) {
7197 var c = obj.charCodeAt(i);
7198 len += c < 128 ? 1 : ((c > 127) && (c < 2048)) ? 2 : 3;
7199 }
7200 return len;
7201 }
7202 return obj.length;
7203}
7204
7205function viml_printf() {
7206 var a000 = Array.prototype.slice.call(arguments, 0);
7207 if (a000.length == 1) {
7208 return a000[0];
7209 } else {
7210 return util.format.apply(null, a000);
7211 }
7212}
7213
7214function viml_range(start) {
7215 var end = arguments.length >= 2 ? arguments[1] : null;
7216 if (end == null) {
7217 var x = [];
7218 for (var i = 0; i < start; ++i) {
7219 x.push(i);
7220 }
7221 return x;
7222 } else {
7223 var x = []
7224 for (var i = start; i <= end; ++i) {
7225 x.push(i);
7226 }
7227 return x;
7228 }
7229}
7230
7231function viml_readfile(path) {
7232 // FIXME: newline?
7233 return fs.readFileSync(path, 'utf-8').split(/\r\n|\r|\n/);
7234}
7235
7236function viml_remove(lst, idx) {
7237 lst.splice(idx, 1);
7238}
7239
7240function viml_split(s, sep) {
7241 if (sep == "\\zs") {
7242 return s.split("");
7243 }
7244 throw "NotImplemented";
7245}
7246
7247function viml_str2nr(s) {
7248 var base = arguments.length >= 2 ? arguments[1] : 10;
7249 return parseInt(s, base);
7250}
7251
7252function viml_string(obj) {
7253 return obj.toString();
7254}
7255
7256function viml_has_key(obj, key) {
7257 return obj[key] !== undefined;
7258}
7259
7260function viml_stridx(a, b) {
7261 return a.indexOf(b);
7262}
7263
7264var NIL = [];
7265var TRUE = 1;
7266var FALSE = 0;
7267var NODE_TOPLEVEL = 1;
7268var NODE_COMMENT = 2;
7269var NODE_EXCMD = 3;
7270var NODE_FUNCTION = 4;
7271var NODE_ENDFUNCTION = 5;
7272var NODE_DELFUNCTION = 6;
7273var NODE_RETURN = 7;
7274var NODE_EXCALL = 8;
7275var NODE_LET = 9;
7276var NODE_UNLET = 10;
7277var NODE_LOCKVAR = 11;
7278var NODE_UNLOCKVAR = 12;
7279var NODE_IF = 13;
7280var NODE_ELSEIF = 14;
7281var NODE_ELSE = 15;
7282var NODE_ENDIF = 16;
7283var NODE_WHILE = 17;
7284var NODE_ENDWHILE = 18;
7285var NODE_FOR = 19;
7286var NODE_ENDFOR = 20;
7287var NODE_CONTINUE = 21;
7288var NODE_BREAK = 22;
7289var NODE_TRY = 23;
7290var NODE_CATCH = 24;
7291var NODE_FINALLY = 25;
7292var NODE_ENDTRY = 26;
7293var NODE_THROW = 27;
7294var NODE_ECHO = 28;
7295var NODE_ECHON = 29;
7296var NODE_ECHOHL = 30;
7297var NODE_ECHOMSG = 31;
7298var NODE_ECHOERR = 32;
7299var NODE_EXECUTE = 33;
7300var NODE_TERNARY = 34;
7301var NODE_OR = 35;
7302var NODE_AND = 36;
7303var NODE_EQUAL = 37;
7304var NODE_EQUALCI = 38;
7305var NODE_EQUALCS = 39;
7306var NODE_NEQUAL = 40;
7307var NODE_NEQUALCI = 41;
7308var NODE_NEQUALCS = 42;
7309var NODE_GREATER = 43;
7310var NODE_GREATERCI = 44;
7311var NODE_GREATERCS = 45;
7312var NODE_GEQUAL = 46;
7313var NODE_GEQUALCI = 47;
7314var NODE_GEQUALCS = 48;
7315var NODE_SMALLER = 49;
7316var NODE_SMALLERCI = 50;
7317var NODE_SMALLERCS = 51;
7318var NODE_SEQUAL = 52;
7319var NODE_SEQUALCI = 53;
7320var NODE_SEQUALCS = 54;
7321var NODE_MATCH = 55;
7322var NODE_MATCHCI = 56;
7323var NODE_MATCHCS = 57;
7324var NODE_NOMATCH = 58;
7325var NODE_NOMATCHCI = 59;
7326var NODE_NOMATCHCS = 60;
7327var NODE_IS = 61;
7328var NODE_ISCI = 62;
7329var NODE_ISCS = 63;
7330var NODE_ISNOT = 64;
7331var NODE_ISNOTCI = 65;
7332var NODE_ISNOTCS = 66;
7333var NODE_ADD = 67;
7334var NODE_SUBTRACT = 68;
7335var NODE_CONCAT = 69;
7336var NODE_MULTIPLY = 70;
7337var NODE_DIVIDE = 71;
7338var NODE_REMAINDER = 72;
7339var NODE_NOT = 73;
7340var NODE_MINUS = 74;
7341var NODE_PLUS = 75;
7342var NODE_SUBSCRIPT = 76;
7343var NODE_SLICE = 77;
7344var NODE_CALL = 78;
7345var NODE_DOT = 79;
7346var NODE_NUMBER = 80;
7347var NODE_STRING = 81;
7348var NODE_LIST = 82;
7349var NODE_DICT = 83;
7350var NODE_OPTION = 85;
7351var NODE_IDENTIFIER = 86;
7352var NODE_CURLYNAME = 87;
7353var NODE_ENV = 88;
7354var NODE_REG = 89;
7355var NODE_CURLYNAMEPART = 90;
7356var NODE_CURLYNAMEEXPR = 91;
7357var NODE_LAMBDA = 92;
7358var NODE_BLOB = 93;
7359var NODE_CONST = 94;
7360var NODE_EVAL = 95;
7361var NODE_HEREDOC = 96;
7362var NODE_METHOD = 97;
7363var TOKEN_EOF = 1;
7364var TOKEN_EOL = 2;
7365var TOKEN_SPACE = 3;
7366var TOKEN_OROR = 4;
7367var TOKEN_ANDAND = 5;
7368var TOKEN_EQEQ = 6;
7369var TOKEN_EQEQCI = 7;
7370var TOKEN_EQEQCS = 8;
7371var TOKEN_NEQ = 9;
7372var TOKEN_NEQCI = 10;
7373var TOKEN_NEQCS = 11;
7374var TOKEN_GT = 12;
7375var TOKEN_GTCI = 13;
7376var TOKEN_GTCS = 14;
7377var TOKEN_GTEQ = 15;
7378var TOKEN_GTEQCI = 16;
7379var TOKEN_GTEQCS = 17;
7380var TOKEN_LT = 18;
7381var TOKEN_LTCI = 19;
7382var TOKEN_LTCS = 20;
7383var TOKEN_LTEQ = 21;
7384var TOKEN_LTEQCI = 22;
7385var TOKEN_LTEQCS = 23;
7386var TOKEN_MATCH = 24;
7387var TOKEN_MATCHCI = 25;
7388var TOKEN_MATCHCS = 26;
7389var TOKEN_NOMATCH = 27;
7390var TOKEN_NOMATCHCI = 28;
7391var TOKEN_NOMATCHCS = 29;
7392var TOKEN_IS = 30;
7393var TOKEN_ISCI = 31;
7394var TOKEN_ISCS = 32;
7395var TOKEN_ISNOT = 33;
7396var TOKEN_ISNOTCI = 34;
7397var TOKEN_ISNOTCS = 35;
7398var TOKEN_PLUS = 36;
7399var TOKEN_MINUS = 37;
7400var TOKEN_DOT = 38;
7401var TOKEN_STAR = 39;
7402var TOKEN_SLASH = 40;
7403var TOKEN_PERCENT = 41;
7404var TOKEN_NOT = 42;
7405var TOKEN_QUESTION = 43;
7406var TOKEN_COLON = 44;
7407var TOKEN_POPEN = 45;
7408var TOKEN_PCLOSE = 46;
7409var TOKEN_SQOPEN = 47;
7410var TOKEN_SQCLOSE = 48;
7411var TOKEN_COPEN = 49;
7412var TOKEN_CCLOSE = 50;
7413var TOKEN_COMMA = 51;
7414var TOKEN_NUMBER = 52;
7415var TOKEN_SQUOTE = 53;
7416var TOKEN_DQUOTE = 54;
7417var TOKEN_OPTION = 55;
7418var TOKEN_IDENTIFIER = 56;
7419var TOKEN_ENV = 57;
7420var TOKEN_REG = 58;
7421var TOKEN_EQ = 59;
7422var TOKEN_OR = 60;
7423var TOKEN_SEMICOLON = 61;
7424var TOKEN_BACKTICK = 62;
7425var TOKEN_DOTDOTDOT = 63;
7426var TOKEN_SHARP = 64;
7427var TOKEN_ARROW = 65;
7428var TOKEN_BLOB = 66;
7429var TOKEN_LITCOPEN = 67;
7430var TOKEN_DOTDOT = 68;
7431var TOKEN_HEREDOC = 69;
7432var MAX_FUNC_ARGS = 20;
7433function isalpha(c) {
7434 return viml_eqregh(c, "^[A-Za-z]$");
7435}
7436
7437function isalnum(c) {
7438 return viml_eqregh(c, "^[0-9A-Za-z]$");
7439}
7440
7441function isdigit(c) {
7442 return viml_eqregh(c, "^[0-9]$");
7443}
7444
7445function isodigit(c) {
7446 return viml_eqregh(c, "^[0-7]$");
7447}
7448
7449function isxdigit(c) {
7450 return viml_eqregh(c, "^[0-9A-Fa-f]$");
7451}
7452
7453function iswordc(c) {
7454 return viml_eqregh(c, "^[0-9A-Za-z_]$");
7455}
7456
7457function iswordc1(c) {
7458 return viml_eqregh(c, "^[A-Za-z_]$");
7459}
7460
7461function iswhite(c) {
7462 return viml_eqregh(c, "^[ \\t]$");
7463}
7464
7465function isnamec(c) {
7466 return viml_eqregh(c, "^[0-9A-Za-z_:#]$");
7467}
7468
7469function isnamec1(c) {
7470 return viml_eqregh(c, "^[A-Za-z_]$");
7471}
7472
7473function isargname(s) {
7474 return viml_eqregh(s, "^[A-Za-z_][0-9A-Za-z_]*$");
7475}
7476
7477function isvarname(s) {
7478 return viml_eqregh(s, "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$");
7479}
7480
7481// FIXME:
7482function isidc(c) {
7483 return viml_eqregh(c, "^[0-9A-Za-z_]$");
7484}
7485
7486function isupper(c) {
7487 return viml_eqregh(c, "^[A-Z]$");
7488}
7489
7490function islower(c) {
7491 return viml_eqregh(c, "^[a-z]$");
7492}
7493
7494function ExArg() {
7495 var ea = {};
7496 ea.forceit = FALSE;
7497 ea.addr_count = 0;
7498 ea.line1 = 0;
7499 ea.line2 = 0;
7500 ea.flags = 0;
7501 ea.do_ecmd_cmd = "";
7502 ea.do_ecmd_lnum = 0;
7503 ea.append = 0;
7504 ea.usefilter = FALSE;
7505 ea.amount = 0;
7506 ea.regname = 0;
7507 ea.force_bin = 0;
7508 ea.read_edit = 0;
7509 ea.force_ff = 0;
7510 ea.force_enc = 0;
7511 ea.bad_char = 0;
7512 ea.linepos = {};
7513 ea.cmdpos = [];
7514 ea.argpos = [];
7515 ea.cmd = {};
7516 ea.modifiers = [];
7517 ea.range = [];
7518 ea.argopt = {};
7519 ea.argcmd = {};
7520 return ea;
7521}
7522
7523// struct node {
7524// int type
7525// pos pos
7526// node left
7527// node right
7528// node cond
7529// node rest
7530// node[] list
7531// node[] rlist
7532// node[] default_args
7533// node[] body
7534// string op
7535// string str
7536// int depth
7537// variant value
7538// }
7539// TOPLEVEL .body
7540// COMMENT .str
7541// EXCMD .ea .str
7542// FUNCTION .ea .body .left .rlist .default_args .attr .endfunction
7543// ENDFUNCTION .ea
7544// DELFUNCTION .ea .left
7545// RETURN .ea .left
7546// EXCALL .ea .left
7547// LET .ea .op .left .list .rest .right
7548// CONST .ea .op .left .list .rest .right
7549// UNLET .ea .list
7550// LOCKVAR .ea .depth .list
7551// UNLOCKVAR .ea .depth .list
7552// IF .ea .body .cond .elseif .else .endif
7553// ELSEIF .ea .body .cond
7554// ELSE .ea .body
7555// ENDIF .ea
7556// WHILE .ea .body .cond .endwhile
7557// ENDWHILE .ea
7558// FOR .ea .body .left .list .rest .right .endfor
7559// ENDFOR .ea
7560// CONTINUE .ea
7561// BREAK .ea
7562// TRY .ea .body .catch .finally .endtry
7563// CATCH .ea .body .pattern
7564// FINALLY .ea .body
7565// ENDTRY .ea
7566// THROW .ea .left
7567// EVAL .ea .left
7568// ECHO .ea .list
7569// ECHON .ea .list
7570// ECHOHL .ea .str
7571// ECHOMSG .ea .list
7572// ECHOERR .ea .list
7573// EXECUTE .ea .list
7574// TERNARY .cond .left .right
7575// OR .left .right
7576// AND .left .right
7577// EQUAL .left .right
7578// EQUALCI .left .right
7579// EQUALCS .left .right
7580// NEQUAL .left .right
7581// NEQUALCI .left .right
7582// NEQUALCS .left .right
7583// GREATER .left .right
7584// GREATERCI .left .right
7585// GREATERCS .left .right
7586// GEQUAL .left .right
7587// GEQUALCI .left .right
7588// GEQUALCS .left .right
7589// SMALLER .left .right
7590// SMALLERCI .left .right
7591// SMALLERCS .left .right
7592// SEQUAL .left .right
7593// SEQUALCI .left .right
7594// SEQUALCS .left .right
7595// MATCH .left .right
7596// MATCHCI .left .right
7597// MATCHCS .left .right
7598// NOMATCH .left .right
7599// NOMATCHCI .left .right
7600// NOMATCHCS .left .right
7601// IS .left .right
7602// ISCI .left .right
7603// ISCS .left .right
7604// ISNOT .left .right
7605// ISNOTCI .left .right
7606// ISNOTCS .left .right
7607// ADD .left .right
7608// SUBTRACT .left .right
7609// CONCAT .left .right
7610// MULTIPLY .left .right
7611// DIVIDE .left .right
7612// REMAINDER .left .right
7613// NOT .left
7614// MINUS .left
7615// PLUS .left
7616// SUBSCRIPT .left .right
7617// SLICE .left .rlist
7618// METHOD .left .right
7619// CALL .left .rlist
7620// DOT .left .right
7621// NUMBER .value
7622// STRING .value
7623// LIST .value
7624// DICT .value
7625// BLOB .value
7626// NESTING .left
7627// OPTION .value
7628// IDENTIFIER .value
7629// CURLYNAME .value
7630// ENV .value
7631// REG .value
7632// CURLYNAMEPART .value
7633// CURLYNAMEEXPR .value
7634// LAMBDA .rlist .left
7635// HEREDOC .rlist .op .body
7636function Node(type) {
7637 return {"type":type};
7638}
7639
7640function Err(msg, pos) {
7641 return viml_printf("vimlparser: %s: line %d col %d", msg, pos.lnum, pos.col);
7642}
7643
7644function VimLParser() { this.__init__.apply(this, arguments); }
7645VimLParser.prototype.__init__ = function() {
7646 var a000 = Array.prototype.slice.call(arguments, 0);
7647 if (viml_len(a000) > 0) {
7648 this.neovim = a000[0];
7649 }
7650 else {
7651 this.neovim = 0;
7652 }
7653 this.find_command_cache = {};
7654}
7655
7656VimLParser.prototype.push_context = function(node) {
7657 viml_insert(this.context, node);
7658}
7659
7660VimLParser.prototype.pop_context = function() {
7661 viml_remove(this.context, 0);
7662}
7663
7664VimLParser.prototype.find_context = function(type) {
7665 var i = 0;
7666 var __c3 = this.context;
7667 for (var __i3 = 0; __i3 < __c3.length; ++__i3) {
7668 var node = __c3[__i3];
7669 if (node.type == type) {
7670 return i;
7671 }
7672 i += 1;
7673 }
7674 return -1;
7675}
7676
7677VimLParser.prototype.add_node = function(node) {
7678 viml_add(this.context[0].body, node);
7679}
7680
7681VimLParser.prototype.check_missing_endfunction = function(ends, pos) {
7682 if (this.context[0].type == NODE_FUNCTION) {
7683 throw Err(viml_printf("E126: Missing :endfunction: %s", ends), pos);
7684 }
7685}
7686
7687VimLParser.prototype.check_missing_endif = function(ends, pos) {
7688 if (this.context[0].type == NODE_IF || this.context[0].type == NODE_ELSEIF || this.context[0].type == NODE_ELSE) {
7689 throw Err(viml_printf("E171: Missing :endif: %s", ends), pos);
7690 }
7691}
7692
7693VimLParser.prototype.check_missing_endtry = function(ends, pos) {
7694 if (this.context[0].type == NODE_TRY || this.context[0].type == NODE_CATCH || this.context[0].type == NODE_FINALLY) {
7695 throw Err(viml_printf("E600: Missing :endtry: %s", ends), pos);
7696 }
7697}
7698
7699VimLParser.prototype.check_missing_endwhile = function(ends, pos) {
7700 if (this.context[0].type == NODE_WHILE) {
7701 throw Err(viml_printf("E170: Missing :endwhile: %s", ends), pos);
7702 }
7703}
7704
7705VimLParser.prototype.check_missing_endfor = function(ends, pos) {
7706 if (this.context[0].type == NODE_FOR) {
7707 throw Err(viml_printf("E170: Missing :endfor: %s", ends), pos);
7708 }
7709}
7710
7711VimLParser.prototype.parse = function(reader) {
7712 this.reader = reader;
7713 this.context = [];
7714 var toplevel = Node(NODE_TOPLEVEL);
7715 toplevel.pos = this.reader.getpos();
7716 toplevel.body = [];
7717 this.push_context(toplevel);
7718 while (this.reader.peek() != "<EOF>") {
7719 this.parse_one_cmd();
7720 }
7721 this.check_missing_endfunction("TOPLEVEL", this.reader.getpos());
7722 this.check_missing_endif("TOPLEVEL", this.reader.getpos());
7723 this.check_missing_endtry("TOPLEVEL", this.reader.getpos());
7724 this.check_missing_endwhile("TOPLEVEL", this.reader.getpos());
7725 this.check_missing_endfor("TOPLEVEL", this.reader.getpos());
7726 this.pop_context();
7727 return toplevel;
7728}
7729
7730VimLParser.prototype.parse_one_cmd = function() {
7731 this.ea = ExArg();
7732 if (this.reader.peekn(2) == "#!") {
7733 this.parse_hashbang();
7734 this.reader.get();
7735 return;
7736 }
7737 this.reader.skip_white_and_colon();
7738 if (this.reader.peekn(1) == "") {
7739 this.reader.get();
7740 return;
7741 }
7742 if (this.reader.peekn(1) == "\"") {
7743 this.parse_comment();
7744 this.reader.get();
7745 return;
7746 }
7747 this.ea.linepos = this.reader.getpos();
7748 this.parse_command_modifiers();
7749 this.parse_range();
7750 this.parse_command();
7751 this.parse_trail();
7752}
7753
7754// FIXME:
7755VimLParser.prototype.parse_command_modifiers = function() {
7756 var modifiers = [];
7757 while (TRUE) {
7758 var pos = this.reader.tell();
7759 var d = "";
7760 if (isdigit(this.reader.peekn(1))) {
7761 var d = this.reader.read_digit();
7762 this.reader.skip_white();
7763 }
7764 var k = this.reader.read_alpha();
7765 var c = this.reader.peekn(1);
7766 this.reader.skip_white();
7767 if (viml_stridx("aboveleft", k) == 0 && viml_len(k) >= 3) {
7768 // abo\%[veleft]
7769 viml_add(modifiers, {"name":"aboveleft"});
7770 }
7771 else if (viml_stridx("belowright", k) == 0 && viml_len(k) >= 3) {
7772 // bel\%[owright]
7773 viml_add(modifiers, {"name":"belowright"});
7774 }
7775 else if (viml_stridx("browse", k) == 0 && viml_len(k) >= 3) {
7776 // bro\%[wse]
7777 viml_add(modifiers, {"name":"browse"});
7778 }
7779 else if (viml_stridx("botright", k) == 0 && viml_len(k) >= 2) {
7780 // bo\%[tright]
7781 viml_add(modifiers, {"name":"botright"});
7782 }
7783 else if (viml_stridx("confirm", k) == 0 && viml_len(k) >= 4) {
7784 // conf\%[irm]
7785 viml_add(modifiers, {"name":"confirm"});
7786 }
7787 else if (viml_stridx("keepmarks", k) == 0 && viml_len(k) >= 3) {
7788 // kee\%[pmarks]
7789 viml_add(modifiers, {"name":"keepmarks"});
7790 }
7791 else if (viml_stridx("keepalt", k) == 0 && viml_len(k) >= 5) {
7792 // keepa\%[lt]
7793 viml_add(modifiers, {"name":"keepalt"});
7794 }
7795 else if (viml_stridx("keepjumps", k) == 0 && viml_len(k) >= 5) {
7796 // keepj\%[umps]
7797 viml_add(modifiers, {"name":"keepjumps"});
7798 }
7799 else if (viml_stridx("keeppatterns", k) == 0 && viml_len(k) >= 5) {
7800 // keepp\%[atterns]
7801 viml_add(modifiers, {"name":"keeppatterns"});
7802 }
7803 else if (viml_stridx("hide", k) == 0 && viml_len(k) >= 3) {
7804 // hid\%[e]
7805 if (this.ends_excmds(c)) {
7806 break;
7807 }
7808 viml_add(modifiers, {"name":"hide"});
7809 }
7810 else if (viml_stridx("lockmarks", k) == 0 && viml_len(k) >= 3) {
7811 // loc\%[kmarks]
7812 viml_add(modifiers, {"name":"lockmarks"});
7813 }
7814 else if (viml_stridx("leftabove", k) == 0 && viml_len(k) >= 5) {
7815 // lefta\%[bove]
7816 viml_add(modifiers, {"name":"leftabove"});
7817 }
7818 else if (viml_stridx("noautocmd", k) == 0 && viml_len(k) >= 3) {
7819 // noa\%[utocmd]
7820 viml_add(modifiers, {"name":"noautocmd"});
7821 }
7822 else if (viml_stridx("noswapfile", k) == 0 && viml_len(k) >= 3) {
7823 // :nos\%[wapfile]
7824 viml_add(modifiers, {"name":"noswapfile"});
7825 }
7826 else if (viml_stridx("rightbelow", k) == 0 && viml_len(k) >= 6) {
7827 // rightb\%[elow]
7828 viml_add(modifiers, {"name":"rightbelow"});
7829 }
7830 else if (viml_stridx("sandbox", k) == 0 && viml_len(k) >= 3) {
7831 // san\%[dbox]
7832 viml_add(modifiers, {"name":"sandbox"});
7833 }
7834 else if (viml_stridx("silent", k) == 0 && viml_len(k) >= 3) {
7835 // sil\%[ent]
7836 if (c == "!") {
7837 this.reader.get();
7838 viml_add(modifiers, {"name":"silent", "bang":1});
7839 }
7840 else {
7841 viml_add(modifiers, {"name":"silent", "bang":0});
7842 }
7843 }
7844 else if (k == "tab") {
7845 // tab
7846 if (d != "") {
7847 viml_add(modifiers, {"name":"tab", "count":viml_str2nr(d, 10)});
7848 }
7849 else {
7850 viml_add(modifiers, {"name":"tab"});
7851 }
7852 }
7853 else if (viml_stridx("topleft", k) == 0 && viml_len(k) >= 2) {
7854 // to\%[pleft]
7855 viml_add(modifiers, {"name":"topleft"});
7856 }
7857 else if (viml_stridx("unsilent", k) == 0 && viml_len(k) >= 3) {
7858 // uns\%[ilent]
7859 viml_add(modifiers, {"name":"unsilent"});
7860 }
7861 else if (viml_stridx("vertical", k) == 0 && viml_len(k) >= 4) {
7862 // vert\%[ical]
7863 viml_add(modifiers, {"name":"vertical"});
7864 }
7865 else if (viml_stridx("verbose", k) == 0 && viml_len(k) >= 4) {
7866 // verb\%[ose]
7867 if (d != "") {
7868 viml_add(modifiers, {"name":"verbose", "count":viml_str2nr(d, 10)});
7869 }
7870 else {
7871 viml_add(modifiers, {"name":"verbose", "count":1});
7872 }
7873 }
7874 else {
7875 this.reader.seek_set(pos);
7876 break;
7877 }
7878 }
7879 this.ea.modifiers = modifiers;
7880}
7881
7882// FIXME:
7883VimLParser.prototype.parse_range = function() {
7884 var tokens = [];
7885 while (TRUE) {
7886 while (TRUE) {
7887 this.reader.skip_white();
7888 var c = this.reader.peekn(1);
7889 if (c == "") {
7890 break;
7891 }
7892 if (c == ".") {
7893 viml_add(tokens, this.reader.getn(1));
7894 }
7895 else if (c == "$") {
7896 viml_add(tokens, this.reader.getn(1));
7897 }
7898 else if (c == "'") {
7899 this.reader.getn(1);
7900 var m = this.reader.getn(1);
7901 if (m == "") {
7902 break;
7903 }
7904 viml_add(tokens, "'" + m);
7905 }
7906 else if (c == "/") {
7907 this.reader.getn(1);
7908 var __tmp = this.parse_pattern(c);
7909 var pattern = __tmp[0];
7910 var _ = __tmp[1];
7911 viml_add(tokens, pattern);
7912 }
7913 else if (c == "?") {
7914 this.reader.getn(1);
7915 var __tmp = this.parse_pattern(c);
7916 var pattern = __tmp[0];
7917 var _ = __tmp[1];
7918 viml_add(tokens, pattern);
7919 }
7920 else if (c == "\\") {
7921 var m = this.reader.p(1);
7922 if (m == "&" || m == "?" || m == "/") {
7923 this.reader.seek_cur(2);
7924 viml_add(tokens, "\\" + m);
7925 }
7926 else {
7927 throw Err("E10: \\\\ should be followed by /, ? or &", this.reader.getpos());
7928 }
7929 }
7930 else if (isdigit(c)) {
7931 viml_add(tokens, this.reader.read_digit());
7932 }
7933 while (TRUE) {
7934 this.reader.skip_white();
7935 if (this.reader.peekn(1) == "") {
7936 break;
7937 }
7938 var n = this.reader.read_integer();
7939 if (n == "") {
7940 break;
7941 }
7942 viml_add(tokens, n);
7943 }
7944 if (this.reader.p(0) != "/" && this.reader.p(0) != "?") {
7945 break;
7946 }
7947 }
7948 if (this.reader.peekn(1) == "%") {
7949 viml_add(tokens, this.reader.getn(1));
7950 }
7951 else if (this.reader.peekn(1) == "*") {
7952 // && &cpoptions !~ '\*'
7953 viml_add(tokens, this.reader.getn(1));
7954 }
7955 if (this.reader.peekn(1) == ";") {
7956 viml_add(tokens, this.reader.getn(1));
7957 continue;
7958 }
7959 else if (this.reader.peekn(1) == ",") {
7960 viml_add(tokens, this.reader.getn(1));
7961 continue;
7962 }
7963 break;
7964 }
7965 this.ea.range = tokens;
7966}
7967
7968// FIXME:
7969VimLParser.prototype.parse_pattern = function(delimiter) {
7970 var pattern = "";
7971 var endc = "";
7972 var inbracket = 0;
7973 while (TRUE) {
7974 var c = this.reader.getn(1);
7975 if (c == "") {
7976 break;
7977 }
7978 if (c == delimiter && inbracket == 0) {
7979 var endc = c;
7980 break;
7981 }
7982 pattern += c;
7983 if (c == "\\") {
7984 var c = this.reader.peekn(1);
7985 if (c == "") {
7986 throw Err("E682: Invalid search pattern or delimiter", this.reader.getpos());
7987 }
7988 this.reader.getn(1);
7989 pattern += c;
7990 }
7991 else if (c == "[") {
7992 inbracket += 1;
7993 }
7994 else if (c == "]") {
7995 inbracket -= 1;
7996 }
7997 }
7998 return [pattern, endc];
7999}
8000
8001VimLParser.prototype.parse_command = function() {
8002 this.reader.skip_white_and_colon();
8003 this.ea.cmdpos = this.reader.getpos();
8004 if (this.reader.peekn(1) == "" || this.reader.peekn(1) == "\"") {
8005 if (!viml_empty(this.ea.modifiers) || !viml_empty(this.ea.range)) {
8006 this.parse_cmd_modifier_range();
8007 }
8008 return;
8009 }
8010 this.ea.cmd = this.find_command();
8011 if (this.ea.cmd === NIL) {
8012 this.reader.setpos(this.ea.cmdpos);
8013 throw Err(viml_printf("E492: Not an editor command: %s", this.reader.peekline()), this.ea.cmdpos);
8014 }
8015 if (this.reader.peekn(1) == "!" && this.ea.cmd.name != "substitute" && this.ea.cmd.name != "smagic" && this.ea.cmd.name != "snomagic") {
8016 this.reader.getn(1);
8017 this.ea.forceit = TRUE;
8018 }
8019 else {
8020 this.ea.forceit = FALSE;
8021 }
8022 if (!viml_eqregh(this.ea.cmd.flags, "\\<BANG\\>") && this.ea.forceit && !viml_eqregh(this.ea.cmd.flags, "\\<USERCMD\\>")) {
8023 throw Err("E477: No ! allowed", this.ea.cmdpos);
8024 }
8025 if (this.ea.cmd.name != "!") {
8026 this.reader.skip_white();
8027 }
8028 this.ea.argpos = this.reader.getpos();
8029 if (viml_eqregh(this.ea.cmd.flags, "\\<ARGOPT\\>")) {
8030 this.parse_argopt();
8031 }
8032 if (this.ea.cmd.name == "write" || this.ea.cmd.name == "update") {
8033 if (this.reader.p(0) == ">") {
8034 if (this.reader.p(1) != ">") {
8035 throw Err("E494: Use w or w>>", this.ea.cmdpos);
8036 }
8037 this.reader.seek_cur(2);
8038 this.reader.skip_white();
8039 this.ea.append = 1;
8040 }
8041 else if (this.reader.peekn(1) == "!" && this.ea.cmd.name == "write") {
8042 this.reader.getn(1);
8043 this.ea.usefilter = TRUE;
8044 }
8045 }
8046 if (this.ea.cmd.name == "read") {
8047 if (this.ea.forceit) {
8048 this.ea.usefilter = TRUE;
8049 this.ea.forceit = FALSE;
8050 }
8051 else if (this.reader.peekn(1) == "!") {
8052 this.reader.getn(1);
8053 this.ea.usefilter = TRUE;
8054 }
8055 }
8056 if (this.ea.cmd.name == "<" || this.ea.cmd.name == ">") {
8057 this.ea.amount = 1;
8058 while (this.reader.peekn(1) == this.ea.cmd.name) {
8059 this.reader.getn(1);
8060 this.ea.amount += 1;
8061 }
8062 this.reader.skip_white();
8063 }
8064 if (viml_eqregh(this.ea.cmd.flags, "\\<EDITCMD\\>") && !this.ea.usefilter) {
8065 this.parse_argcmd();
8066 }
8067 this._parse_command(this.ea.cmd.parser);
8068}
8069
8070// TODO: self[a:parser]
8071VimLParser.prototype._parse_command = function(parser) {
8072 if (parser == "parse_cmd_append") {
8073 this.parse_cmd_append();
8074 }
8075 else if (parser == "parse_cmd_break") {
8076 this.parse_cmd_break();
8077 }
8078 else if (parser == "parse_cmd_call") {
8079 this.parse_cmd_call();
8080 }
8081 else if (parser == "parse_cmd_catch") {
8082 this.parse_cmd_catch();
8083 }
8084 else if (parser == "parse_cmd_common") {
8085 this.parse_cmd_common();
8086 }
8087 else if (parser == "parse_cmd_continue") {
8088 this.parse_cmd_continue();
8089 }
8090 else if (parser == "parse_cmd_delfunction") {
8091 this.parse_cmd_delfunction();
8092 }
8093 else if (parser == "parse_cmd_echo") {
8094 this.parse_cmd_echo();
8095 }
8096 else if (parser == "parse_cmd_echoerr") {
8097 this.parse_cmd_echoerr();
8098 }
8099 else if (parser == "parse_cmd_echohl") {
8100 this.parse_cmd_echohl();
8101 }
8102 else if (parser == "parse_cmd_echomsg") {
8103 this.parse_cmd_echomsg();
8104 }
8105 else if (parser == "parse_cmd_echon") {
8106 this.parse_cmd_echon();
8107 }
8108 else if (parser == "parse_cmd_else") {
8109 this.parse_cmd_else();
8110 }
8111 else if (parser == "parse_cmd_elseif") {
8112 this.parse_cmd_elseif();
8113 }
8114 else if (parser == "parse_cmd_endfor") {
8115 this.parse_cmd_endfor();
8116 }
8117 else if (parser == "parse_cmd_endfunction") {
8118 this.parse_cmd_endfunction();
8119 }
8120 else if (parser == "parse_cmd_endif") {
8121 this.parse_cmd_endif();
8122 }
8123 else if (parser == "parse_cmd_endtry") {
8124 this.parse_cmd_endtry();
8125 }
8126 else if (parser == "parse_cmd_endwhile") {
8127 this.parse_cmd_endwhile();
8128 }
8129 else if (parser == "parse_cmd_execute") {
8130 this.parse_cmd_execute();
8131 }
8132 else if (parser == "parse_cmd_finally") {
8133 this.parse_cmd_finally();
8134 }
8135 else if (parser == "parse_cmd_finish") {
8136 this.parse_cmd_finish();
8137 }
8138 else if (parser == "parse_cmd_for") {
8139 this.parse_cmd_for();
8140 }
8141 else if (parser == "parse_cmd_function") {
8142 this.parse_cmd_function();
8143 }
8144 else if (parser == "parse_cmd_if") {
8145 this.parse_cmd_if();
8146 }
8147 else if (parser == "parse_cmd_insert") {
8148 this.parse_cmd_insert();
8149 }
8150 else if (parser == "parse_cmd_let") {
8151 this.parse_cmd_let();
8152 }
8153 else if (parser == "parse_cmd_const") {
8154 this.parse_cmd_const();
8155 }
8156 else if (parser == "parse_cmd_loadkeymap") {
8157 this.parse_cmd_loadkeymap();
8158 }
8159 else if (parser == "parse_cmd_lockvar") {
8160 this.parse_cmd_lockvar();
8161 }
8162 else if (parser == "parse_cmd_lua") {
8163 this.parse_cmd_lua();
8164 }
8165 else if (parser == "parse_cmd_modifier_range") {
8166 this.parse_cmd_modifier_range();
8167 }
8168 else if (parser == "parse_cmd_mzscheme") {
8169 this.parse_cmd_mzscheme();
8170 }
8171 else if (parser == "parse_cmd_perl") {
8172 this.parse_cmd_perl();
8173 }
8174 else if (parser == "parse_cmd_python") {
8175 this.parse_cmd_python();
8176 }
8177 else if (parser == "parse_cmd_python3") {
8178 this.parse_cmd_python3();
8179 }
8180 else if (parser == "parse_cmd_return") {
8181 this.parse_cmd_return();
8182 }
8183 else if (parser == "parse_cmd_ruby") {
8184 this.parse_cmd_ruby();
8185 }
8186 else if (parser == "parse_cmd_tcl") {
8187 this.parse_cmd_tcl();
8188 }
8189 else if (parser == "parse_cmd_throw") {
8190 this.parse_cmd_throw();
8191 }
8192 else if (parser == "parse_cmd_eval") {
8193 this.parse_cmd_eval();
8194 }
8195 else if (parser == "parse_cmd_try") {
8196 this.parse_cmd_try();
8197 }
8198 else if (parser == "parse_cmd_unlet") {
8199 this.parse_cmd_unlet();
8200 }
8201 else if (parser == "parse_cmd_unlockvar") {
8202 this.parse_cmd_unlockvar();
8203 }
8204 else if (parser == "parse_cmd_usercmd") {
8205 this.parse_cmd_usercmd();
8206 }
8207 else if (parser == "parse_cmd_while") {
8208 this.parse_cmd_while();
8209 }
8210 else if (parser == "parse_wincmd") {
8211 this.parse_wincmd();
8212 }
8213 else if (parser == "parse_cmd_syntax") {
8214 this.parse_cmd_syntax();
8215 }
8216 else {
8217 throw viml_printf("unknown parser: %s", viml_string(parser));
8218 }
8219}
8220
8221VimLParser.prototype.find_command = function() {
8222 var c = this.reader.peekn(1);
8223 var name = "";
8224 if (c == "k") {
8225 this.reader.getn(1);
8226 var name = "k";
8227 }
8228 else if (c == "s" && viml_eqregh(this.reader.peekn(5), "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])")) {
8229 this.reader.getn(1);
8230 var name = "substitute";
8231 }
8232 else if (viml_eqregh(c, "[@*!=><&~#]")) {
8233 this.reader.getn(1);
8234 var name = c;
8235 }
8236 else if (this.reader.peekn(2) == "py") {
8237 var name = this.reader.read_alnum();
8238 }
8239 else {
8240 var pos = this.reader.tell();
8241 var name = this.reader.read_alpha();
8242 if (name != "del" && viml_eqregh(name, "\\v^d%[elete][lp]$")) {
8243 this.reader.seek_set(pos);
8244 var name = this.reader.getn(viml_len(name) - 1);
8245 }
8246 }
8247 if (name == "") {
8248 return NIL;
8249 }
8250 if (viml_has_key(this.find_command_cache, name)) {
8251 return this.find_command_cache[name];
8252 }
8253 var cmd = NIL;
8254 var __c4 = this.builtin_commands;
8255 for (var __i4 = 0; __i4 < __c4.length; ++__i4) {
8256 var x = __c4[__i4];
8257 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
8258 delete cmd;
8259 var cmd = x;
8260 break;
8261 }
8262 }
8263 if (this.neovim) {
8264 var __c5 = this.neovim_additional_commands;
8265 for (var __i5 = 0; __i5 < __c5.length; ++__i5) {
8266 var x = __c5[__i5];
8267 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
8268 delete cmd;
8269 var cmd = x;
8270 break;
8271 }
8272 }
8273 var __c6 = this.neovim_removed_commands;
8274 for (var __i6 = 0; __i6 < __c6.length; ++__i6) {
8275 var x = __c6[__i6];
8276 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
8277 delete cmd;
8278 var cmd = NIL;
8279 break;
8280 }
8281 }
8282 }
8283 // FIXME: user defined command
8284 if ((cmd === NIL || cmd.name == "Print") && viml_eqregh(name, "^[A-Z]")) {
8285 name += this.reader.read_alnum();
8286 delete cmd;
8287 var cmd = {"name":name, "flags":"USERCMD", "parser":"parse_cmd_usercmd"};
8288 }
8289 this.find_command_cache[name] = cmd;
8290 return cmd;
8291}
8292
8293// TODO:
8294VimLParser.prototype.parse_hashbang = function() {
8295 this.reader.getn(-1);
8296}
8297
8298// TODO:
8299// ++opt=val
8300VimLParser.prototype.parse_argopt = function() {
8301 while (this.reader.p(0) == "+" && this.reader.p(1) == "+") {
8302 var s = this.reader.peekn(20);
8303 if (viml_eqregh(s, "^++bin\\>")) {
8304 this.reader.getn(5);
8305 this.ea.force_bin = 1;
8306 }
8307 else if (viml_eqregh(s, "^++nobin\\>")) {
8308 this.reader.getn(7);
8309 this.ea.force_bin = 2;
8310 }
8311 else if (viml_eqregh(s, "^++edit\\>")) {
8312 this.reader.getn(6);
8313 this.ea.read_edit = 1;
8314 }
8315 else if (viml_eqregh(s, "^++ff=\\(dos\\|unix\\|mac\\)\\>")) {
8316 this.reader.getn(5);
8317 this.ea.force_ff = this.reader.read_alpha();
8318 }
8319 else if (viml_eqregh(s, "^++fileformat=\\(dos\\|unix\\|mac\\)\\>")) {
8320 this.reader.getn(13);
8321 this.ea.force_ff = this.reader.read_alpha();
8322 }
8323 else if (viml_eqregh(s, "^++enc=\\S")) {
8324 this.reader.getn(6);
8325 this.ea.force_enc = this.reader.read_nonwhite();
8326 }
8327 else if (viml_eqregh(s, "^++encoding=\\S")) {
8328 this.reader.getn(11);
8329 this.ea.force_enc = this.reader.read_nonwhite();
8330 }
8331 else if (viml_eqregh(s, "^++bad=\\(keep\\|drop\\|.\\)\\>")) {
8332 this.reader.getn(6);
8333 if (viml_eqregh(s, "^++bad=keep")) {
8334 this.ea.bad_char = this.reader.getn(4);
8335 }
8336 else if (viml_eqregh(s, "^++bad=drop")) {
8337 this.ea.bad_char = this.reader.getn(4);
8338 }
8339 else {
8340 this.ea.bad_char = this.reader.getn(1);
8341 }
8342 }
8343 else if (viml_eqregh(s, "^++")) {
8344 throw Err("E474: Invalid Argument", this.reader.getpos());
8345 }
8346 else {
8347 break;
8348 }
8349 this.reader.skip_white();
8350 }
8351}
8352
8353// TODO:
8354// +command
8355VimLParser.prototype.parse_argcmd = function() {
8356 if (this.reader.peekn(1) == "+") {
8357 this.reader.getn(1);
8358 if (this.reader.peekn(1) == " ") {
8359 this.ea.do_ecmd_cmd = "$";
8360 }
8361 else {
8362 this.ea.do_ecmd_cmd = this.read_cmdarg();
8363 }
8364 }
8365}
8366
8367VimLParser.prototype.read_cmdarg = function() {
8368 var r = "";
8369 while (TRUE) {
8370 var c = this.reader.peekn(1);
8371 if (c == "" || iswhite(c)) {
8372 break;
8373 }
8374 this.reader.getn(1);
8375 if (c == "\\") {
8376 var c = this.reader.getn(1);
8377 }
8378 r += c;
8379 }
8380 return r;
8381}
8382
8383VimLParser.prototype.parse_comment = function() {
8384 var npos = this.reader.getpos();
8385 var c = this.reader.get();
8386 if (c != "\"") {
8387 throw Err(viml_printf("unexpected character: %s", c), npos);
8388 }
8389 var node = Node(NODE_COMMENT);
8390 node.pos = npos;
8391 node.str = this.reader.getn(-1);
8392 this.add_node(node);
8393}
8394
8395VimLParser.prototype.parse_trail = function() {
8396 this.reader.skip_white();
8397 var c = this.reader.peek();
8398 if (c == "<EOF>") {
8399 // pass
8400 }
8401 else if (c == "<EOL>") {
8402 this.reader.get();
8403 }
8404 else if (c == "|") {
8405 this.reader.get();
8406 }
8407 else if (c == "\"") {
8408 this.parse_comment();
8409 this.reader.get();
8410 }
8411 else {
8412 throw Err(viml_printf("E488: Trailing characters: %s", c), this.reader.getpos());
8413 }
8414}
8415
8416// modifier or range only command line
8417VimLParser.prototype.parse_cmd_modifier_range = function() {
8418 var node = Node(NODE_EXCMD);
8419 node.pos = this.ea.cmdpos;
8420 node.ea = this.ea;
8421 node.str = this.reader.getstr(this.ea.linepos, this.reader.getpos());
8422 this.add_node(node);
8423}
8424
8425// TODO:
8426VimLParser.prototype.parse_cmd_common = function() {
8427 var end = this.reader.getpos();
8428 if (viml_eqregh(this.ea.cmd.flags, "\\<TRLBAR\\>") && !this.ea.usefilter) {
8429 var end = this.separate_nextcmd();
8430 }
8431 else if (this.ea.cmd.name == "!" || this.ea.cmd.name == "global" || this.ea.cmd.name == "vglobal" || this.ea.usefilter) {
8432 while (TRUE) {
8433 var end = this.reader.getpos();
8434 if (this.reader.getn(1) == "") {
8435 break;
8436 }
8437 }
8438 }
8439 else {
8440 while (TRUE) {
8441 var end = this.reader.getpos();
8442 if (this.reader.getn(1) == "") {
8443 break;
8444 }
8445 }
8446 }
8447 var node = Node(NODE_EXCMD);
8448 node.pos = this.ea.cmdpos;
8449 node.ea = this.ea;
8450 node.str = this.reader.getstr(this.ea.linepos, end);
8451 this.add_node(node);
8452}
8453
8454VimLParser.prototype.separate_nextcmd = function() {
8455 if (this.ea.cmd.name == "vimgrep" || this.ea.cmd.name == "vimgrepadd" || this.ea.cmd.name == "lvimgrep" || this.ea.cmd.name == "lvimgrepadd") {
8456 this.skip_vimgrep_pat();
8457 }
8458 var pc = "";
8459 var end = this.reader.getpos();
8460 var nospend = end;
8461 while (TRUE) {
8462 var end = this.reader.getpos();
8463 if (!iswhite(pc)) {
8464 var nospend = end;
8465 }
8466 var c = this.reader.peek();
8467 if (c == "<EOF>" || c == "<EOL>") {
8468 break;
8469 }
8470 else if (c == "\x16") {
8471 // <C-V>
8472 this.reader.get();
8473 var end = this.reader.getpos();
8474 var nospend = this.reader.getpos();
8475 var c = this.reader.peek();
8476 if (c == "<EOF>" || c == "<EOL>") {
8477 break;
8478 }
8479 this.reader.get();
8480 }
8481 else if (this.reader.peekn(2) == "`=" && viml_eqregh(this.ea.cmd.flags, "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>")) {
8482 this.reader.getn(2);
8483 this.parse_expr();
8484 var c = this.reader.peekn(1);
8485 if (c != "`") {
8486 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
8487 }
8488 this.reader.getn(1);
8489 }
8490 else if (c == "|" || c == "\n" || c == "\"" && !viml_eqregh(this.ea.cmd.flags, "\\<NOTRLCOM\\>") && (this.ea.cmd.name != "@" && this.ea.cmd.name != "*" || this.reader.getpos() != this.ea.argpos) && (this.ea.cmd.name != "redir" || this.reader.getpos().i != this.ea.argpos.i + 1 || pc != "@")) {
8491 var has_cpo_bar = FALSE;
8492 // &cpoptions =~ 'b'
8493 if ((!has_cpo_bar || !viml_eqregh(this.ea.cmd.flags, "\\<USECTRLV\\>")) && pc == "\\") {
8494 this.reader.get();
8495 }
8496 else {
8497 break;
8498 }
8499 }
8500 else {
8501 this.reader.get();
8502 }
8503 var pc = c;
8504 }
8505 if (!viml_eqregh(this.ea.cmd.flags, "\\<NOTRLCOM\\>")) {
8506 var end = nospend;
8507 }
8508 return end;
8509}
8510
8511// FIXME
8512VimLParser.prototype.skip_vimgrep_pat = function() {
8513 if (this.reader.peekn(1) == "") {
8514 // pass
8515 }
8516 else if (isidc(this.reader.peekn(1))) {
8517 // :vimgrep pattern fname
8518 this.reader.read_nonwhite();
8519 }
8520 else {
8521 // :vimgrep /pattern/[g][j] fname
8522 var c = this.reader.getn(1);
8523 var __tmp = this.parse_pattern(c);
8524 var _ = __tmp[0];
8525 var endc = __tmp[1];
8526 if (c != endc) {
8527 return;
8528 }
8529 while (this.reader.p(0) == "g" || this.reader.p(0) == "j") {
8530 this.reader.getn(1);
8531 }
8532 }
8533}
8534
8535VimLParser.prototype.parse_cmd_append = function() {
8536 this.reader.setpos(this.ea.linepos);
8537 var cmdline = this.reader.readline();
8538 var lines = [cmdline];
8539 var m = ".";
8540 while (TRUE) {
8541 if (this.reader.peek() == "<EOF>") {
8542 break;
8543 }
8544 var line = this.reader.getn(-1);
8545 viml_add(lines, line);
8546 if (line == m) {
8547 break;
8548 }
8549 this.reader.get();
8550 }
8551 var node = Node(NODE_EXCMD);
8552 node.pos = this.ea.cmdpos;
8553 node.ea = this.ea;
8554 node.str = viml_join(lines, "\n");
8555 this.add_node(node);
8556}
8557
8558VimLParser.prototype.parse_cmd_insert = function() {
8559 this.parse_cmd_append();
8560}
8561
8562VimLParser.prototype.parse_cmd_loadkeymap = function() {
8563 this.reader.setpos(this.ea.linepos);
8564 var cmdline = this.reader.readline();
8565 var lines = [cmdline];
8566 while (TRUE) {
8567 if (this.reader.peek() == "<EOF>") {
8568 break;
8569 }
8570 var line = this.reader.readline();
8571 viml_add(lines, line);
8572 }
8573 var node = Node(NODE_EXCMD);
8574 node.pos = this.ea.cmdpos;
8575 node.ea = this.ea;
8576 node.str = viml_join(lines, "\n");
8577 this.add_node(node);
8578}
8579
8580VimLParser.prototype.parse_cmd_lua = function() {
8581 var lines = [];
8582 this.reader.skip_white();
8583 if (this.reader.peekn(2) == "<<") {
8584 this.reader.getn(2);
8585 this.reader.skip_white();
8586 var m = this.reader.readline();
8587 if (m == "") {
8588 var m = ".";
8589 }
8590 this.reader.setpos(this.ea.linepos);
8591 var cmdline = this.reader.getn(-1);
8592 var lines = [cmdline];
8593 this.reader.get();
8594 while (TRUE) {
8595 if (this.reader.peek() == "<EOF>") {
8596 break;
8597 }
8598 var line = this.reader.getn(-1);
8599 viml_add(lines, line);
8600 if (line == m) {
8601 break;
8602 }
8603 this.reader.get();
8604 }
8605 }
8606 else {
8607 this.reader.setpos(this.ea.linepos);
8608 var cmdline = this.reader.getn(-1);
8609 var lines = [cmdline];
8610 }
8611 var node = Node(NODE_EXCMD);
8612 node.pos = this.ea.cmdpos;
8613 node.ea = this.ea;
8614 node.str = viml_join(lines, "\n");
8615 this.add_node(node);
8616}
8617
8618VimLParser.prototype.parse_cmd_mzscheme = function() {
8619 this.parse_cmd_lua();
8620}
8621
8622VimLParser.prototype.parse_cmd_perl = function() {
8623 this.parse_cmd_lua();
8624}
8625
8626VimLParser.prototype.parse_cmd_python = function() {
8627 this.parse_cmd_lua();
8628}
8629
8630VimLParser.prototype.parse_cmd_python3 = function() {
8631 this.parse_cmd_lua();
8632}
8633
8634VimLParser.prototype.parse_cmd_ruby = function() {
8635 this.parse_cmd_lua();
8636}
8637
8638VimLParser.prototype.parse_cmd_tcl = function() {
8639 this.parse_cmd_lua();
8640}
8641
8642VimLParser.prototype.parse_cmd_finish = function() {
8643 this.parse_cmd_common();
8644 if (this.context[0].type == NODE_TOPLEVEL) {
8645 this.reader.seek_end(0);
8646 }
8647}
8648
8649// FIXME
8650VimLParser.prototype.parse_cmd_usercmd = function() {
8651 this.parse_cmd_common();
8652}
8653
8654VimLParser.prototype.parse_cmd_function = function() {
8655 var pos = this.reader.tell();
8656 this.reader.skip_white();
8657 // :function
8658 if (this.ends_excmds(this.reader.peek())) {
8659 this.reader.seek_set(pos);
8660 this.parse_cmd_common();
8661 return;
8662 }
8663 // :function /pattern
8664 if (this.reader.peekn(1) == "/") {
8665 this.reader.seek_set(pos);
8666 this.parse_cmd_common();
8667 return;
8668 }
8669 var left = this.parse_lvalue_func();
8670 this.reader.skip_white();
8671 if (left.type == NODE_IDENTIFIER) {
8672 var s = left.value;
8673 var ss = viml_split(s, "\\zs");
8674 if (ss[0] != "<" && ss[0] != "_" && !isupper(ss[0]) && viml_stridx(s, ":") == -1 && viml_stridx(s, "#") == -1) {
8675 throw Err(viml_printf("E128: Function name must start with a capital or contain a colon: %s", s), left.pos);
8676 }
8677 }
8678 // :function {name}
8679 if (this.reader.peekn(1) != "(") {
8680 this.reader.seek_set(pos);
8681 this.parse_cmd_common();
8682 return;
8683 }
8684 // :function[!] {name}([arguments]) [range] [abort] [dict] [closure]
8685 var node = Node(NODE_FUNCTION);
8686 node.pos = this.ea.cmdpos;
8687 node.body = [];
8688 node.ea = this.ea;
8689 node.left = left;
8690 node.rlist = [];
8691 node.default_args = [];
8692 node.attr = {"range":0, "abort":0, "dict":0, "closure":0};
8693 node.endfunction = NIL;
8694 this.reader.getn(1);
8695 var tokenizer = new ExprTokenizer(this.reader);
8696 if (tokenizer.peek().type == TOKEN_PCLOSE) {
8697 tokenizer.get();
8698 }
8699 else {
8700 var named = {};
8701 while (TRUE) {
8702 var varnode = Node(NODE_IDENTIFIER);
8703 var token = tokenizer.get();
8704 if (token.type == TOKEN_IDENTIFIER) {
8705 if (!isargname(token.value) || token.value == "firstline" || token.value == "lastline") {
8706 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
8707 }
8708 else if (viml_has_key(named, token.value)) {
8709 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
8710 }
8711 named[token.value] = 1;
8712 varnode.pos = token.pos;
8713 varnode.value = token.value;
8714 viml_add(node.rlist, varnode);
8715 if (tokenizer.peek().type == TOKEN_EQ) {
8716 tokenizer.get();
8717 viml_add(node.default_args, this.parse_expr());
8718 }
8719 else if (viml_len(node.default_args) > 0) {
8720 throw Err("E989: Non-default argument follows default argument", varnode.pos);
8721 }
8722 // XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
8723 if (iswhite(this.reader.p(0)) && tokenizer.peek().type == TOKEN_COMMA) {
8724 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
8725 }
8726 var token = tokenizer.get();
8727 if (token.type == TOKEN_COMMA) {
8728 // XXX: Vim allows last comma. F(a, b, ) => OK
8729 if (tokenizer.peek().type == TOKEN_PCLOSE) {
8730 tokenizer.get();
8731 break;
8732 }
8733 }
8734 else if (token.type == TOKEN_PCLOSE) {
8735 break;
8736 }
8737 else {
8738 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
8739 }
8740 }
8741 else if (token.type == TOKEN_DOTDOTDOT) {
8742 varnode.pos = token.pos;
8743 varnode.value = token.value;
8744 viml_add(node.rlist, varnode);
8745 var token = tokenizer.get();
8746 if (token.type == TOKEN_PCLOSE) {
8747 break;
8748 }
8749 else {
8750 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
8751 }
8752 }
8753 else {
8754 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
8755 }
8756 }
8757 }
8758 while (TRUE) {
8759 this.reader.skip_white();
8760 var epos = this.reader.getpos();
8761 var key = this.reader.read_alpha();
8762 if (key == "") {
8763 break;
8764 }
8765 else if (key == "range") {
8766 node.attr.range = TRUE;
8767 }
8768 else if (key == "abort") {
8769 node.attr.abort = TRUE;
8770 }
8771 else if (key == "dict") {
8772 node.attr.dict = TRUE;
8773 }
8774 else if (key == "closure") {
8775 node.attr.closure = TRUE;
8776 }
8777 else {
8778 throw Err(viml_printf("unexpected token: %s", key), epos);
8779 }
8780 }
8781 this.add_node(node);
8782 this.push_context(node);
8783}
8784
8785VimLParser.prototype.parse_cmd_endfunction = function() {
8786 this.check_missing_endif("ENDFUNCTION", this.ea.cmdpos);
8787 this.check_missing_endtry("ENDFUNCTION", this.ea.cmdpos);
8788 this.check_missing_endwhile("ENDFUNCTION", this.ea.cmdpos);
8789 this.check_missing_endfor("ENDFUNCTION", this.ea.cmdpos);
8790 if (this.context[0].type != NODE_FUNCTION) {
8791 throw Err("E193: :endfunction not inside a function", this.ea.cmdpos);
8792 }
8793 this.reader.getn(-1);
8794 var node = Node(NODE_ENDFUNCTION);
8795 node.pos = this.ea.cmdpos;
8796 node.ea = this.ea;
8797 this.context[0].endfunction = node;
8798 this.pop_context();
8799}
8800
8801VimLParser.prototype.parse_cmd_delfunction = function() {
8802 var node = Node(NODE_DELFUNCTION);
8803 node.pos = this.ea.cmdpos;
8804 node.ea = this.ea;
8805 node.left = this.parse_lvalue_func();
8806 this.add_node(node);
8807}
8808
8809VimLParser.prototype.parse_cmd_return = function() {
8810 if (this.find_context(NODE_FUNCTION) == -1) {
8811 throw Err("E133: :return not inside a function", this.ea.cmdpos);
8812 }
8813 var node = Node(NODE_RETURN);
8814 node.pos = this.ea.cmdpos;
8815 node.ea = this.ea;
8816 node.left = NIL;
8817 this.reader.skip_white();
8818 var c = this.reader.peek();
8819 if (c == "\"" || !this.ends_excmds(c)) {
8820 node.left = this.parse_expr();
8821 }
8822 this.add_node(node);
8823}
8824
8825VimLParser.prototype.parse_cmd_call = function() {
8826 var node = Node(NODE_EXCALL);
8827 node.pos = this.ea.cmdpos;
8828 node.ea = this.ea;
8829 this.reader.skip_white();
8830 var c = this.reader.peek();
8831 if (this.ends_excmds(c)) {
8832 throw Err("E471: Argument required", this.reader.getpos());
8833 }
8834 node.left = this.parse_expr();
8835 if (node.left.type != NODE_CALL) {
8836 throw Err("Not an function call", node.left.pos);
8837 }
8838 this.add_node(node);
8839}
8840
8841VimLParser.prototype.parse_heredoc = function() {
8842 var node = Node(NODE_HEREDOC);
8843 node.pos = this.ea.cmdpos;
8844 node.op = "";
8845 node.rlist = [];
8846 node.body = [];
8847 while (TRUE) {
8848 this.reader.skip_white();
8849 var key = this.reader.read_word();
8850 if (key == "") {
8851 break;
8852 }
8853 if (!islower(key[0])) {
8854 node.op = key;
8855 break;
8856 }
8857 else {
8858 viml_add(node.rlist, key);
8859 }
8860 }
8861 if (node.op == "") {
8862 throw Err("E172: Missing marker", this.reader.getpos());
8863 }
8864 this.parse_trail();
8865 while (TRUE) {
8866 if (this.reader.peek() == "<EOF>") {
8867 break;
8868 }
8869 var line = this.reader.getn(-1);
8870 if (line == node.op) {
8871 return node;
8872 }
8873 viml_add(node.body, line);
8874 this.reader.get();
8875 }
8876 throw Err(viml_printf("E990: Missing end marker '%s'", node.op), this.reader.getpos());
8877}
8878
8879VimLParser.prototype.parse_cmd_let = function() {
8880 var pos = this.reader.tell();
8881 this.reader.skip_white();
8882 // :let
8883 if (this.ends_excmds(this.reader.peek())) {
8884 this.reader.seek_set(pos);
8885 this.parse_cmd_common();
8886 return;
8887 }
8888 var lhs = this.parse_letlhs();
8889 this.reader.skip_white();
8890 var s1 = this.reader.peekn(1);
8891 var s2 = this.reader.peekn(2);
8892 // TODO check scriptversion?
8893 if (s2 == "..") {
8894 var s2 = this.reader.peekn(3);
8895 }
8896 else if (s2 == "=<") {
8897 var s2 = this.reader.peekn(3);
8898 }
8899 // :let {var-name} ..
8900 if (this.ends_excmds(s1) || s2 != "+=" && s2 != "-=" && s2 != ".=" && s2 != "..=" && s2 != "*=" && s2 != "/=" && s2 != "%=" && s2 != "=<<" && s1 != "=") {
8901 this.reader.seek_set(pos);
8902 this.parse_cmd_common();
8903 return;
8904 }
8905 // :let left op right
8906 var node = Node(NODE_LET);
8907 node.pos = this.ea.cmdpos;
8908 node.ea = this.ea;
8909 node.op = "";
8910 node.left = lhs.left;
8911 node.list = lhs.list;
8912 node.rest = lhs.rest;
8913 node.right = NIL;
8914 if (s2 == "+=" || s2 == "-=" || s2 == ".=" || s2 == "..=" || s2 == "*=" || s2 == "/=" || s2 == "%=") {
8915 this.reader.getn(viml_len(s2));
8916 node.op = s2;
8917 }
8918 else if (s2 == "=<<") {
8919 this.reader.getn(viml_len(s2));
8920 this.reader.skip_white();
8921 node.op = s2;
8922 node.right = this.parse_heredoc();
8923 this.add_node(node);
8924 return;
8925 }
8926 else if (s1 == "=") {
8927 this.reader.getn(1);
8928 node.op = s1;
8929 }
8930 else {
8931 throw "NOT REACHED";
8932 }
8933 node.right = this.parse_expr();
8934 this.add_node(node);
8935}
8936
8937VimLParser.prototype.parse_cmd_const = function() {
8938 var pos = this.reader.tell();
8939 this.reader.skip_white();
8940 // :const
8941 if (this.ends_excmds(this.reader.peek())) {
8942 this.reader.seek_set(pos);
8943 this.parse_cmd_common();
8944 return;
8945 }
8946 var lhs = this.parse_constlhs();
8947 this.reader.skip_white();
8948 var s1 = this.reader.peekn(1);
8949 // :const {var-name}
8950 if (this.ends_excmds(s1) || s1 != "=") {
8951 this.reader.seek_set(pos);
8952 this.parse_cmd_common();
8953 return;
8954 }
8955 // :const left op right
8956 var node = Node(NODE_CONST);
8957 node.pos = this.ea.cmdpos;
8958 node.ea = this.ea;
8959 this.reader.getn(1);
8960 node.op = s1;
8961 node.left = lhs.left;
8962 node.list = lhs.list;
8963 node.rest = lhs.rest;
8964 node.right = this.parse_expr();
8965 this.add_node(node);
8966}
8967
8968VimLParser.prototype.parse_cmd_unlet = function() {
8969 var node = Node(NODE_UNLET);
8970 node.pos = this.ea.cmdpos;
8971 node.ea = this.ea;
8972 node.list = this.parse_lvaluelist();
8973 this.add_node(node);
8974}
8975
8976VimLParser.prototype.parse_cmd_lockvar = function() {
8977 var node = Node(NODE_LOCKVAR);
8978 node.pos = this.ea.cmdpos;
8979 node.ea = this.ea;
8980 node.depth = NIL;
8981 node.list = [];
8982 this.reader.skip_white();
8983 if (isdigit(this.reader.peekn(1))) {
8984 node.depth = viml_str2nr(this.reader.read_digit(), 10);
8985 }
8986 node.list = this.parse_lvaluelist();
8987 this.add_node(node);
8988}
8989
8990VimLParser.prototype.parse_cmd_unlockvar = function() {
8991 var node = Node(NODE_UNLOCKVAR);
8992 node.pos = this.ea.cmdpos;
8993 node.ea = this.ea;
8994 node.depth = NIL;
8995 node.list = [];
8996 this.reader.skip_white();
8997 if (isdigit(this.reader.peekn(1))) {
8998 node.depth = viml_str2nr(this.reader.read_digit(), 10);
8999 }
9000 node.list = this.parse_lvaluelist();
9001 this.add_node(node);
9002}
9003
9004VimLParser.prototype.parse_cmd_if = function() {
9005 var node = Node(NODE_IF);
9006 node.pos = this.ea.cmdpos;
9007 node.body = [];
9008 node.ea = this.ea;
9009 node.cond = this.parse_expr();
9010 node.elseif = [];
9011 node._else = NIL;
9012 node.endif = NIL;
9013 this.add_node(node);
9014 this.push_context(node);
9015}
9016
9017VimLParser.prototype.parse_cmd_elseif = function() {
9018 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9019 throw Err("E582: :elseif without :if", this.ea.cmdpos);
9020 }
9021 if (this.context[0].type != NODE_IF) {
9022 this.pop_context();
9023 }
9024 var node = Node(NODE_ELSEIF);
9025 node.pos = this.ea.cmdpos;
9026 node.body = [];
9027 node.ea = this.ea;
9028 node.cond = this.parse_expr();
9029 viml_add(this.context[0].elseif, node);
9030 this.push_context(node);
9031}
9032
9033VimLParser.prototype.parse_cmd_else = function() {
9034 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9035 throw Err("E581: :else without :if", this.ea.cmdpos);
9036 }
9037 if (this.context[0].type != NODE_IF) {
9038 this.pop_context();
9039 }
9040 var node = Node(NODE_ELSE);
9041 node.pos = this.ea.cmdpos;
9042 node.body = [];
9043 node.ea = this.ea;
9044 this.context[0]._else = node;
9045 this.push_context(node);
9046}
9047
9048VimLParser.prototype.parse_cmd_endif = function() {
9049 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF && this.context[0].type != NODE_ELSE) {
9050 throw Err("E580: :endif without :if", this.ea.cmdpos);
9051 }
9052 if (this.context[0].type != NODE_IF) {
9053 this.pop_context();
9054 }
9055 var node = Node(NODE_ENDIF);
9056 node.pos = this.ea.cmdpos;
9057 node.ea = this.ea;
9058 this.context[0].endif = node;
9059 this.pop_context();
9060}
9061
9062VimLParser.prototype.parse_cmd_while = function() {
9063 var node = Node(NODE_WHILE);
9064 node.pos = this.ea.cmdpos;
9065 node.body = [];
9066 node.ea = this.ea;
9067 node.cond = this.parse_expr();
9068 node.endwhile = NIL;
9069 this.add_node(node);
9070 this.push_context(node);
9071}
9072
9073VimLParser.prototype.parse_cmd_endwhile = function() {
9074 if (this.context[0].type != NODE_WHILE) {
9075 throw Err("E588: :endwhile without :while", this.ea.cmdpos);
9076 }
9077 var node = Node(NODE_ENDWHILE);
9078 node.pos = this.ea.cmdpos;
9079 node.ea = this.ea;
9080 this.context[0].endwhile = node;
9081 this.pop_context();
9082}
9083
9084VimLParser.prototype.parse_cmd_for = function() {
9085 var node = Node(NODE_FOR);
9086 node.pos = this.ea.cmdpos;
9087 node.body = [];
9088 node.ea = this.ea;
9089 node.left = NIL;
9090 node.right = NIL;
9091 node.endfor = NIL;
9092 var lhs = this.parse_letlhs();
9093 node.left = lhs.left;
9094 node.list = lhs.list;
9095 node.rest = lhs.rest;
9096 this.reader.skip_white();
9097 var epos = this.reader.getpos();
9098 if (this.reader.read_alpha() != "in") {
9099 throw Err("Missing \"in\" after :for", epos);
9100 }
9101 node.right = this.parse_expr();
9102 this.add_node(node);
9103 this.push_context(node);
9104}
9105
9106VimLParser.prototype.parse_cmd_endfor = function() {
9107 if (this.context[0].type != NODE_FOR) {
9108 throw Err("E588: :endfor without :for", this.ea.cmdpos);
9109 }
9110 var node = Node(NODE_ENDFOR);
9111 node.pos = this.ea.cmdpos;
9112 node.ea = this.ea;
9113 this.context[0].endfor = node;
9114 this.pop_context();
9115}
9116
9117VimLParser.prototype.parse_cmd_continue = function() {
9118 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9119 throw Err("E586: :continue without :while or :for", this.ea.cmdpos);
9120 }
9121 var node = Node(NODE_CONTINUE);
9122 node.pos = this.ea.cmdpos;
9123 node.ea = this.ea;
9124 this.add_node(node);
9125}
9126
9127VimLParser.prototype.parse_cmd_break = function() {
9128 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9129 throw Err("E587: :break without :while or :for", this.ea.cmdpos);
9130 }
9131 var node = Node(NODE_BREAK);
9132 node.pos = this.ea.cmdpos;
9133 node.ea = this.ea;
9134 this.add_node(node);
9135}
9136
9137VimLParser.prototype.parse_cmd_try = function() {
9138 var node = Node(NODE_TRY);
9139 node.pos = this.ea.cmdpos;
9140 node.body = [];
9141 node.ea = this.ea;
9142 node.catch = [];
9143 node._finally = NIL;
9144 node.endtry = NIL;
9145 this.add_node(node);
9146 this.push_context(node);
9147}
9148
9149VimLParser.prototype.parse_cmd_catch = function() {
9150 if (this.context[0].type == NODE_FINALLY) {
9151 throw Err("E604: :catch after :finally", this.ea.cmdpos);
9152 }
9153 else if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
9154 throw Err("E603: :catch without :try", this.ea.cmdpos);
9155 }
9156 if (this.context[0].type != NODE_TRY) {
9157 this.pop_context();
9158 }
9159 var node = Node(NODE_CATCH);
9160 node.pos = this.ea.cmdpos;
9161 node.body = [];
9162 node.ea = this.ea;
9163 node.pattern = NIL;
9164 this.reader.skip_white();
9165 if (!this.ends_excmds(this.reader.peek())) {
9166 var __tmp = this.parse_pattern(this.reader.get());
9167 node.pattern = __tmp[0];
9168 var _ = __tmp[1];
9169 }
9170 viml_add(this.context[0].catch, node);
9171 this.push_context(node);
9172}
9173
9174VimLParser.prototype.parse_cmd_finally = function() {
9175 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
9176 throw Err("E606: :finally without :try", this.ea.cmdpos);
9177 }
9178 if (this.context[0].type != NODE_TRY) {
9179 this.pop_context();
9180 }
9181 var node = Node(NODE_FINALLY);
9182 node.pos = this.ea.cmdpos;
9183 node.body = [];
9184 node.ea = this.ea;
9185 this.context[0]._finally = node;
9186 this.push_context(node);
9187}
9188
9189VimLParser.prototype.parse_cmd_endtry = function() {
9190 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH && this.context[0].type != NODE_FINALLY) {
9191 throw Err("E602: :endtry without :try", this.ea.cmdpos);
9192 }
9193 if (this.context[0].type != NODE_TRY) {
9194 this.pop_context();
9195 }
9196 var node = Node(NODE_ENDTRY);
9197 node.pos = this.ea.cmdpos;
9198 node.ea = this.ea;
9199 this.context[0].endtry = node;
9200 this.pop_context();
9201}
9202
9203VimLParser.prototype.parse_cmd_throw = function() {
9204 var node = Node(NODE_THROW);
9205 node.pos = this.ea.cmdpos;
9206 node.ea = this.ea;
9207 node.left = this.parse_expr();
9208 this.add_node(node);
9209}
9210
9211VimLParser.prototype.parse_cmd_eval = function() {
9212 var node = Node(NODE_EVAL);
9213 node.pos = this.ea.cmdpos;
9214 node.ea = this.ea;
9215 node.left = this.parse_expr();
9216 this.add_node(node);
9217}
9218
9219VimLParser.prototype.parse_cmd_echo = function() {
9220 var node = Node(NODE_ECHO);
9221 node.pos = this.ea.cmdpos;
9222 node.ea = this.ea;
9223 node.list = this.parse_exprlist();
9224 this.add_node(node);
9225}
9226
9227VimLParser.prototype.parse_cmd_echon = function() {
9228 var node = Node(NODE_ECHON);
9229 node.pos = this.ea.cmdpos;
9230 node.ea = this.ea;
9231 node.list = this.parse_exprlist();
9232 this.add_node(node);
9233}
9234
9235VimLParser.prototype.parse_cmd_echohl = function() {
9236 var node = Node(NODE_ECHOHL);
9237 node.pos = this.ea.cmdpos;
9238 node.ea = this.ea;
9239 node.str = "";
9240 while (!this.ends_excmds(this.reader.peek())) {
9241 node.str += this.reader.get();
9242 }
9243 this.add_node(node);
9244}
9245
9246VimLParser.prototype.parse_cmd_echomsg = function() {
9247 var node = Node(NODE_ECHOMSG);
9248 node.pos = this.ea.cmdpos;
9249 node.ea = this.ea;
9250 node.list = this.parse_exprlist();
9251 this.add_node(node);
9252}
9253
9254VimLParser.prototype.parse_cmd_echoerr = function() {
9255 var node = Node(NODE_ECHOERR);
9256 node.pos = this.ea.cmdpos;
9257 node.ea = this.ea;
9258 node.list = this.parse_exprlist();
9259 this.add_node(node);
9260}
9261
9262VimLParser.prototype.parse_cmd_execute = function() {
9263 var node = Node(NODE_EXECUTE);
9264 node.pos = this.ea.cmdpos;
9265 node.ea = this.ea;
9266 node.list = this.parse_exprlist();
9267 this.add_node(node);
9268}
9269
9270VimLParser.prototype.parse_expr = function() {
9271 return new ExprParser(this.reader).parse();
9272}
9273
9274VimLParser.prototype.parse_exprlist = function() {
9275 var list = [];
9276 while (TRUE) {
9277 this.reader.skip_white();
9278 var c = this.reader.peek();
9279 if (c != "\"" && this.ends_excmds(c)) {
9280 break;
9281 }
9282 var node = this.parse_expr();
9283 viml_add(list, node);
9284 }
9285 return list;
9286}
9287
9288VimLParser.prototype.parse_lvalue_func = function() {
9289 var p = new LvalueParser(this.reader);
9290 var node = p.parse();
9291 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME || node.type == NODE_SUBSCRIPT || node.type == NODE_DOT || node.type == NODE_OPTION || node.type == NODE_ENV || node.type == NODE_REG) {
9292 return node;
9293 }
9294 throw Err("Invalid Expression", node.pos);
9295}
9296
9297// FIXME:
9298VimLParser.prototype.parse_lvalue = function() {
9299 var p = new LvalueParser(this.reader);
9300 var node = p.parse();
9301 if (node.type == NODE_IDENTIFIER) {
9302 if (!isvarname(node.value)) {
9303 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
9304 }
9305 }
9306 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME || node.type == NODE_SUBSCRIPT || node.type == NODE_SLICE || node.type == NODE_DOT || node.type == NODE_OPTION || node.type == NODE_ENV || node.type == NODE_REG) {
9307 return node;
9308 }
9309 throw Err("Invalid Expression", node.pos);
9310}
9311
9312// TODO: merge with s:VimLParser.parse_lvalue()
9313VimLParser.prototype.parse_constlvalue = function() {
9314 var p = new LvalueParser(this.reader);
9315 var node = p.parse();
9316 if (node.type == NODE_IDENTIFIER) {
9317 if (!isvarname(node.value)) {
9318 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
9319 }
9320 }
9321 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME) {
9322 return node;
9323 }
9324 else if (node.type == NODE_SUBSCRIPT || node.type == NODE_SLICE || node.type == NODE_DOT) {
9325 throw Err("E996: Cannot lock a list or dict", node.pos);
9326 }
9327 else if (node.type == NODE_OPTION) {
9328 throw Err("E996: Cannot lock an option", node.pos);
9329 }
9330 else if (node.type == NODE_ENV) {
9331 throw Err("E996: Cannot lock an environment variable", node.pos);
9332 }
9333 else if (node.type == NODE_REG) {
9334 throw Err("E996: Cannot lock a register", node.pos);
9335 }
9336 throw Err("Invalid Expression", node.pos);
9337}
9338
9339VimLParser.prototype.parse_lvaluelist = function() {
9340 var list = [];
9341 var node = this.parse_expr();
9342 viml_add(list, node);
9343 while (TRUE) {
9344 this.reader.skip_white();
9345 if (this.ends_excmds(this.reader.peek())) {
9346 break;
9347 }
9348 var node = this.parse_lvalue();
9349 viml_add(list, node);
9350 }
9351 return list;
9352}
9353
9354// FIXME:
9355VimLParser.prototype.parse_letlhs = function() {
9356 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
9357 var tokenizer = new ExprTokenizer(this.reader);
9358 if (tokenizer.peek().type == TOKEN_SQOPEN) {
9359 tokenizer.get();
9360 lhs.list = [];
9361 while (TRUE) {
9362 var node = this.parse_lvalue();
9363 viml_add(lhs.list, node);
9364 var token = tokenizer.get();
9365 if (token.type == TOKEN_SQCLOSE) {
9366 break;
9367 }
9368 else if (token.type == TOKEN_COMMA) {
9369 continue;
9370 }
9371 else if (token.type == TOKEN_SEMICOLON) {
9372 var node = this.parse_lvalue();
9373 lhs.rest = node;
9374 var token = tokenizer.get();
9375 if (token.type == TOKEN_SQCLOSE) {
9376 break;
9377 }
9378 else {
9379 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
9380 }
9381 }
9382 else {
9383 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
9384 }
9385 }
9386 }
9387 else {
9388 lhs.left = this.parse_lvalue();
9389 }
9390 return lhs;
9391}
9392
9393// TODO: merge with s:VimLParser.parse_letlhs() ?
9394VimLParser.prototype.parse_constlhs = function() {
9395 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
9396 var tokenizer = new ExprTokenizer(this.reader);
9397 if (tokenizer.peek().type == TOKEN_SQOPEN) {
9398 tokenizer.get();
9399 lhs.list = [];
9400 while (TRUE) {
9401 var node = this.parse_lvalue();
9402 viml_add(lhs.list, node);
9403 var token = tokenizer.get();
9404 if (token.type == TOKEN_SQCLOSE) {
9405 break;
9406 }
9407 else if (token.type == TOKEN_COMMA) {
9408 continue;
9409 }
9410 else if (token.type == TOKEN_SEMICOLON) {
9411 var node = this.parse_lvalue();
9412 lhs.rest = node;
9413 var token = tokenizer.get();
9414 if (token.type == TOKEN_SQCLOSE) {
9415 break;
9416 }
9417 else {
9418 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
9419 }
9420 }
9421 else {
9422 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
9423 }
9424 }
9425 }
9426 else {
9427 lhs.left = this.parse_constlvalue();
9428 }
9429 return lhs;
9430}
9431
9432VimLParser.prototype.ends_excmds = function(c) {
9433 return c == "" || c == "|" || c == "\"" || c == "<EOF>" || c == "<EOL>";
9434}
9435
9436// FIXME: validate argument
9437VimLParser.prototype.parse_wincmd = function() {
9438 var c = this.reader.getn(1);
9439 if (c == "") {
9440 throw Err("E471: Argument required", this.reader.getpos());
9441 }
9442 else if (c == "g" || c == "\x07") {
9443 // <C-G>
9444 var c2 = this.reader.getn(1);
9445 if (c2 == "" || iswhite(c2)) {
9446 throw Err("E474: Invalid Argument", this.reader.getpos());
9447 }
9448 }
9449 var end = this.reader.getpos();
9450 this.reader.skip_white();
9451 if (!this.ends_excmds(this.reader.peek())) {
9452 throw Err("E474: Invalid Argument", this.reader.getpos());
9453 }
9454 var node = Node(NODE_EXCMD);
9455 node.pos = this.ea.cmdpos;
9456 node.ea = this.ea;
9457 node.str = this.reader.getstr(this.ea.linepos, end);
9458 this.add_node(node);
9459}
9460
9461// FIXME: validate argument
9462VimLParser.prototype.parse_cmd_syntax = function() {
9463 var end = this.reader.getpos();
9464 while (TRUE) {
9465 var end = this.reader.getpos();
9466 var c = this.reader.peek();
9467 if (c == "/" || c == "'" || c == "\"") {
9468 this.reader.getn(1);
9469 this.parse_pattern(c);
9470 }
9471 else if (c == "=") {
9472 this.reader.getn(1);
9473 this.parse_pattern(" ");
9474 }
9475 else if (this.ends_excmds(c)) {
9476 break;
9477 }
9478 this.reader.getn(1);
9479 }
9480 var node = Node(NODE_EXCMD);
9481 node.pos = this.ea.cmdpos;
9482 node.ea = this.ea;
9483 node.str = this.reader.getstr(this.ea.linepos, end);
9484 this.add_node(node);
9485}
9486
9487VimLParser.prototype.neovim_additional_commands = [{"name":"rshada", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"wshada", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}];
9488VimLParser.prototype.neovim_removed_commands = [{"name":"Print", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"fixdel", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"helpfind", "minlen":5, "flags":"EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"open", "minlen":1, "flags":"RANGE|BANG|EXTRA", "parser":"parse_cmd_common"}, {"name":"shell", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tearoff", "minlen":2, "flags":"NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"gvim", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}];
9489// To find new builtin_commands, run the below script.
9490// $ scripts/update_builtin_commands.sh /path/to/vim/src/ex_cmds.h
9491VimLParser.prototype.builtin_commands = [{"name":"append", "minlen":1, "flags":"BANG|RANGE|ZEROR|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_append"}, {"name":"abbreviate", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"abclear", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"aboveleft", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"all", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"amenu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"anoremenu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"args", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argadd", "minlen":4, "flags":"BANG|NEEDARG|RANGE|NOTADR|ZEROR|FILES|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argdelete", "minlen":4, "flags":"BANG|RANGE|NOTADR|FILES|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argedit", "minlen":4, "flags":"BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argdo", "minlen":5, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"argglobal", "minlen":4, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"arglocal", "minlen":4, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argument", "minlen":4, "flags":"BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"ascii", "minlen":2, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"autocmd", "minlen":2, "flags":"BANG|EXTRA|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"augroup", "minlen":3, "flags":"BANG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"aunmenu", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"buffer", "minlen":1, "flags":"BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bNext", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"ball", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"badd", "minlen":3, "flags":"NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"bdelete", "minlen":2, "flags":"BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"behave", "minlen":2, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"belowright", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"bfirst", "minlen":2, "flags":"BANG|RANGE|NOTADR|TRLBAR", "parser":"parse_cmd_common"}, {"name":"blast", "minlen":2, "flags":"BANG|RANGE|NOTADR|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bmodified", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bnext", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"botright", "minlen":2, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"bprevious", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"brewind", "minlen":2, "flags":"BANG|RANGE|NOTADR|TRLBAR", "parser":"parse_cmd_common"}, {"name":"break", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_break"}, {"name":"breakadd", "minlen":6, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"breakdel", "minlen":6, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"breaklist", "minlen":6, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"browse", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"bufdo", "minlen":5, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"buffers", "minlen":7, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"bunload", "minlen":3, "flags":"BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bwipeout", "minlen":2, "flags":"BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"change", "minlen":1, "flags":"BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"cNext", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cNfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cabbrev", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cabclear", "minlen":4, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"caddbuffer", "minlen":3, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"caddexpr", "minlen":5, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"caddfile", "minlen":5, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"call", "minlen":3, "flags":"RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_call"}, {"name":"catch", "minlen":3, "flags":"EXTRA|SBOXOK|CMDWIN", "parser":"parse_cmd_catch"}, {"name":"cbuffer", "minlen":2, "flags":"BANG|RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cc", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cclose", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cd", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"center", "minlen":2, "flags":"TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"cexpr", "minlen":3, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cfile", "minlen":2, "flags":"TRLBAR|FILE1|BANG", "parser":"parse_cmd_common"}, {"name":"cfirst", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cgetbuffer", "minlen":5, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cgetexpr", "minlen":5, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cgetfile", "minlen":2, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"changes", "minlen":7, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"chdir", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"checkpath", "minlen":3, "flags":"TRLBAR|BANG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"checktime", "minlen":6, "flags":"RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"clist", "minlen":2, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"clast", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"close", "minlen":3, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cnext", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cnewer", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cnfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cnoremap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cnoreabbrev", "minlen":6, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"copy", "minlen":2, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"colder", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"colorscheme", "minlen":4, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"command", "minlen":3, "flags":"EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"comclear", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"compiler", "minlen":4, "flags":"BANG|TRLBAR|WORD1|CMDWIN", "parser":"parse_cmd_common"}, {"name":"continue", "minlen":3, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_continue"}, {"name":"confirm", "minlen":4, "flags":"NEEDARG|EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"copen", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cprevious", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cpfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cquit", "minlen":2, "flags":"TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"crewind", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cscope", "minlen":2, "flags":"EXTRA|NOTRLCOM|XFILE", "parser":"parse_cmd_common"}, {"name":"cstag", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"cunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cunabbrev", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cwindow", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"delete", "minlen":1, "flags":"RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"delmarks", "minlen":4, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"debug", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"debuggreedy", "minlen":6, "flags":"RANGE|NOTADR|ZEROR|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"delcommand", "minlen":4, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"delfunction", "minlen":4, "flags":"BANG|NEEDARG|WORD1|CMDWIN", "parser":"parse_cmd_delfunction"}, {"name":"diffupdate", "minlen":3, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffget", "minlen":5, "flags":"RANGE|EXTRA|TRLBAR|MODIFY", "parser":"parse_cmd_common"}, {"name":"diffoff", "minlen":5, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffpatch", "minlen":5, "flags":"EXTRA|FILE1|TRLBAR|MODIFY", "parser":"parse_cmd_common"}, {"name":"diffput", "minlen":6, "flags":"RANGE|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffsplit", "minlen":5, "flags":"EXTRA|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffthis", "minlen":5, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"digraphs", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"display", "minlen":2, "flags":"EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"djump", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"dlist", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"doautocmd", "minlen":2, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"doautoall", "minlen":7, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"drop", "minlen":2, "flags":"FILES|EDITCMD|NEEDARG|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"dsearch", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"dsplit", "minlen":3, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"edit", "minlen":1, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"earlier", "minlen":2, "flags":"TRLBAR|EXTRA|NOSPC|CMDWIN", "parser":"parse_cmd_common"}, {"name":"echo", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echo"}, {"name":"echoerr", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echoerr"}, {"name":"echohl", "minlen":5, "flags":"EXTRA|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_echohl"}, {"name":"echomsg", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echomsg"}, {"name":"echon", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echon"}, {"name":"else", "minlen":2, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_else"}, {"name":"elseif", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_elseif"}, {"name":"emenu", "minlen":2, "flags":"NEEDARG|EXTRA|TRLBAR|NOTRLCOM|RANGE|NOTADR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"endif", "minlen":2, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endif"}, {"name":"endfor", "minlen":5, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endfor"}, {"name":"endfunction", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_endfunction"}, {"name":"endtry", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endtry"}, {"name":"endwhile", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endwhile"}, {"name":"enew", "minlen":3, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"eval", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_eval"}, {"name":"ex", "minlen":2, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"execute", "minlen":3, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_execute"}, {"name":"exit", "minlen":3, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"exusage", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"file", "minlen":1, "flags":"RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"files", "minlen":5, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"filetype", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"find", "minlen":3, "flags":"RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"finally", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_finally"}, {"name":"finish", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_finish"}, {"name":"first", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"fixdel", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"fold", "minlen":2, "flags":"RANGE|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"foldclose", "minlen":5, "flags":"RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"folddoopen", "minlen":5, "flags":"RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"folddoclosed", "minlen":7, "flags":"RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"foldopen", "minlen":5, "flags":"RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"for", "minlen":3, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_for"}, {"name":"function", "minlen":2, "flags":"EXTRA|BANG|CMDWIN", "parser":"parse_cmd_function"}, {"name":"global", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"goto", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"grep", "minlen":2, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"grepadd", "minlen":5, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"gui", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"gvim", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"hardcopy", "minlen":2, "flags":"RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG", "parser":"parse_cmd_common"}, {"name":"help", "minlen":1, "flags":"BANG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"helpfind", "minlen":5, "flags":"EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"helpgrep", "minlen":5, "flags":"EXTRA|NOTRLCOM|NEEDARG", "parser":"parse_cmd_common"}, {"name":"helptags", "minlen":5, "flags":"NEEDARG|FILES|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"highlight", "minlen":2, "flags":"BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"hide", "minlen":3, "flags":"BANG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"history", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"insert", "minlen":1, "flags":"BANG|RANGE|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_insert"}, {"name":"iabbrev", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"iabclear", "minlen":4, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"if", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_if"}, {"name":"ijump", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"ilist", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"imap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"imapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"imenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"inoremap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"inoreabbrev", "minlen":6, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"inoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"intro", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"isearch", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"isplit", "minlen":3, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"iunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"iunabbrev", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"iunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"join", "minlen":1, "flags":"BANG|RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"jumps", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"k", "minlen":1, "flags":"RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"keepalt", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"keepmarks", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"keepjumps", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"keeppatterns", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"lNext", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lNfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"list", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"laddexpr", "minlen":3, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"laddbuffer", "minlen":5, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"laddfile", "minlen":5, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"last", "minlen":2, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"language", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"later", "minlen":3, "flags":"TRLBAR|EXTRA|NOSPC|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lbuffer", "minlen":2, "flags":"BANG|RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lcd", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lchdir", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lclose", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lcscope", "minlen":3, "flags":"EXTRA|NOTRLCOM|XFILE", "parser":"parse_cmd_common"}, {"name":"left", "minlen":2, "flags":"TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"leftabove", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"let", "minlen":3, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_let"}, {"name":"const", "minlen":4, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_const"}, {"name":"lexpr", "minlen":3, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lfile", "minlen":2, "flags":"TRLBAR|FILE1|BANG", "parser":"parse_cmd_common"}, {"name":"lfirst", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lgetbuffer", "minlen":5, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lgetexpr", "minlen":5, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lgetfile", "minlen":2, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"lgrep", "minlen":3, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lgrepadd", "minlen":6, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lhelpgrep", "minlen":2, "flags":"EXTRA|NOTRLCOM|NEEDARG", "parser":"parse_cmd_common"}, {"name":"ll", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"llast", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"list", "minlen":3, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lmake", "minlen":4, "flags":"BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lnext", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lnewer", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lnfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"loadkeymap", "minlen":5, "flags":"CMDWIN", "parser":"parse_cmd_loadkeymap"}, {"name":"loadview", "minlen":2, "flags":"FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lockmarks", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"lockvar", "minlen":5, "flags":"BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_lockvar"}, {"name":"lolder", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lopen", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lprevious", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lpfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lrewind", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"ls", "minlen":2, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ltag", "minlen":2, "flags":"NOTADR|TRLBAR|BANG|WORD1", "parser":"parse_cmd_common"}, {"name":"lunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lua", "minlen":3, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_lua"}, {"name":"luado", "minlen":4, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"luafile", "minlen":4, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lvimgrep", "minlen":2, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lvimgrepadd", "minlen":9, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lwindow", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"move", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"mark", "minlen":2, "flags":"RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"make", "minlen":3, "flags":"BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"map", "minlen":3, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mapclear", "minlen":4, "flags":"EXTRA|BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"marks", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"match", "minlen":3, "flags":"RANGE|NOTADR|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"menu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"menutranslate", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"messages", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mkexrc", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mksession", "minlen":3, "flags":"BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"mkspell", "minlen":4, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"mkvimrc", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mkview", "minlen":5, "flags":"BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"mode", "minlen":3, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mzscheme", "minlen":2, "flags":"RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK", "parser":"parse_cmd_mzscheme"}, {"name":"mzfile", "minlen":3, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nbclose", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nbkey", "minlen":2, "flags":"EXTRA|NOTADR|NEEDARG", "parser":"parse_cmd_common"}, {"name":"nbstart", "minlen":3, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"next", "minlen":1, "flags":"RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"new", "minlen":3, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"nmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"noautocmd", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"noremap", "minlen":2, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nohlsearch", "minlen":3, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"noreabbrev", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"noremenu", "minlen":6, "flags":"RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"normal", "minlen":4, "flags":"RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"number", "minlen":2, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nunmap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"oldfiles", "minlen":2, "flags":"BANG|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"open", "minlen":1, "flags":"RANGE|BANG|EXTRA", "parser":"parse_cmd_common"}, {"name":"omap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"omapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"omenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"only", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"onoremap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"onoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"options", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"ounmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ounmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ownsyntax", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"pclose", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"pedit", "minlen":3, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"perl", "minlen":2, "flags":"RANGE|EXTRA|DFLALL|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_perl"}, {"name":"print", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"profdel", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"profile", "minlen":4, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"promptfind", "minlen":3, "flags":"EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"promptrepl", "minlen":7, "flags":"EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"perldo", "minlen":5, "flags":"RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"pop", "minlen":2, "flags":"RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"popup", "minlen":4, "flags":"NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ppop", "minlen":2, "flags":"RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"preserve", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"previous", "minlen":4, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"psearch", "minlen":2, "flags":"BANG|RANGE|WHOLEFOLD|DFLALL|EXTRA", "parser":"parse_cmd_common"}, {"name":"ptag", "minlen":2, "flags":"RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptNext", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptfirst", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptjump", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"ptlast", "minlen":3, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"ptnext", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptprevious", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptrewind", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptselect", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"put", "minlen":2, "flags":"RANGE|WHOLEFOLD|BANG|REGSTR|TRLBAR|ZEROR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"pwd", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"py3", "minlen":3, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_python3"}, {"name":"python3", "minlen":7, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_python3"}, {"name":"py3file", "minlen":4, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"python", "minlen":2, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_python"}, {"name":"pyfile", "minlen":3, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"pydo", "minlen":3, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"py3do", "minlen":4, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"quit", "minlen":1, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"quitall", "minlen":5, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"qall", "minlen":2, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"read", "minlen":1, "flags":"BANG|RANGE|WHOLEFOLD|FILE1|ARGOPT|TRLBAR|ZEROR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"recover", "minlen":3, "flags":"BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"redo", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"redir", "minlen":4, "flags":"BANG|FILES|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"redraw", "minlen":4, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"redrawstatus", "minlen":7, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"registers", "minlen":3, "flags":"EXTRA|NOTRLCOM|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"resize", "minlen":3, "flags":"RANGE|NOTADR|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"retab", "minlen":3, "flags":"TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"return", "minlen":4, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_return"}, {"name":"rewind", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"right", "minlen":2, "flags":"TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"rightbelow", "minlen":6, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"ruby", "minlen":3, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_ruby"}, {"name":"rubydo", "minlen":5, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"rubyfile", "minlen":5, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"rundo", "minlen":4, "flags":"NEEDARG|FILE1", "parser":"parse_cmd_common"}, {"name":"runtime", "minlen":2, "flags":"BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"rviminfo", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"substitute", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sNext", "minlen":2, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sandbox", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"sargument", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sall", "minlen":3, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"saveas", "minlen":3, "flags":"BANG|DFLALL|FILE1|ARGOPT|CMDWIN|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbuffer", "minlen":2, "flags":"BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbNext", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sball", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbfirst", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"sblast", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbmodified", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbnext", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbprevious", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbrewind", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"scriptnames", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"scriptencoding", "minlen":7, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"scscope", "minlen":3, "flags":"EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"set", "minlen":2, "flags":"TRLBAR|EXTRA|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"setfiletype", "minlen":4, "flags":"TRLBAR|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"setglobal", "minlen":4, "flags":"TRLBAR|EXTRA|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"setlocal", "minlen":4, "flags":"TRLBAR|EXTRA|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"sfind", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sfirst", "minlen":4, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"shell", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"simalt", "minlen":3, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sign", "minlen":3, "flags":"NEEDARG|RANGE|NOTADR|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"silent", "minlen":3, "flags":"NEEDARG|EXTRA|BANG|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sleep", "minlen":2, "flags":"RANGE|NOTADR|COUNT|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"slast", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"smagic", "minlen":2, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"smap", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"smapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"smenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"snext", "minlen":2, "flags":"RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sniff", "minlen":3, "flags":"EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"snomagic", "minlen":3, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"snoremap", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"snoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sort", "minlen":3, "flags":"RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY", "parser":"parse_cmd_common"}, {"name":"source", "minlen":2, "flags":"BANG|FILE1|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"spelldump", "minlen":6, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellgood", "minlen":3, "flags":"BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellinfo", "minlen":6, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellrepall", "minlen":6, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellundo", "minlen":6, "flags":"BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellwrong", "minlen":6, "flags":"BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"split", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sprevious", "minlen":3, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"srewind", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"stop", "minlen":2, "flags":"TRLBAR|BANG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"stag", "minlen":3, "flags":"RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"startinsert", "minlen":4, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"startgreplace", "minlen":6, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"startreplace", "minlen":6, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"stopinsert", "minlen":5, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"stjump", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"stselect", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"sunhide", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sunmap", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"suspend", "minlen":3, "flags":"TRLBAR|BANG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sview", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"swapname", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"syntax", "minlen":2, "flags":"EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_syntax"}, {"name":"syntime", "minlen":5, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"syncbind", "minlen":4, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"t", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"tNext", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"tabNext", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabclose", "minlen":4, "flags":"RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tabdo", "minlen":4, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"tabedit", "minlen":4, "flags":"BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabfind", "minlen":4, "flags":"BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|NEEDARG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabfirst", "minlen":6, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"tablast", "minlen":4, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabmove", "minlen":4, "flags":"RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabnew", "minlen":6, "flags":"BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabnext", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabonly", "minlen":4, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tabprevious", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabrewind", "minlen":4, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabs", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tab", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"tag", "minlen":2, "flags":"RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"tags", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tcl", "minlen":2, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_tcl"}, {"name":"tcldo", "minlen":4, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tclfile", "minlen":4, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tearoff", "minlen":2, "flags":"NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tfirst", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"throw", "minlen":2, "flags":"EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_throw"}, {"name":"tjump", "minlen":2, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"tlast", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tmenu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tnext", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"topleft", "minlen":2, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"tprevious", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"trewind", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"try", "minlen":3, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_try"}, {"name":"tselect", "minlen":2, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"tunmenu", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"undo", "minlen":1, "flags":"RANGE|NOTADR|COUNT|ZEROR|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"undojoin", "minlen":5, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"undolist", "minlen":5, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unabbreviate", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unhide", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"unlet", "minlen":3, "flags":"BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_unlet"}, {"name":"unlockvar", "minlen":4, "flags":"BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_unlockvar"}, {"name":"unmap", "minlen":3, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unmenu", "minlen":4, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unsilent", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"update", "minlen":2, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vglobal", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|DFLALL|CMDWIN", "parser":"parse_cmd_common"}, {"name":"version", "minlen":2, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"verbose", "minlen":4, "flags":"NEEDARG|RANGE|NOTADR|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vertical", "minlen":4, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"vimgrep", "minlen":3, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"vimgrepadd", "minlen":8, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"visual", "minlen":2, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"viusage", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"view", "minlen":3, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vnew", "minlen":3, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vsplit", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"windo", "minlen":5, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"write", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"wNext", "minlen":2, "flags":"RANGE|WHOLEFOLD|NOTADR|BANG|FILE1|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wall", "minlen":2, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"while", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_while"}, {"name":"winsize", "minlen":2, "flags":"EXTRA|NEEDARG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wincmd", "minlen":4, "flags":"NEEDARG|WORD1|RANGE|NOTADR", "parser":"parse_wincmd"}, {"name":"winpos", "minlen":4, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"wnext", "minlen":2, "flags":"RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wprevious", "minlen":2, "flags":"RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wq", "minlen":2, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wqall", "minlen":3, "flags":"BANG|FILE1|ARGOPT|DFLALL|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wsverb", "minlen":2, "flags":"EXTRA|NOTADR|NEEDARG", "parser":"parse_cmd_common"}, {"name":"wundo", "minlen":2, "flags":"BANG|NEEDARG|FILE1", "parser":"parse_cmd_common"}, {"name":"wviminfo", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xit", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xall", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"xmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"yank", "minlen":1, "flags":"RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"z", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"!", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|FILES|CMDWIN", "parser":"parse_cmd_common"}, {"name":"#", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"&", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"*", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"<", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"=", "minlen":1, "flags":"RANGE|TRLBAR|DFLALL|EXFLAGS|CMDWIN", "parser":"parse_cmd_common"}, {"name":">", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"@", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"Next", "minlen":1, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"Print", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"X", "minlen":1, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"~", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"cbottom", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":3, "name":"cdo", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":3, "name":"cfdo", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"chistory", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN", "minlen":3, "name":"clearjumps", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "minlen":4, "name":"filter", "parser":"parse_cmd_common"}, {"flags":"RANGE|NOTADR|COUNT|TRLBAR", "minlen":5, "name":"helpclose", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"lbottom", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":2, "name":"ldo", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":3, "name":"lfdo", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"lhistory", "parser":"parse_cmd_common"}, {"flags":"BANG|EXTRA|TRLBAR|CMDWIN", "minlen":3, "name":"llist", "parser":"parse_cmd_common"}, {"flags":"NEEDARG|EXTRA|NOTRLCOM", "minlen":3, "name":"noswapfile", "parser":"parse_cmd_common"}, {"flags":"BANG|FILE1|NEEDARG|TRLBAR|SBOXOK|CMDWIN", "minlen":2, "name":"packadd", "parser":"parse_cmd_common"}, {"flags":"BANG|TRLBAR|SBOXOK|CMDWIN", "minlen":5, "name":"packloadall", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN|SBOXOK", "minlen":3, "name":"smile", "parser":"parse_cmd_common"}, {"flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "minlen":3, "name":"pyx", "parser":"parse_cmd_common"}, {"flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "minlen":4, "name":"pyxdo", "parser":"parse_cmd_common"}, {"flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "minlen":7, "name":"pythonx", "parser":"parse_cmd_common"}, {"flags":"RANGE|FILE1|NEEDARG|CMDWIN", "minlen":4, "name":"pyxfile", "parser":"parse_cmd_common"}, {"flags":"RANGE|BANG|FILES|CMDWIN", "minlen":3, "name":"terminal", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "minlen":3, "name":"tmap", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|CMDWIN", "minlen":5, "name":"tmapclear", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "minlen":3, "name":"tnoremap", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "minlen":5, "name":"tunmap", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":4, "name":"cabove", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"cafter", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"cbefore", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":4, "name":"cbelow", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "minlen":4, "name":"const", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"labove", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"lafter", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"lbefore", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":4, "name":"lbelow", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN", "minlen":7, "name":"redrawtabline", "parser":"parse_cmd_common"}, {"flags":"WORD1|TRLBAR|CMDWIN", "minlen":7, "name":"scriptversion", "parser":"parse_cmd_common"}, {"flags":"BANG|FILE1|TRLBAR|CMDWIN", "minlen":2, "name":"tcd", "parser":"parse_cmd_common"}, {"flags":"BANG|FILE1|TRLBAR|CMDWIN", "minlen":3, "name":"tchdir", "parser":"parse_cmd_common"}, {"flags":"RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|CTRLV|CMDWIN", "minlen":3, "name":"tlmenu", "parser":"parse_cmd_common"}, {"flags":"RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|CTRLV|CMDWIN", "minlen":3, "name":"tlnoremenu", "parser":"parse_cmd_common"}, {"flags":"RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|CTRLV|CMDWIN", "minlen":3, "name":"tlunmenu", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|CMDWIN", "minlen":2, "name":"xrestore", "parser":"parse_cmd_common"}, {"flags":"EXTRA|BANG|SBOXOK|CMDWIN", "minlen":3, "name":"def", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NEEDARG|TRLBAR|CMDWIN", "minlen":4, "name":"disassemble", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN", "minlen":4, "name":"enddef", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NOTRLCOM", "minlen":3, "name":"export", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NOTRLCOM", "minlen":3, "name":"import", "parser":"parse_cmd_common"}, {"flags":"BANG|RANGE|NEEDARG|EXTRA|TRLBAR", "minlen":7, "name":"spellrare", "parser":"parse_cmd_common"}, {"flags":"", "minlen":4, "name":"vim9script", "parser":"parse_cmd_common"}];
9492// To find new builtin_functions, run the below script.
9493// $ scripts/update_builtin_functions.sh /path/to/vim/src/evalfunc.c
9494VimLParser.prototype.builtin_functions = [{"name":"abs", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"acos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"add", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"and", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"append", "min_argc":2, "max_argc":2, "argtype":"FEARG_LAST"}, {"name":"appendbufline", "min_argc":3, "max_argc":3, "argtype":"FEARG_LAST"}, {"name":"argc", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"argidx", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"arglistid", "min_argc":0, "max_argc":2, "argtype":"0"}, {"name":"argv", "min_argc":0, "max_argc":2, "argtype":"0"}, {"name":"asin", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"assert_beeps", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"assert_equal", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_equalfile", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"assert_exception", "min_argc":1, "max_argc":2, "argtype":"0"}, {"name":"assert_fails", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"assert_false", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"assert_inrange", "min_argc":3, "max_argc":4, "argtype":"FEARG_3"}, {"name":"assert_match", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_notequal", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_notmatch", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_report", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"assert_true", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"atan", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"atan2", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"balloon_gettext", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"balloon_show", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"balloon_split", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"browse", "min_argc":4, "max_argc":4, "argtype":"0"}, {"name":"browsedir", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"bufadd", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufexists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buffer_exists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buffer_name", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buffer_number", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buflisted", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufload", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufloaded", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufname", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufnr", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"bufwinid", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufwinnr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"byte2line", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"byteidx", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"byteidxcomp", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"call", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ceil", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_canread", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_close", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_close_in", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_evalexpr", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_evalraw", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_getbufnr", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_getjob", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_info", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_log", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_logfile", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_open", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_read", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_readblob", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_readraw", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_sendexpr", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_sendraw", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_setoptions", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_status", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"changenr", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"char2nr", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"chdir", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"cindent", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"clearmatches", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"col", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"complete", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"complete_add", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"complete_check", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"complete_info", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"confirm", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"copy", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"cos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"cosh", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"count", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"cscope_connection", "min_argc":0, "max_argc":3, "argtype":"0"}, {"name":"cursor", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"debugbreak", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"deepcopy", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"delete", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"deletebufline", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"did_filetype", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"diff_filler", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"diff_hlID", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"echoraw", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"empty", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"environ", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"escape", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"eval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"eventhandler", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"executable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"execute", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"exepath", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"exists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"exp", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"expand", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"expandcmd", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"extend", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"feedkeys", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"file_readable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"filereadable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"filewritable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"filter", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"finddir", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"findfile", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"float2nr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"floor", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"fmod", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"fnameescape", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"fnamemodify", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"foldclosed", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foldclosedend", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foldlevel", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foldtext", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"foldtextresult", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foreground", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"funcref", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"function", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"garbagecollect", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"get", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getbufinfo", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getbufline", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getbufvar", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getchangelist", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getchar", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getcharmod", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcharsearch", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdline", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdpos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdtype", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdwintype", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcompletion", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getcurpos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcwd", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"getenv", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getfontname", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getfperm", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getfsize", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getftime", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getftype", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getimstatus", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getjumplist", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"getline", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"getloclist", "min_argc":1, "max_argc":2, "argtype":"0"}, {"name":"getmatches", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getmousepos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getpid", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getqflist", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getreg", "min_argc":0, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getregtype", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"gettabinfo", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"gettabvar", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"gettabwinvar", "min_argc":3, "max_argc":4, "argtype":"FEARG_1"}, {"name":"gettagstack", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getwininfo", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getwinpos", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getwinposx", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getwinposy", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getwinvar", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"glob", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"glob2regpat", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"globpath", "min_argc":2, "max_argc":5, "argtype":"FEARG_2"}, {"name":"has", "min_argc":1, "max_argc":1, "argtype":"0"}, {"name":"has_key", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"haslocaldir", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"hasmapto", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"highlightID", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"highlight_exists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"histadd", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"histdel", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"histget", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"histnr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"hlID", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"hlexists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"hostname", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"iconv", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"indent", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"index", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"input", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"inputdialog", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"inputlist", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"inputrestore", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"inputsave", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"inputsecret", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"insert", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"interrupt", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"invert", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"isdirectory", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"isinf", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"islocked", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"isnan", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"items", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_getchannel", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_info", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_setoptions", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"job_start", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"job_status", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_stop", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"join", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"js_decode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"js_encode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"json_decode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"json_encode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"keys", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"last_buffer_nr", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"len", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"libcall", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"libcallnr", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"line", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"line2byte", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"lispindent", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"list2str", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"listener_add", "min_argc":1, "max_argc":2, "argtype":"FEARG_2"}, {"name":"listener_flush", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"listener_remove", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"localtime", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"log", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"log10", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"luaeval", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"map", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"maparg", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"mapcheck", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"match", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchadd", "min_argc":2, "max_argc":5, "argtype":"FEARG_1"}, {"name":"matchaddpos", "min_argc":2, "max_argc":5, "argtype":"FEARG_1"}, {"name":"matcharg", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"matchdelete", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"matchend", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchlist", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchstr", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchstrpos", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"max", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"min", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"mkdir", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"mode", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"mzeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"nextnonblank", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"nr2char", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"or", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"pathshorten", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"perleval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_atcursor", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_beval", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_clear", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"popup_close", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_create", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_dialog", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_filter_menu", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"popup_filter_yesno", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"popup_findinfo", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"popup_findpreview", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"popup_getoptions", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_getpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_hide", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_locate", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"popup_menu", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_move", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_notification", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_setoptions", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_settext", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_show", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pow", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prevnonblank", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"printf", "min_argc":1, "max_argc":19, "argtype":"FEARG_2"}, {"name":"prompt_setcallback", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prompt_setinterrupt", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prompt_setprompt", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_add", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"prop_clear", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"prop_find", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_list", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_remove", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"prop_type_add", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_change", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_delete", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_get", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_list", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pum_getpos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"pumvisible", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"py3eval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pyeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pyxeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"rand", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"range", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"readdir", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"readfile", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"reg_executing", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"reg_recording", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"reltime", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"reltimefloat", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"reltimestr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"remote_expr", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"remote_foreground", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"remote_peek", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"remote_read", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"remote_send", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"remote_startserver", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"remove", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"rename", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"repeat", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"resolve", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"reverse", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"round", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"rubyeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"screenattr", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"screenchar", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"screenchars", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"screencol", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"screenpos", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"screenrow", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"screenstring", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"search", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"searchdecl", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"searchpair", "min_argc":3, "max_argc":7, "argtype":"0"}, {"name":"searchpairpos", "min_argc":3, "max_argc":7, "argtype":"0"}, {"name":"searchpos", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"server2client", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"serverlist", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"setbufline", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"setbufvar", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"setcharsearch", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"setcmdpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"setenv", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"setfperm", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"setline", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"setloclist", "min_argc":2, "max_argc":4, "argtype":"FEARG_2"}, {"name":"setmatches", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"setpos", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"setqflist", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"setreg", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"settabvar", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"settabwinvar", "min_argc":4, "max_argc":4, "argtype":"FEARG_4"}, {"name":"settagstack", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"setwinvar", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"sha256", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"shellescape", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"shiftwidth", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_define", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sign_getdefined", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_getplaced", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sign_jump", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"sign_place", "min_argc":4, "max_argc":5, "argtype":"FEARG_1"}, {"name":"sign_placelist", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_undefine", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_unplace", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sign_unplacelist", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"simplify", "min_argc":1, "max_argc":1, "argtype":"0"}, {"name":"sin", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sinh", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sort", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"sound_clear", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"sound_playevent", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sound_playfile", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sound_stop", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"soundfold", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"spellbadword", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"spellsuggest", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"split", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"sqrt", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"srand", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"state", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"str2float", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"str2list", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"str2nr", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strcharpart", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strchars", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strdisplaywidth", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strftime", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strgetchar", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"stridx", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"string", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"strlen", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"strpart", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strptime", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strridx", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strtrans", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"strwidth", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"submatch", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"substitute", "min_argc":4, "max_argc":4, "argtype":"FEARG_1"}, {"name":"swapinfo", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"swapname", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"synID", "min_argc":3, "max_argc":3, "argtype":"0"}, {"name":"synIDattr", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"synIDtrans", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"synconcealed", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"synstack", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"system", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"systemlist", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"tabpagebuflist", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tabpagenr", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"tabpagewinnr", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"tagfiles", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"taglist", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"tan", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tanh", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tempname", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"term_dumpdiff", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"term_dumpload", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_dumpwrite", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"term_getaltscreen", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getansicolors", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getattr", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_getcursor", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getjob", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getline", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_getscrolled", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getsize", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getstatus", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_gettitle", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_gettty", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_list", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"term_scrape", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_sendkeys", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setansicolors", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setapi", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setkill", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setrestore", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setsize", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"term_start", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_wait", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"test_alloc_fail", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"test_autochdir", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_feedinput", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_garbagecollect_now", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_garbagecollect_soon", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_getvalue", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_ignore_error", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_null_blob", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_channel", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_dict", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_job", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_list", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_partial", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_string", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_option_not_set", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_override", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"test_refcount", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_scrollbar", "min_argc":3, "max_argc":3, "argtype":"FEARG_2"}, {"name":"test_setmouse", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"test_settime", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_srand_seed", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_unknown", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_void", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"timer_info", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"timer_pause", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"timer_start", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"timer_stop", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"timer_stopall", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"tolower", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"toupper", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tr", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"trim", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"trunc", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"type", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"undofile", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"undotree", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"uniq", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"values", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"virtcol", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"visualmode", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"wildmenumode", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"win_execute", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"win_findbuf", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_getid", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"win_gettype", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_gotoid", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_id2tabwin", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_id2win", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_screenpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_splitmove", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"winbufnr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"wincol", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"windowsversion", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winheight", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winlayout", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winline", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winnr", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winrestcmd", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winrestview", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winsaveview", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winwidth", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"wordcount", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"writefile", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"xor", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}];
9495function ExprTokenizer() { this.__init__.apply(this, arguments); }
9496ExprTokenizer.prototype.__init__ = function(reader) {
9497 this.reader = reader;
9498 this.cache = {};
9499}
9500
9501ExprTokenizer.prototype.token = function(type, value, pos) {
9502 return {"type":type, "value":value, "pos":pos};
9503}
9504
9505ExprTokenizer.prototype.peek = function() {
9506 var pos = this.reader.tell();
9507 var r = this.get();
9508 this.reader.seek_set(pos);
9509 return r;
9510}
9511
9512ExprTokenizer.prototype.get = function() {
9513 // FIXME: remove dirty hack
9514 if (viml_has_key(this.cache, this.reader.tell())) {
9515 var x = this.cache[this.reader.tell()];
9516 this.reader.seek_set(x[0]);
9517 return x[1];
9518 }
9519 var pos = this.reader.tell();
9520 this.reader.skip_white();
9521 var r = this.get2();
9522 this.cache[pos] = [this.reader.tell(), r];
9523 return r;
9524}
9525
9526ExprTokenizer.prototype.get2 = function() {
9527 var r = this.reader;
9528 var pos = r.getpos();
9529 var c = r.peek();
9530 if (c == "<EOF>") {
9531 return this.token(TOKEN_EOF, c, pos);
9532 }
9533 else if (c == "<EOL>") {
9534 r.seek_cur(1);
9535 return this.token(TOKEN_EOL, c, pos);
9536 }
9537 else if (iswhite(c)) {
9538 var s = r.read_white();
9539 return this.token(TOKEN_SPACE, s, pos);
9540 }
9541 else if (c == "0" && (r.p(1) == "X" || r.p(1) == "x") && isxdigit(r.p(2))) {
9542 var s = r.getn(3);
9543 s += r.read_xdigit();
9544 return this.token(TOKEN_NUMBER, s, pos);
9545 }
9546 else if (c == "0" && (r.p(1) == "B" || r.p(1) == "b") && (r.p(2) == "0" || r.p(2) == "1")) {
9547 var s = r.getn(3);
9548 s += r.read_bdigit();
9549 return this.token(TOKEN_NUMBER, s, pos);
9550 }
9551 else if (c == "0" && (r.p(1) == "Z" || r.p(1) == "z") && r.p(2) != ".") {
9552 var s = r.getn(2);
9553 s += r.read_blob();
9554 return this.token(TOKEN_BLOB, s, pos);
9555 }
9556 else if (isdigit(c)) {
9557 var s = r.read_digit();
9558 if (r.p(0) == "." && isdigit(r.p(1))) {
9559 s += r.getn(1);
9560 s += r.read_digit();
9561 if ((r.p(0) == "E" || r.p(0) == "e") && (isdigit(r.p(1)) || (r.p(1) == "-" || r.p(1) == "+") && isdigit(r.p(2)))) {
9562 s += r.getn(2);
9563 s += r.read_digit();
9564 }
9565 }
9566 return this.token(TOKEN_NUMBER, s, pos);
9567 }
9568 else if (c == "i" && r.p(1) == "s" && !isidc(r.p(2))) {
9569 if (r.p(2) == "?") {
9570 r.seek_cur(3);
9571 return this.token(TOKEN_ISCI, "is?", pos);
9572 }
9573 else if (r.p(2) == "#") {
9574 r.seek_cur(3);
9575 return this.token(TOKEN_ISCS, "is#", pos);
9576 }
9577 else {
9578 r.seek_cur(2);
9579 return this.token(TOKEN_IS, "is", pos);
9580 }
9581 }
9582 else if (c == "i" && r.p(1) == "s" && r.p(2) == "n" && r.p(3) == "o" && r.p(4) == "t" && !isidc(r.p(5))) {
9583 if (r.p(5) == "?") {
9584 r.seek_cur(6);
9585 return this.token(TOKEN_ISNOTCI, "isnot?", pos);
9586 }
9587 else if (r.p(5) == "#") {
9588 r.seek_cur(6);
9589 return this.token(TOKEN_ISNOTCS, "isnot#", pos);
9590 }
9591 else {
9592 r.seek_cur(5);
9593 return this.token(TOKEN_ISNOT, "isnot", pos);
9594 }
9595 }
9596 else if (isnamec1(c)) {
9597 var s = r.read_name();
9598 return this.token(TOKEN_IDENTIFIER, s, pos);
9599 }
9600 else if (c == "|" && r.p(1) == "|") {
9601 r.seek_cur(2);
9602 return this.token(TOKEN_OROR, "||", pos);
9603 }
9604 else if (c == "&" && r.p(1) == "&") {
9605 r.seek_cur(2);
9606 return this.token(TOKEN_ANDAND, "&&", pos);
9607 }
9608 else if (c == "=" && r.p(1) == "=") {
9609 if (r.p(2) == "?") {
9610 r.seek_cur(3);
9611 return this.token(TOKEN_EQEQCI, "==?", pos);
9612 }
9613 else if (r.p(2) == "#") {
9614 r.seek_cur(3);
9615 return this.token(TOKEN_EQEQCS, "==#", pos);
9616 }
9617 else {
9618 r.seek_cur(2);
9619 return this.token(TOKEN_EQEQ, "==", pos);
9620 }
9621 }
9622 else if (c == "!" && r.p(1) == "=") {
9623 if (r.p(2) == "?") {
9624 r.seek_cur(3);
9625 return this.token(TOKEN_NEQCI, "!=?", pos);
9626 }
9627 else if (r.p(2) == "#") {
9628 r.seek_cur(3);
9629 return this.token(TOKEN_NEQCS, "!=#", pos);
9630 }
9631 else {
9632 r.seek_cur(2);
9633 return this.token(TOKEN_NEQ, "!=", pos);
9634 }
9635 }
9636 else if (c == ">" && r.p(1) == "=") {
9637 if (r.p(2) == "?") {
9638 r.seek_cur(3);
9639 return this.token(TOKEN_GTEQCI, ">=?", pos);
9640 }
9641 else if (r.p(2) == "#") {
9642 r.seek_cur(3);
9643 return this.token(TOKEN_GTEQCS, ">=#", pos);
9644 }
9645 else {
9646 r.seek_cur(2);
9647 return this.token(TOKEN_GTEQ, ">=", pos);
9648 }
9649 }
9650 else if (c == "<" && r.p(1) == "=") {
9651 if (r.p(2) == "?") {
9652 r.seek_cur(3);
9653 return this.token(TOKEN_LTEQCI, "<=?", pos);
9654 }
9655 else if (r.p(2) == "#") {
9656 r.seek_cur(3);
9657 return this.token(TOKEN_LTEQCS, "<=#", pos);
9658 }
9659 else {
9660 r.seek_cur(2);
9661 return this.token(TOKEN_LTEQ, "<=", pos);
9662 }
9663 }
9664 else if (c == "=" && r.p(1) == "~") {
9665 if (r.p(2) == "?") {
9666 r.seek_cur(3);
9667 return this.token(TOKEN_MATCHCI, "=~?", pos);
9668 }
9669 else if (r.p(2) == "#") {
9670 r.seek_cur(3);
9671 return this.token(TOKEN_MATCHCS, "=~#", pos);
9672 }
9673 else {
9674 r.seek_cur(2);
9675 return this.token(TOKEN_MATCH, "=~", pos);
9676 }
9677 }
9678 else if (c == "!" && r.p(1) == "~") {
9679 if (r.p(2) == "?") {
9680 r.seek_cur(3);
9681 return this.token(TOKEN_NOMATCHCI, "!~?", pos);
9682 }
9683 else if (r.p(2) == "#") {
9684 r.seek_cur(3);
9685 return this.token(TOKEN_NOMATCHCS, "!~#", pos);
9686 }
9687 else {
9688 r.seek_cur(2);
9689 return this.token(TOKEN_NOMATCH, "!~", pos);
9690 }
9691 }
9692 else if (c == ">") {
9693 if (r.p(1) == "?") {
9694 r.seek_cur(2);
9695 return this.token(TOKEN_GTCI, ">?", pos);
9696 }
9697 else if (r.p(1) == "#") {
9698 r.seek_cur(2);
9699 return this.token(TOKEN_GTCS, ">#", pos);
9700 }
9701 else {
9702 r.seek_cur(1);
9703 return this.token(TOKEN_GT, ">", pos);
9704 }
9705 }
9706 else if (c == "<") {
9707 if (r.p(1) == "?") {
9708 r.seek_cur(2);
9709 return this.token(TOKEN_LTCI, "<?", pos);
9710 }
9711 else if (r.p(1) == "#") {
9712 r.seek_cur(2);
9713 return this.token(TOKEN_LTCS, "<#", pos);
9714 }
9715 else {
9716 r.seek_cur(1);
9717 return this.token(TOKEN_LT, "<", pos);
9718 }
9719 }
9720 else if (c == "+") {
9721 r.seek_cur(1);
9722 return this.token(TOKEN_PLUS, "+", pos);
9723 }
9724 else if (c == "-") {
9725 if (r.p(1) == ">") {
9726 r.seek_cur(2);
9727 return this.token(TOKEN_ARROW, "->", pos);
9728 }
9729 else {
9730 r.seek_cur(1);
9731 return this.token(TOKEN_MINUS, "-", pos);
9732 }
9733 }
9734 else if (c == ".") {
9735 if (r.p(1) == "." && r.p(2) == ".") {
9736 r.seek_cur(3);
9737 return this.token(TOKEN_DOTDOTDOT, "...", pos);
9738 }
9739 else if (r.p(1) == ".") {
9740 r.seek_cur(2);
9741 return this.token(TOKEN_DOTDOT, "..", pos);
9742 // TODO check scriptversion?
9743 }
9744 else {
9745 r.seek_cur(1);
9746 return this.token(TOKEN_DOT, ".", pos);
9747 // TODO check scriptversion?
9748 }
9749 }
9750 else if (c == "*") {
9751 r.seek_cur(1);
9752 return this.token(TOKEN_STAR, "*", pos);
9753 }
9754 else if (c == "/") {
9755 r.seek_cur(1);
9756 return this.token(TOKEN_SLASH, "/", pos);
9757 }
9758 else if (c == "%") {
9759 r.seek_cur(1);
9760 return this.token(TOKEN_PERCENT, "%", pos);
9761 }
9762 else if (c == "!") {
9763 r.seek_cur(1);
9764 return this.token(TOKEN_NOT, "!", pos);
9765 }
9766 else if (c == "?") {
9767 r.seek_cur(1);
9768 return this.token(TOKEN_QUESTION, "?", pos);
9769 }
9770 else if (c == ":") {
9771 r.seek_cur(1);
9772 return this.token(TOKEN_COLON, ":", pos);
9773 }
9774 else if (c == "#") {
9775 if (r.p(1) == "{") {
9776 r.seek_cur(2);
9777 return this.token(TOKEN_LITCOPEN, "#{", pos);
9778 }
9779 else {
9780 r.seek_cur(1);
9781 return this.token(TOKEN_SHARP, "#", pos);
9782 }
9783 }
9784 else if (c == "(") {
9785 r.seek_cur(1);
9786 return this.token(TOKEN_POPEN, "(", pos);
9787 }
9788 else if (c == ")") {
9789 r.seek_cur(1);
9790 return this.token(TOKEN_PCLOSE, ")", pos);
9791 }
9792 else if (c == "[") {
9793 r.seek_cur(1);
9794 return this.token(TOKEN_SQOPEN, "[", pos);
9795 }
9796 else if (c == "]") {
9797 r.seek_cur(1);
9798 return this.token(TOKEN_SQCLOSE, "]", pos);
9799 }
9800 else if (c == "{") {
9801 r.seek_cur(1);
9802 return this.token(TOKEN_COPEN, "{", pos);
9803 }
9804 else if (c == "}") {
9805 r.seek_cur(1);
9806 return this.token(TOKEN_CCLOSE, "}", pos);
9807 }
9808 else if (c == ",") {
9809 r.seek_cur(1);
9810 return this.token(TOKEN_COMMA, ",", pos);
9811 }
9812 else if (c == "'") {
9813 r.seek_cur(1);
9814 return this.token(TOKEN_SQUOTE, "'", pos);
9815 }
9816 else if (c == "\"") {
9817 r.seek_cur(1);
9818 return this.token(TOKEN_DQUOTE, "\"", pos);
9819 }
9820 else if (c == "$") {
9821 var s = r.getn(1);
9822 s += r.read_word();
9823 return this.token(TOKEN_ENV, s, pos);
9824 }
9825 else if (c == "@") {
9826 // @<EOL> is treated as @"
9827 return this.token(TOKEN_REG, r.getn(2), pos);
9828 }
9829 else if (c == "&") {
9830 var s = "";
9831 if ((r.p(1) == "g" || r.p(1) == "l") && r.p(2) == ":") {
9832 var s = r.getn(3) + r.read_word();
9833 }
9834 else {
9835 var s = r.getn(1) + r.read_word();
9836 }
9837 return this.token(TOKEN_OPTION, s, pos);
9838 }
9839 else if (c == "=") {
9840 r.seek_cur(1);
9841 return this.token(TOKEN_EQ, "=", pos);
9842 }
9843 else if (c == "|") {
9844 r.seek_cur(1);
9845 return this.token(TOKEN_OR, "|", pos);
9846 }
9847 else if (c == ";") {
9848 r.seek_cur(1);
9849 return this.token(TOKEN_SEMICOLON, ";", pos);
9850 }
9851 else if (c == "`") {
9852 r.seek_cur(1);
9853 return this.token(TOKEN_BACKTICK, "`", pos);
9854 }
9855 else {
9856 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9857 }
9858}
9859
9860ExprTokenizer.prototype.get_sstring = function() {
9861 this.reader.skip_white();
9862 var c = this.reader.p(0);
9863 if (c != "'") {
9864 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9865 }
9866 this.reader.seek_cur(1);
9867 var s = "";
9868 while (TRUE) {
9869 var c = this.reader.p(0);
9870 if (c == "<EOF>" || c == "<EOL>") {
9871 throw Err("unexpected EOL", this.reader.getpos());
9872 }
9873 else if (c == "'") {
9874 this.reader.seek_cur(1);
9875 if (this.reader.p(0) == "'") {
9876 this.reader.seek_cur(1);
9877 s += "''";
9878 }
9879 else {
9880 break;
9881 }
9882 }
9883 else {
9884 this.reader.seek_cur(1);
9885 s += c;
9886 }
9887 }
9888 return s;
9889}
9890
9891ExprTokenizer.prototype.get_dstring = function() {
9892 this.reader.skip_white();
9893 var c = this.reader.p(0);
9894 if (c != "\"") {
9895 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9896 }
9897 this.reader.seek_cur(1);
9898 var s = "";
9899 while (TRUE) {
9900 var c = this.reader.p(0);
9901 if (c == "<EOF>" || c == "<EOL>") {
9902 throw Err("unexpectd EOL", this.reader.getpos());
9903 }
9904 else if (c == "\"") {
9905 this.reader.seek_cur(1);
9906 break;
9907 }
9908 else if (c == "\\") {
9909 this.reader.seek_cur(1);
9910 s += c;
9911 var c = this.reader.p(0);
9912 if (c == "<EOF>" || c == "<EOL>") {
9913 throw Err("ExprTokenizer: unexpected EOL", this.reader.getpos());
9914 }
9915 this.reader.seek_cur(1);
9916 s += c;
9917 }
9918 else {
9919 this.reader.seek_cur(1);
9920 s += c;
9921 }
9922 }
9923 return s;
9924}
9925
9926ExprTokenizer.prototype.parse_dict_literal_key = function() {
9927 this.reader.skip_white();
9928 var c = this.reader.peek();
9929 if (!isalnum(c) && c != "_" && c != "-") {
9930 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9931 }
9932 var node = Node(NODE_STRING);
9933 var s = c;
9934 this.reader.seek_cur(1);
9935 node.pos = this.reader.getpos();
9936 while (TRUE) {
9937 var c = this.reader.p(0);
9938 if (c == "<EOF>" || c == "<EOL>") {
9939 throw Err("unexpectd EOL", this.reader.getpos());
9940 }
9941 if (!isalnum(c) && c != "_" && c != "-") {
9942 break;
9943 }
9944 this.reader.seek_cur(1);
9945 s += c;
9946 }
9947 node.value = "'" + s + "'";
9948 return node;
9949}
9950
9951function ExprParser() { this.__init__.apply(this, arguments); }
9952ExprParser.prototype.__init__ = function(reader) {
9953 this.reader = reader;
9954 this.tokenizer = new ExprTokenizer(reader);
9955}
9956
9957ExprParser.prototype.parse = function() {
9958 return this.parse_expr1();
9959}
9960
9961// expr1: expr2 ? expr1 : expr1
9962ExprParser.prototype.parse_expr1 = function() {
9963 var left = this.parse_expr2();
9964 var pos = this.reader.tell();
9965 var token = this.tokenizer.get();
9966 if (token.type == TOKEN_QUESTION) {
9967 var node = Node(NODE_TERNARY);
9968 node.pos = token.pos;
9969 node.cond = left;
9970 node.left = this.parse_expr1();
9971 var token = this.tokenizer.get();
9972 if (token.type != TOKEN_COLON) {
9973 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9974 }
9975 node.right = this.parse_expr1();
9976 var left = node;
9977 }
9978 else {
9979 this.reader.seek_set(pos);
9980 }
9981 return left;
9982}
9983
9984// expr2: expr3 || expr3 ..
9985ExprParser.prototype.parse_expr2 = function() {
9986 var left = this.parse_expr3();
9987 while (TRUE) {
9988 var pos = this.reader.tell();
9989 var token = this.tokenizer.get();
9990 if (token.type == TOKEN_OROR) {
9991 var node = Node(NODE_OR);
9992 node.pos = token.pos;
9993 node.left = left;
9994 node.right = this.parse_expr3();
9995 var left = node;
9996 }
9997 else {
9998 this.reader.seek_set(pos);
9999 break;
10000 }
10001 }
10002 return left;
10003}
10004
10005// expr3: expr4 && expr4
10006ExprParser.prototype.parse_expr3 = function() {
10007 var left = this.parse_expr4();
10008 while (TRUE) {
10009 var pos = this.reader.tell();
10010 var token = this.tokenizer.get();
10011 if (token.type == TOKEN_ANDAND) {
10012 var node = Node(NODE_AND);
10013 node.pos = token.pos;
10014 node.left = left;
10015 node.right = this.parse_expr4();
10016 var left = node;
10017 }
10018 else {
10019 this.reader.seek_set(pos);
10020 break;
10021 }
10022 }
10023 return left;
10024}
10025
10026// expr4: expr5 == expr5
10027// expr5 != expr5
10028// expr5 > expr5
10029// expr5 >= expr5
10030// expr5 < expr5
10031// expr5 <= expr5
10032// expr5 =~ expr5
10033// expr5 !~ expr5
10034//
10035// expr5 ==? expr5
10036// expr5 ==# expr5
10037// etc.
10038//
10039// expr5 is expr5
10040// expr5 isnot expr5
10041ExprParser.prototype.parse_expr4 = function() {
10042 var left = this.parse_expr5();
10043 var pos = this.reader.tell();
10044 var token = this.tokenizer.get();
10045 if (token.type == TOKEN_EQEQ) {
10046 var node = Node(NODE_EQUAL);
10047 node.pos = token.pos;
10048 node.left = left;
10049 node.right = this.parse_expr5();
10050 var left = node;
10051 }
10052 else if (token.type == TOKEN_EQEQCI) {
10053 var node = Node(NODE_EQUALCI);
10054 node.pos = token.pos;
10055 node.left = left;
10056 node.right = this.parse_expr5();
10057 var left = node;
10058 }
10059 else if (token.type == TOKEN_EQEQCS) {
10060 var node = Node(NODE_EQUALCS);
10061 node.pos = token.pos;
10062 node.left = left;
10063 node.right = this.parse_expr5();
10064 var left = node;
10065 }
10066 else if (token.type == TOKEN_NEQ) {
10067 var node = Node(NODE_NEQUAL);
10068 node.pos = token.pos;
10069 node.left = left;
10070 node.right = this.parse_expr5();
10071 var left = node;
10072 }
10073 else if (token.type == TOKEN_NEQCI) {
10074 var node = Node(NODE_NEQUALCI);
10075 node.pos = token.pos;
10076 node.left = left;
10077 node.right = this.parse_expr5();
10078 var left = node;
10079 }
10080 else if (token.type == TOKEN_NEQCS) {
10081 var node = Node(NODE_NEQUALCS);
10082 node.pos = token.pos;
10083 node.left = left;
10084 node.right = this.parse_expr5();
10085 var left = node;
10086 }
10087 else if (token.type == TOKEN_GT) {
10088 var node = Node(NODE_GREATER);
10089 node.pos = token.pos;
10090 node.left = left;
10091 node.right = this.parse_expr5();
10092 var left = node;
10093 }
10094 else if (token.type == TOKEN_GTCI) {
10095 var node = Node(NODE_GREATERCI);
10096 node.pos = token.pos;
10097 node.left = left;
10098 node.right = this.parse_expr5();
10099 var left = node;
10100 }
10101 else if (token.type == TOKEN_GTCS) {
10102 var node = Node(NODE_GREATERCS);
10103 node.pos = token.pos;
10104 node.left = left;
10105 node.right = this.parse_expr5();
10106 var left = node;
10107 }
10108 else if (token.type == TOKEN_GTEQ) {
10109 var node = Node(NODE_GEQUAL);
10110 node.pos = token.pos;
10111 node.left = left;
10112 node.right = this.parse_expr5();
10113 var left = node;
10114 }
10115 else if (token.type == TOKEN_GTEQCI) {
10116 var node = Node(NODE_GEQUALCI);
10117 node.pos = token.pos;
10118 node.left = left;
10119 node.right = this.parse_expr5();
10120 var left = node;
10121 }
10122 else if (token.type == TOKEN_GTEQCS) {
10123 var node = Node(NODE_GEQUALCS);
10124 node.pos = token.pos;
10125 node.left = left;
10126 node.right = this.parse_expr5();
10127 var left = node;
10128 }
10129 else if (token.type == TOKEN_LT) {
10130 var node = Node(NODE_SMALLER);
10131 node.pos = token.pos;
10132 node.left = left;
10133 node.right = this.parse_expr5();
10134 var left = node;
10135 }
10136 else if (token.type == TOKEN_LTCI) {
10137 var node = Node(NODE_SMALLERCI);
10138 node.pos = token.pos;
10139 node.left = left;
10140 node.right = this.parse_expr5();
10141 var left = node;
10142 }
10143 else if (token.type == TOKEN_LTCS) {
10144 var node = Node(NODE_SMALLERCS);
10145 node.pos = token.pos;
10146 node.left = left;
10147 node.right = this.parse_expr5();
10148 var left = node;
10149 }
10150 else if (token.type == TOKEN_LTEQ) {
10151 var node = Node(NODE_SEQUAL);
10152 node.pos = token.pos;
10153 node.left = left;
10154 node.right = this.parse_expr5();
10155 var left = node;
10156 }
10157 else if (token.type == TOKEN_LTEQCI) {
10158 var node = Node(NODE_SEQUALCI);
10159 node.pos = token.pos;
10160 node.left = left;
10161 node.right = this.parse_expr5();
10162 var left = node;
10163 }
10164 else if (token.type == TOKEN_LTEQCS) {
10165 var node = Node(NODE_SEQUALCS);
10166 node.pos = token.pos;
10167 node.left = left;
10168 node.right = this.parse_expr5();
10169 var left = node;
10170 }
10171 else if (token.type == TOKEN_MATCH) {
10172 var node = Node(NODE_MATCH);
10173 node.pos = token.pos;
10174 node.left = left;
10175 node.right = this.parse_expr5();
10176 var left = node;
10177 }
10178 else if (token.type == TOKEN_MATCHCI) {
10179 var node = Node(NODE_MATCHCI);
10180 node.pos = token.pos;
10181 node.left = left;
10182 node.right = this.parse_expr5();
10183 var left = node;
10184 }
10185 else if (token.type == TOKEN_MATCHCS) {
10186 var node = Node(NODE_MATCHCS);
10187 node.pos = token.pos;
10188 node.left = left;
10189 node.right = this.parse_expr5();
10190 var left = node;
10191 }
10192 else if (token.type == TOKEN_NOMATCH) {
10193 var node = Node(NODE_NOMATCH);
10194 node.pos = token.pos;
10195 node.left = left;
10196 node.right = this.parse_expr5();
10197 var left = node;
10198 }
10199 else if (token.type == TOKEN_NOMATCHCI) {
10200 var node = Node(NODE_NOMATCHCI);
10201 node.pos = token.pos;
10202 node.left = left;
10203 node.right = this.parse_expr5();
10204 var left = node;
10205 }
10206 else if (token.type == TOKEN_NOMATCHCS) {
10207 var node = Node(NODE_NOMATCHCS);
10208 node.pos = token.pos;
10209 node.left = left;
10210 node.right = this.parse_expr5();
10211 var left = node;
10212 }
10213 else if (token.type == TOKEN_IS) {
10214 var node = Node(NODE_IS);
10215 node.pos = token.pos;
10216 node.left = left;
10217 node.right = this.parse_expr5();
10218 var left = node;
10219 }
10220 else if (token.type == TOKEN_ISCI) {
10221 var node = Node(NODE_ISCI);
10222 node.pos = token.pos;
10223 node.left = left;
10224 node.right = this.parse_expr5();
10225 var left = node;
10226 }
10227 else if (token.type == TOKEN_ISCS) {
10228 var node = Node(NODE_ISCS);
10229 node.pos = token.pos;
10230 node.left = left;
10231 node.right = this.parse_expr5();
10232 var left = node;
10233 }
10234 else if (token.type == TOKEN_ISNOT) {
10235 var node = Node(NODE_ISNOT);
10236 node.pos = token.pos;
10237 node.left = left;
10238 node.right = this.parse_expr5();
10239 var left = node;
10240 }
10241 else if (token.type == TOKEN_ISNOTCI) {
10242 var node = Node(NODE_ISNOTCI);
10243 node.pos = token.pos;
10244 node.left = left;
10245 node.right = this.parse_expr5();
10246 var left = node;
10247 }
10248 else if (token.type == TOKEN_ISNOTCS) {
10249 var node = Node(NODE_ISNOTCS);
10250 node.pos = token.pos;
10251 node.left = left;
10252 node.right = this.parse_expr5();
10253 var left = node;
10254 }
10255 else {
10256 this.reader.seek_set(pos);
10257 }
10258 return left;
10259}
10260
10261// expr5: expr6 + expr6 ..
10262// expr6 - expr6 ..
10263// expr6 . expr6 ..
10264// expr6 .. expr6 ..
10265ExprParser.prototype.parse_expr5 = function() {
10266 var left = this.parse_expr6();
10267 while (TRUE) {
10268 var pos = this.reader.tell();
10269 var token = this.tokenizer.get();
10270 if (token.type == TOKEN_PLUS) {
10271 var node = Node(NODE_ADD);
10272 node.pos = token.pos;
10273 node.left = left;
10274 node.right = this.parse_expr6();
10275 var left = node;
10276 }
10277 else if (token.type == TOKEN_MINUS) {
10278 var node = Node(NODE_SUBTRACT);
10279 node.pos = token.pos;
10280 node.left = left;
10281 node.right = this.parse_expr6();
10282 var left = node;
10283 }
10284 else if (token.type == TOKEN_DOTDOT) {
10285 // TODO check scriptversion?
10286 var node = Node(NODE_CONCAT);
10287 node.pos = token.pos;
10288 node.left = left;
10289 node.right = this.parse_expr6();
10290 var left = node;
10291 }
10292 else if (token.type == TOKEN_DOT) {
10293 // TODO check scriptversion?
10294 var node = Node(NODE_CONCAT);
10295 node.pos = token.pos;
10296 node.left = left;
10297 node.right = this.parse_expr6();
10298 var left = node;
10299 }
10300 else {
10301 this.reader.seek_set(pos);
10302 break;
10303 }
10304 }
10305 return left;
10306}
10307
10308// expr6: expr7 * expr7 ..
10309// expr7 / expr7 ..
10310// expr7 % expr7 ..
10311ExprParser.prototype.parse_expr6 = function() {
10312 var left = this.parse_expr7();
10313 while (TRUE) {
10314 var pos = this.reader.tell();
10315 var token = this.tokenizer.get();
10316 if (token.type == TOKEN_STAR) {
10317 var node = Node(NODE_MULTIPLY);
10318 node.pos = token.pos;
10319 node.left = left;
10320 node.right = this.parse_expr7();
10321 var left = node;
10322 }
10323 else if (token.type == TOKEN_SLASH) {
10324 var node = Node(NODE_DIVIDE);
10325 node.pos = token.pos;
10326 node.left = left;
10327 node.right = this.parse_expr7();
10328 var left = node;
10329 }
10330 else if (token.type == TOKEN_PERCENT) {
10331 var node = Node(NODE_REMAINDER);
10332 node.pos = token.pos;
10333 node.left = left;
10334 node.right = this.parse_expr7();
10335 var left = node;
10336 }
10337 else {
10338 this.reader.seek_set(pos);
10339 break;
10340 }
10341 }
10342 return left;
10343}
10344
10345// expr7: ! expr7
10346// - expr7
10347// + expr7
10348ExprParser.prototype.parse_expr7 = function() {
10349 var pos = this.reader.tell();
10350 var token = this.tokenizer.get();
10351 if (token.type == TOKEN_NOT) {
10352 var node = Node(NODE_NOT);
10353 node.pos = token.pos;
10354 node.left = this.parse_expr7();
10355 return node;
10356 }
10357 else if (token.type == TOKEN_MINUS) {
10358 var node = Node(NODE_MINUS);
10359 node.pos = token.pos;
10360 node.left = this.parse_expr7();
10361 return node;
10362 }
10363 else if (token.type == TOKEN_PLUS) {
10364 var node = Node(NODE_PLUS);
10365 node.pos = token.pos;
10366 node.left = this.parse_expr7();
10367 return node;
10368 }
10369 else {
10370 this.reader.seek_set(pos);
10371 var node = this.parse_expr8();
10372 return node;
10373 }
10374}
10375
10376// expr8: expr8[expr1]
10377// expr8[expr1 : expr1]
10378// expr8.name
10379// expr8->name(expr1, ...)
10380// expr8->s:user_func(expr1, ...)
10381// expr8->{lambda}(expr1, ...)
10382// expr8(expr1, ...)
10383ExprParser.prototype.parse_expr8 = function() {
10384 var left = this.parse_expr9();
10385 while (TRUE) {
10386 var pos = this.reader.tell();
10387 var c = this.reader.peek();
10388 var token = this.tokenizer.get();
10389 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
10390 var npos = token.pos;
10391 if (this.tokenizer.peek().type == TOKEN_COLON) {
10392 this.tokenizer.get();
10393 var node = Node(NODE_SLICE);
10394 node.pos = npos;
10395 node.left = left;
10396 node.rlist = [NIL, NIL];
10397 var token = this.tokenizer.peek();
10398 if (token.type != TOKEN_SQCLOSE) {
10399 node.rlist[1] = this.parse_expr1();
10400 }
10401 var token = this.tokenizer.get();
10402 if (token.type != TOKEN_SQCLOSE) {
10403 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10404 }
10405 var left = node;
10406 }
10407 else {
10408 var right = this.parse_expr1();
10409 if (this.tokenizer.peek().type == TOKEN_COLON) {
10410 this.tokenizer.get();
10411 var node = Node(NODE_SLICE);
10412 node.pos = npos;
10413 node.left = left;
10414 node.rlist = [right, NIL];
10415 var token = this.tokenizer.peek();
10416 if (token.type != TOKEN_SQCLOSE) {
10417 node.rlist[1] = this.parse_expr1();
10418 }
10419 var token = this.tokenizer.get();
10420 if (token.type != TOKEN_SQCLOSE) {
10421 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10422 }
10423 var left = node;
10424 }
10425 else {
10426 var node = Node(NODE_SUBSCRIPT);
10427 node.pos = npos;
10428 node.left = left;
10429 node.right = right;
10430 var token = this.tokenizer.get();
10431 if (token.type != TOKEN_SQCLOSE) {
10432 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10433 }
10434 var left = node;
10435 }
10436 }
10437 delete node;
10438 }
10439 else if (token.type == TOKEN_ARROW) {
10440 var funcname_or_lambda = this.parse_expr9();
10441 var token = this.tokenizer.get();
10442 if (token.type != TOKEN_POPEN) {
10443 throw Err("E107: Missing parentheses: lambda", token.pos);
10444 }
10445 var right = Node(NODE_CALL);
10446 right.pos = token.pos;
10447 right.left = funcname_or_lambda;
10448 right.rlist = this.parse_rlist();
10449 var node = Node(NODE_METHOD);
10450 node.pos = token.pos;
10451 node.left = left;
10452 node.right = right;
10453 var left = node;
10454 delete node;
10455 }
10456 else if (token.type == TOKEN_POPEN) {
10457 var node = Node(NODE_CALL);
10458 node.pos = token.pos;
10459 node.left = left;
10460 node.rlist = this.parse_rlist();
10461 var left = node;
10462 delete node;
10463 }
10464 else if (!iswhite(c) && token.type == TOKEN_DOT) {
10465 // TODO check scriptversion?
10466 var node = this.parse_dot(token, left);
10467 if (node === NIL) {
10468 this.reader.seek_set(pos);
10469 break;
10470 }
10471 var left = node;
10472 delete node;
10473 }
10474 else {
10475 this.reader.seek_set(pos);
10476 break;
10477 }
10478 }
10479 return left;
10480}
10481
10482ExprParser.prototype.parse_rlist = function() {
10483 var rlist = [];
10484 var token = this.tokenizer.peek();
10485 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
10486 this.tokenizer.get();
10487 }
10488 else {
10489 while (TRUE) {
10490 viml_add(rlist, this.parse_expr1());
10491 var token = this.tokenizer.get();
10492 if (token.type == TOKEN_COMMA) {
10493 // XXX: Vim allows foo(a, b, ). Lint should warn it.
10494 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
10495 this.tokenizer.get();
10496 break;
10497 }
10498 }
10499 else if (token.type == TOKEN_PCLOSE) {
10500 break;
10501 }
10502 else {
10503 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10504 }
10505 }
10506 }
10507 if (viml_len(rlist) > MAX_FUNC_ARGS) {
10508 // TODO: funcname E740: Too many arguments for function: %s
10509 throw Err("E740: Too many arguments for function", token.pos);
10510 }
10511 return rlist;
10512}
10513
10514// expr9: number
10515// "string"
10516// 'string'
10517// [expr1, ...]
10518// {expr1: expr1, ...}
10519// #{literal_key1: expr1, ...}
10520// {args -> expr1}
10521// &option
10522// (expr1)
10523// variable
10524// var{ria}ble
10525// $VAR
10526// @r
10527// function(expr1, ...)
10528// func{ti}on(expr1, ...)
10529ExprParser.prototype.parse_expr9 = function() {
10530 var pos = this.reader.tell();
10531 var token = this.tokenizer.get();
10532 var node = Node(-1);
10533 if (token.type == TOKEN_NUMBER) {
10534 var node = Node(NODE_NUMBER);
10535 node.pos = token.pos;
10536 node.value = token.value;
10537 }
10538 else if (token.type == TOKEN_BLOB) {
10539 var node = Node(NODE_BLOB);
10540 node.pos = token.pos;
10541 node.value = token.value;
10542 }
10543 else if (token.type == TOKEN_DQUOTE) {
10544 this.reader.seek_set(pos);
10545 var node = Node(NODE_STRING);
10546 node.pos = token.pos;
10547 node.value = "\"" + this.tokenizer.get_dstring() + "\"";
10548 }
10549 else if (token.type == TOKEN_SQUOTE) {
10550 this.reader.seek_set(pos);
10551 var node = Node(NODE_STRING);
10552 node.pos = token.pos;
10553 node.value = "'" + this.tokenizer.get_sstring() + "'";
10554 }
10555 else if (token.type == TOKEN_SQOPEN) {
10556 var node = Node(NODE_LIST);
10557 node.pos = token.pos;
10558 node.value = [];
10559 var token = this.tokenizer.peek();
10560 if (token.type == TOKEN_SQCLOSE) {
10561 this.tokenizer.get();
10562 }
10563 else {
10564 while (TRUE) {
10565 viml_add(node.value, this.parse_expr1());
10566 var token = this.tokenizer.peek();
10567 if (token.type == TOKEN_COMMA) {
10568 this.tokenizer.get();
10569 if (this.tokenizer.peek().type == TOKEN_SQCLOSE) {
10570 this.tokenizer.get();
10571 break;
10572 }
10573 }
10574 else if (token.type == TOKEN_SQCLOSE) {
10575 this.tokenizer.get();
10576 break;
10577 }
10578 else {
10579 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10580 }
10581 }
10582 }
10583 }
10584 else if (token.type == TOKEN_COPEN || token.type == TOKEN_LITCOPEN) {
10585 var is_litdict = token.type == TOKEN_LITCOPEN;
10586 var savepos = this.reader.tell();
10587 var nodepos = token.pos;
10588 var token = this.tokenizer.get();
10589 var lambda = token.type == TOKEN_ARROW;
10590 if (!lambda && !(token.type == TOKEN_SQUOTE || token.type == TOKEN_DQUOTE)) {
10591 // if the token type is stirng, we cannot peek next token and we can
10592 // assume it's not lambda.
10593 var token2 = this.tokenizer.peek();
10594 var lambda = token2.type == TOKEN_ARROW || token2.type == TOKEN_COMMA;
10595 }
10596 // fallback to dict or {expr} if true
10597 var fallback = FALSE;
10598 if (lambda) {
10599 // lambda {token,...} {->...} {token->...}
10600 var node = Node(NODE_LAMBDA);
10601 node.pos = nodepos;
10602 node.rlist = [];
10603 var named = {};
10604 while (TRUE) {
10605 if (token.type == TOKEN_ARROW) {
10606 break;
10607 }
10608 else if (token.type == TOKEN_IDENTIFIER) {
10609 if (!isargname(token.value)) {
10610 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
10611 }
10612 else if (viml_has_key(named, token.value)) {
10613 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
10614 }
10615 named[token.value] = 1;
10616 var varnode = Node(NODE_IDENTIFIER);
10617 varnode.pos = token.pos;
10618 varnode.value = token.value;
10619 // XXX: Vim doesn't skip white space before comma. {a ,b -> ...} => E475
10620 if (iswhite(this.reader.p(0)) && this.tokenizer.peek().type == TOKEN_COMMA) {
10621 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
10622 }
10623 var token = this.tokenizer.get();
10624 viml_add(node.rlist, varnode);
10625 if (token.type == TOKEN_COMMA) {
10626 // XXX: Vim allows last comma. {a, b, -> ...} => OK
10627 var token = this.tokenizer.peek();
10628 if (token.type == TOKEN_ARROW) {
10629 this.tokenizer.get();
10630 break;
10631 }
10632 }
10633 else if (token.type == TOKEN_ARROW) {
10634 break;
10635 }
10636 else {
10637 throw Err(viml_printf("unexpected token: %s, type: %d", token.value, token.type), token.pos);
10638 }
10639 }
10640 else if (token.type == TOKEN_DOTDOTDOT) {
10641 var varnode = Node(NODE_IDENTIFIER);
10642 varnode.pos = token.pos;
10643 varnode.value = token.value;
10644 viml_add(node.rlist, varnode);
10645 var token = this.tokenizer.peek();
10646 if (token.type == TOKEN_ARROW) {
10647 this.tokenizer.get();
10648 break;
10649 }
10650 else {
10651 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10652 }
10653 }
10654 else {
10655 var fallback = TRUE;
10656 break;
10657 }
10658 var token = this.tokenizer.get();
10659 }
10660 if (!fallback) {
10661 node.left = this.parse_expr1();
10662 var token = this.tokenizer.get();
10663 if (token.type != TOKEN_CCLOSE) {
10664 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10665 }
10666 return node;
10667 }
10668 }
10669 // dict
10670 var node = Node(NODE_DICT);
10671 node.pos = nodepos;
10672 node.value = [];
10673 this.reader.seek_set(savepos);
10674 var token = this.tokenizer.peek();
10675 if (token.type == TOKEN_CCLOSE) {
10676 this.tokenizer.get();
10677 return node;
10678 }
10679 while (1) {
10680 var key = is_litdict ? this.tokenizer.parse_dict_literal_key() : this.parse_expr1();
10681 var token = this.tokenizer.get();
10682 if (token.type == TOKEN_CCLOSE) {
10683 if (!viml_empty(node.value)) {
10684 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10685 }
10686 this.reader.seek_set(pos);
10687 var node = this.parse_identifier();
10688 break;
10689 }
10690 if (token.type != TOKEN_COLON) {
10691 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10692 }
10693 var val = this.parse_expr1();
10694 viml_add(node.value, [key, val]);
10695 var token = this.tokenizer.get();
10696 if (token.type == TOKEN_COMMA) {
10697 if (this.tokenizer.peek().type == TOKEN_CCLOSE) {
10698 this.tokenizer.get();
10699 break;
10700 }
10701 }
10702 else if (token.type == TOKEN_CCLOSE) {
10703 break;
10704 }
10705 else {
10706 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10707 }
10708 }
10709 return node;
10710 }
10711 else if (token.type == TOKEN_POPEN) {
10712 var node = this.parse_expr1();
10713 var token = this.tokenizer.get();
10714 if (token.type != TOKEN_PCLOSE) {
10715 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10716 }
10717 }
10718 else if (token.type == TOKEN_OPTION) {
10719 var node = Node(NODE_OPTION);
10720 node.pos = token.pos;
10721 node.value = token.value;
10722 }
10723 else if (token.type == TOKEN_IDENTIFIER) {
10724 this.reader.seek_set(pos);
10725 var node = this.parse_identifier();
10726 }
10727 else if (FALSE && (token.type == TOKEN_COLON || token.type == TOKEN_SHARP)) {
10728 // XXX: no parse error but invalid expression
10729 this.reader.seek_set(pos);
10730 var node = this.parse_identifier();
10731 }
10732 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
10733 this.reader.seek_set(pos);
10734 var node = this.parse_identifier();
10735 }
10736 else if (token.type == TOKEN_IS || token.type == TOKEN_ISCS || token.type == TOKEN_ISNOT || token.type == TOKEN_ISNOTCS) {
10737 this.reader.seek_set(pos);
10738 var node = this.parse_identifier();
10739 }
10740 else if (token.type == TOKEN_ENV) {
10741 var node = Node(NODE_ENV);
10742 node.pos = token.pos;
10743 node.value = token.value;
10744 }
10745 else if (token.type == TOKEN_REG) {
10746 var node = Node(NODE_REG);
10747 node.pos = token.pos;
10748 node.value = token.value;
10749 }
10750 else {
10751 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10752 }
10753 return node;
10754}
10755
10756// SUBSCRIPT or CONCAT
10757// dict "." [0-9A-Za-z_]+ => (subscript dict key)
10758// str "." expr6 => (concat str expr6)
10759ExprParser.prototype.parse_dot = function(token, left) {
10760 if (left.type != NODE_IDENTIFIER && left.type != NODE_CURLYNAME && left.type != NODE_DICT && left.type != NODE_SUBSCRIPT && left.type != NODE_CALL && left.type != NODE_DOT) {
10761 return NIL;
10762 }
10763 if (!iswordc(this.reader.p(0))) {
10764 return NIL;
10765 }
10766 var pos = this.reader.getpos();
10767 var name = this.reader.read_word();
10768 if (isnamec(this.reader.p(0))) {
10769 // XXX: foo is str => ok, foo is obj => invalid expression
10770 // foo.s:bar or foo.bar#baz
10771 return NIL;
10772 }
10773 var node = Node(NODE_DOT);
10774 node.pos = token.pos;
10775 node.left = left;
10776 node.right = Node(NODE_IDENTIFIER);
10777 node.right.pos = pos;
10778 node.right.value = name;
10779 return node;
10780}
10781
10782// CONCAT
10783// str ".." expr6 => (concat str expr6)
10784ExprParser.prototype.parse_concat = function(token, left) {
10785 if (left.type != NODE_IDENTIFIER && left.type != NODE_CURLYNAME && left.type != NODE_DICT && left.type != NODE_SUBSCRIPT && left.type != NODE_CALL && left.type != NODE_DOT) {
10786 return NIL;
10787 }
10788 if (!iswordc(this.reader.p(0))) {
10789 return NIL;
10790 }
10791 var pos = this.reader.getpos();
10792 var name = this.reader.read_word();
10793 if (isnamec(this.reader.p(0))) {
10794 // XXX: foo is str => ok, foo is obj => invalid expression
10795 // foo.s:bar or foo.bar#baz
10796 return NIL;
10797 }
10798 var node = Node(NODE_CONCAT);
10799 node.pos = token.pos;
10800 node.left = left;
10801 node.right = Node(NODE_IDENTIFIER);
10802 node.right.pos = pos;
10803 node.right.value = name;
10804 return node;
10805}
10806
10807ExprParser.prototype.parse_identifier = function() {
10808 this.reader.skip_white();
10809 var npos = this.reader.getpos();
10810 var curly_parts = this.parse_curly_parts();
10811 if (viml_len(curly_parts) == 1 && curly_parts[0].type == NODE_CURLYNAMEPART) {
10812 var node = Node(NODE_IDENTIFIER);
10813 node.pos = npos;
10814 node.value = curly_parts[0].value;
10815 return node;
10816 }
10817 else {
10818 var node = Node(NODE_CURLYNAME);
10819 node.pos = npos;
10820 node.value = curly_parts;
10821 return node;
10822 }
10823}
10824
10825ExprParser.prototype.parse_curly_parts = function() {
10826 var curly_parts = [];
10827 var c = this.reader.peek();
10828 var pos = this.reader.getpos();
10829 if (c == "<" && viml_equalci(this.reader.peekn(5), "<SID>")) {
10830 var name = this.reader.getn(5);
10831 var node = Node(NODE_CURLYNAMEPART);
10832 node.curly = FALSE;
10833 // Keep backword compatibility for the curly attribute
10834 node.pos = pos;
10835 node.value = name;
10836 viml_add(curly_parts, node);
10837 }
10838 while (TRUE) {
10839 var c = this.reader.peek();
10840 if (isnamec(c)) {
10841 var pos = this.reader.getpos();
10842 var name = this.reader.read_name();
10843 var node = Node(NODE_CURLYNAMEPART);
10844 node.curly = FALSE;
10845 // Keep backword compatibility for the curly attribute
10846 node.pos = pos;
10847 node.value = name;
10848 viml_add(curly_parts, node);
10849 }
10850 else if (c == "{") {
10851 this.reader.get();
10852 var pos = this.reader.getpos();
10853 var node = Node(NODE_CURLYNAMEEXPR);
10854 node.curly = TRUE;
10855 // Keep backword compatibility for the curly attribute
10856 node.pos = pos;
10857 node.value = this.parse_expr1();
10858 viml_add(curly_parts, node);
10859 this.reader.skip_white();
10860 var c = this.reader.p(0);
10861 if (c != "}") {
10862 throw Err(viml_printf("unexpected token: %s", c), this.reader.getpos());
10863 }
10864 this.reader.seek_cur(1);
10865 }
10866 else {
10867 break;
10868 }
10869 }
10870 return curly_parts;
10871}
10872
10873function LvalueParser() { ExprParser.apply(this, arguments); this.__init__.apply(this, arguments); }
10874LvalueParser.prototype = Object.create(ExprParser.prototype);
10875LvalueParser.prototype.parse = function() {
10876 return this.parse_lv8();
10877}
10878
10879// expr8: expr8[expr1]
10880// expr8[expr1 : expr1]
10881// expr8.name
10882LvalueParser.prototype.parse_lv8 = function() {
10883 var left = this.parse_lv9();
10884 while (TRUE) {
10885 var pos = this.reader.tell();
10886 var c = this.reader.peek();
10887 var token = this.tokenizer.get();
10888 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
10889 var npos = token.pos;
10890 var node = Node(-1);
10891 if (this.tokenizer.peek().type == TOKEN_COLON) {
10892 this.tokenizer.get();
10893 var node = Node(NODE_SLICE);
10894 node.pos = npos;
10895 node.left = left;
10896 node.rlist = [NIL, NIL];
10897 var token = this.tokenizer.peek();
10898 if (token.type != TOKEN_SQCLOSE) {
10899 node.rlist[1] = this.parse_expr1();
10900 }
10901 var token = this.tokenizer.get();
10902 if (token.type != TOKEN_SQCLOSE) {
10903 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10904 }
10905 }
10906 else {
10907 var right = this.parse_expr1();
10908 if (this.tokenizer.peek().type == TOKEN_COLON) {
10909 this.tokenizer.get();
10910 var node = Node(NODE_SLICE);
10911 node.pos = npos;
10912 node.left = left;
10913 node.rlist = [right, NIL];
10914 var token = this.tokenizer.peek();
10915 if (token.type != TOKEN_SQCLOSE) {
10916 node.rlist[1] = this.parse_expr1();
10917 }
10918 var token = this.tokenizer.get();
10919 if (token.type != TOKEN_SQCLOSE) {
10920 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10921 }
10922 }
10923 else {
10924 var node = Node(NODE_SUBSCRIPT);
10925 node.pos = npos;
10926 node.left = left;
10927 node.right = right;
10928 var token = this.tokenizer.get();
10929 if (token.type != TOKEN_SQCLOSE) {
10930 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10931 }
10932 }
10933 }
10934 var left = node;
10935 delete node;
10936 }
10937 else if (!iswhite(c) && token.type == TOKEN_DOT) {
10938 var node = this.parse_dot(token, left);
10939 if (node === NIL) {
10940 this.reader.seek_set(pos);
10941 break;
10942 }
10943 var left = node;
10944 delete node;
10945 }
10946 else {
10947 this.reader.seek_set(pos);
10948 break;
10949 }
10950 }
10951 return left;
10952}
10953
10954// expr9: &option
10955// variable
10956// var{ria}ble
10957// $VAR
10958// @r
10959LvalueParser.prototype.parse_lv9 = function() {
10960 var pos = this.reader.tell();
10961 var token = this.tokenizer.get();
10962 var node = Node(-1);
10963 if (token.type == TOKEN_COPEN) {
10964 this.reader.seek_set(pos);
10965 var node = this.parse_identifier();
10966 }
10967 else if (token.type == TOKEN_OPTION) {
10968 var node = Node(NODE_OPTION);
10969 node.pos = token.pos;
10970 node.value = token.value;
10971 }
10972 else if (token.type == TOKEN_IDENTIFIER) {
10973 this.reader.seek_set(pos);
10974 var node = this.parse_identifier();
10975 }
10976 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
10977 this.reader.seek_set(pos);
10978 var node = this.parse_identifier();
10979 }
10980 else if (token.type == TOKEN_ENV) {
10981 var node = Node(NODE_ENV);
10982 node.pos = token.pos;
10983 node.value = token.value;
10984 }
10985 else if (token.type == TOKEN_REG) {
10986 var node = Node(NODE_REG);
10987 node.pos = token.pos;
10988 node.pos = token.pos;
10989 node.value = token.value;
10990 }
10991 else {
10992 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10993 }
10994 return node;
10995}
10996
10997function StringReader() { this.__init__.apply(this, arguments); }
10998StringReader.prototype.__init__ = function(lines) {
10999 this.buf = [];
11000 this.pos = [];
11001 var lnum = 0;
11002 var offset = 0;
11003 while (lnum < viml_len(lines)) {
11004 var col = 0;
11005 var __c7 = viml_split(lines[lnum], "\\zs");
11006 for (var __i7 = 0; __i7 < __c7.length; ++__i7) {
11007 var c = __c7[__i7];
11008 viml_add(this.buf, c);
11009 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11010 col += viml_len(c);
11011 offset += viml_len(c);
11012 }
11013 while (lnum + 1 < viml_len(lines) && viml_eqregh(lines[lnum + 1], "^\\s*\\\\")) {
11014 var skip = TRUE;
11015 var col = 0;
11016 var __c8 = viml_split(lines[lnum + 1], "\\zs");
11017 for (var __i8 = 0; __i8 < __c8.length; ++__i8) {
11018 var c = __c8[__i8];
11019 if (skip) {
11020 if (c == "\\") {
11021 var skip = FALSE;
11022 }
11023 }
11024 else {
11025 viml_add(this.buf, c);
11026 viml_add(this.pos, [lnum + 2, col + 1, offset]);
11027 }
11028 col += viml_len(c);
11029 offset += viml_len(c);
11030 }
11031 lnum += 1;
11032 offset += 1;
11033 }
11034 viml_add(this.buf, "<EOL>");
11035 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11036 lnum += 1;
11037 offset += 1;
11038 }
11039 // for <EOF>
11040 viml_add(this.pos, [lnum + 1, 0, offset]);
11041 this.i = 0;
11042}
11043
11044StringReader.prototype.eof = function() {
11045 return this.i >= viml_len(this.buf);
11046}
11047
11048StringReader.prototype.tell = function() {
11049 return this.i;
11050}
11051
11052StringReader.prototype.seek_set = function(i) {
11053 this.i = i;
11054}
11055
11056StringReader.prototype.seek_cur = function(i) {
11057 this.i = this.i + i;
11058}
11059
11060StringReader.prototype.seek_end = function(i) {
11061 this.i = viml_len(this.buf) + i;
11062}
11063
11064StringReader.prototype.p = function(i) {
11065 if (this.i >= viml_len(this.buf)) {
11066 return "<EOF>";
11067 }
11068 return this.buf[this.i + i];
11069}
11070
11071StringReader.prototype.peek = function() {
11072 if (this.i >= viml_len(this.buf)) {
11073 return "<EOF>";
11074 }
11075 return this.buf[this.i];
11076}
11077
11078StringReader.prototype.get = function() {
11079 if (this.i >= viml_len(this.buf)) {
11080 return "<EOF>";
11081 }
11082 this.i += 1;
11083 return this.buf[this.i - 1];
11084}
11085
11086StringReader.prototype.peekn = function(n) {
11087 var pos = this.tell();
11088 var r = this.getn(n);
11089 this.seek_set(pos);
11090 return r;
11091}
11092
11093StringReader.prototype.getn = function(n) {
11094 var r = "";
11095 var j = 0;
11096 while (this.i < viml_len(this.buf) && (n < 0 || j < n)) {
11097 var c = this.buf[this.i];
11098 if (c == "<EOL>") {
11099 break;
11100 }
11101 r += c;
11102 this.i += 1;
11103 j += 1;
11104 }
11105 return r;
11106}
11107
11108StringReader.prototype.peekline = function() {
11109 return this.peekn(-1);
11110}
11111
11112StringReader.prototype.readline = function() {
11113 var r = this.getn(-1);
11114 this.get();
11115 return r;
11116}
11117
11118StringReader.prototype.getstr = function(begin, end) {
11119 var r = "";
11120 var __c9 = viml_range(begin.i, end.i - 1);
11121 for (var __i9 = 0; __i9 < __c9.length; ++__i9) {
11122 var i = __c9[__i9];
11123 if (i >= viml_len(this.buf)) {
11124 break;
11125 }
11126 var c = this.buf[i];
11127 if (c == "<EOL>") {
11128 var c = "\n";
11129 }
11130 r += c;
11131 }
11132 return r;
11133}
11134
11135StringReader.prototype.getpos = function() {
11136 var __tmp = this.pos[this.i];
11137 var lnum = __tmp[0];
11138 var col = __tmp[1];
11139 var offset = __tmp[2];
11140 return {"i":this.i, "lnum":lnum, "col":col, "offset":offset};
11141}
11142
11143StringReader.prototype.setpos = function(pos) {
11144 this.i = pos.i;
11145}
11146
11147StringReader.prototype.read_alpha = function() {
11148 var r = "";
11149 while (isalpha(this.peekn(1))) {
11150 r += this.getn(1);
11151 }
11152 return r;
11153}
11154
11155StringReader.prototype.read_alnum = function() {
11156 var r = "";
11157 while (isalnum(this.peekn(1))) {
11158 r += this.getn(1);
11159 }
11160 return r;
11161}
11162
11163StringReader.prototype.read_digit = function() {
11164 var r = "";
11165 while (isdigit(this.peekn(1))) {
11166 r += this.getn(1);
11167 }
11168 return r;
11169}
11170
11171StringReader.prototype.read_odigit = function() {
11172 var r = "";
11173 while (isodigit(this.peekn(1))) {
11174 r += this.getn(1);
11175 }
11176 return r;
11177}
11178
11179StringReader.prototype.read_blob = function() {
11180 var r = "";
11181 while (1) {
11182 var s = this.peekn(2);
11183 if (viml_eqregh(s, "^[0-9A-Fa-f][0-9A-Fa-f]$")) {
11184 r += this.getn(2);
11185 }
11186 else if (viml_eqregh(s, "^\\.[0-9A-Fa-f]$")) {
11187 r += this.getn(1);
11188 }
11189 else if (viml_eqregh(s, "^[0-9A-Fa-f][^0-9A-Fa-f]$")) {
11190 throw Err("E973: Blob literal should have an even number of hex characters:" + s, this.getpos());
11191 }
11192 else {
11193 break;
11194 }
11195 }
11196 return r;
11197}
11198
11199StringReader.prototype.read_xdigit = function() {
11200 var r = "";
11201 while (isxdigit(this.peekn(1))) {
11202 r += this.getn(1);
11203 }
11204 return r;
11205}
11206
11207StringReader.prototype.read_bdigit = function() {
11208 var r = "";
11209 while (this.peekn(1) == "0" || this.peekn(1) == "1") {
11210 r += this.getn(1);
11211 }
11212 return r;
11213}
11214
11215StringReader.prototype.read_integer = function() {
11216 var r = "";
11217 var c = this.peekn(1);
11218 if (c == "-" || c == "+") {
11219 var r = this.getn(1);
11220 }
11221 return r + this.read_digit();
11222}
11223
11224StringReader.prototype.read_word = function() {
11225 var r = "";
11226 while (iswordc(this.peekn(1))) {
11227 r += this.getn(1);
11228 }
11229 return r;
11230}
11231
11232StringReader.prototype.read_white = function() {
11233 var r = "";
11234 while (iswhite(this.peekn(1))) {
11235 r += this.getn(1);
11236 }
11237 return r;
11238}
11239
11240StringReader.prototype.read_nonwhite = function() {
11241 var r = "";
11242 var ch = this.peekn(1);
11243 while (!iswhite(ch) && ch != "") {
11244 r += this.getn(1);
11245 var ch = this.peekn(1);
11246 }
11247 return r;
11248}
11249
11250StringReader.prototype.read_name = function() {
11251 var r = "";
11252 while (isnamec(this.peekn(1))) {
11253 r += this.getn(1);
11254 }
11255 return r;
11256}
11257
11258StringReader.prototype.skip_white = function() {
11259 while (iswhite(this.peekn(1))) {
11260 this.seek_cur(1);
11261 }
11262}
11263
11264StringReader.prototype.skip_white_and_colon = function() {
11265 while (TRUE) {
11266 var c = this.peekn(1);
11267 if (!iswhite(c) && c != ":") {
11268 break;
11269 }
11270 this.seek_cur(1);
11271 }
11272}
11273
11274function Compiler() { this.__init__.apply(this, arguments); }
11275Compiler.prototype.__init__ = function() {
11276 this.indent = [""];
11277 this.lines = [];
11278}
11279
11280Compiler.prototype.out = function() {
11281 var a000 = Array.prototype.slice.call(arguments, 0);
11282 if (viml_len(a000) == 1) {
11283 if (a000[0][0] == ")") {
11284 this.lines[this.lines.length - 1] += a000[0];
11285 }
11286 else {
11287 viml_add(this.lines, this.indent[0] + a000[0]);
11288 }
11289 }
11290 else {
11291 viml_add(this.lines, this.indent[0] + viml_printf.apply(null, a000));
11292 }
11293}
11294
11295Compiler.prototype.incindent = function(s) {
11296 viml_insert(this.indent, this.indent[0] + s);
11297}
11298
11299Compiler.prototype.decindent = function() {
11300 viml_remove(this.indent, 0);
11301}
11302
11303Compiler.prototype.compile = function(node) {
11304 if (node.type == NODE_TOPLEVEL) {
11305 return this.compile_toplevel(node);
11306 }
11307 else if (node.type == NODE_COMMENT) {
11308 this.compile_comment(node);
11309 return NIL;
11310 }
11311 else if (node.type == NODE_EXCMD) {
11312 this.compile_excmd(node);
11313 return NIL;
11314 }
11315 else if (node.type == NODE_FUNCTION) {
11316 this.compile_function(node);
11317 return NIL;
11318 }
11319 else if (node.type == NODE_DELFUNCTION) {
11320 this.compile_delfunction(node);
11321 return NIL;
11322 }
11323 else if (node.type == NODE_RETURN) {
11324 this.compile_return(node);
11325 return NIL;
11326 }
11327 else if (node.type == NODE_EXCALL) {
11328 this.compile_excall(node);
11329 return NIL;
11330 }
11331 else if (node.type == NODE_EVAL) {
11332 this.compile_eval(node);
11333 return NIL;
11334 }
11335 else if (node.type == NODE_LET) {
11336 this.compile_let(node);
11337 return NIL;
11338 }
11339 else if (node.type == NODE_CONST) {
11340 this.compile_const(node);
11341 return NIL;
11342 }
11343 else if (node.type == NODE_UNLET) {
11344 this.compile_unlet(node);
11345 return NIL;
11346 }
11347 else if (node.type == NODE_LOCKVAR) {
11348 this.compile_lockvar(node);
11349 return NIL;
11350 }
11351 else if (node.type == NODE_UNLOCKVAR) {
11352 this.compile_unlockvar(node);
11353 return NIL;
11354 }
11355 else if (node.type == NODE_IF) {
11356 this.compile_if(node);
11357 return NIL;
11358 }
11359 else if (node.type == NODE_WHILE) {
11360 this.compile_while(node);
11361 return NIL;
11362 }
11363 else if (node.type == NODE_FOR) {
11364 this.compile_for(node);
11365 return NIL;
11366 }
11367 else if (node.type == NODE_CONTINUE) {
11368 this.compile_continue(node);
11369 return NIL;
11370 }
11371 else if (node.type == NODE_BREAK) {
11372 this.compile_break(node);
11373 return NIL;
11374 }
11375 else if (node.type == NODE_TRY) {
11376 this.compile_try(node);
11377 return NIL;
11378 }
11379 else if (node.type == NODE_THROW) {
11380 this.compile_throw(node);
11381 return NIL;
11382 }
11383 else if (node.type == NODE_ECHO) {
11384 this.compile_echo(node);
11385 return NIL;
11386 }
11387 else if (node.type == NODE_ECHON) {
11388 this.compile_echon(node);
11389 return NIL;
11390 }
11391 else if (node.type == NODE_ECHOHL) {
11392 this.compile_echohl(node);
11393 return NIL;
11394 }
11395 else if (node.type == NODE_ECHOMSG) {
11396 this.compile_echomsg(node);
11397 return NIL;
11398 }
11399 else if (node.type == NODE_ECHOERR) {
11400 this.compile_echoerr(node);
11401 return NIL;
11402 }
11403 else if (node.type == NODE_EXECUTE) {
11404 this.compile_execute(node);
11405 return NIL;
11406 }
11407 else if (node.type == NODE_TERNARY) {
11408 return this.compile_ternary(node);
11409 }
11410 else if (node.type == NODE_OR) {
11411 return this.compile_or(node);
11412 }
11413 else if (node.type == NODE_AND) {
11414 return this.compile_and(node);
11415 }
11416 else if (node.type == NODE_EQUAL) {
11417 return this.compile_equal(node);
11418 }
11419 else if (node.type == NODE_EQUALCI) {
11420 return this.compile_equalci(node);
11421 }
11422 else if (node.type == NODE_EQUALCS) {
11423 return this.compile_equalcs(node);
11424 }
11425 else if (node.type == NODE_NEQUAL) {
11426 return this.compile_nequal(node);
11427 }
11428 else if (node.type == NODE_NEQUALCI) {
11429 return this.compile_nequalci(node);
11430 }
11431 else if (node.type == NODE_NEQUALCS) {
11432 return this.compile_nequalcs(node);
11433 }
11434 else if (node.type == NODE_GREATER) {
11435 return this.compile_greater(node);
11436 }
11437 else if (node.type == NODE_GREATERCI) {
11438 return this.compile_greaterci(node);
11439 }
11440 else if (node.type == NODE_GREATERCS) {
11441 return this.compile_greatercs(node);
11442 }
11443 else if (node.type == NODE_GEQUAL) {
11444 return this.compile_gequal(node);
11445 }
11446 else if (node.type == NODE_GEQUALCI) {
11447 return this.compile_gequalci(node);
11448 }
11449 else if (node.type == NODE_GEQUALCS) {
11450 return this.compile_gequalcs(node);
11451 }
11452 else if (node.type == NODE_SMALLER) {
11453 return this.compile_smaller(node);
11454 }
11455 else if (node.type == NODE_SMALLERCI) {
11456 return this.compile_smallerci(node);
11457 }
11458 else if (node.type == NODE_SMALLERCS) {
11459 return this.compile_smallercs(node);
11460 }
11461 else if (node.type == NODE_SEQUAL) {
11462 return this.compile_sequal(node);
11463 }
11464 else if (node.type == NODE_SEQUALCI) {
11465 return this.compile_sequalci(node);
11466 }
11467 else if (node.type == NODE_SEQUALCS) {
11468 return this.compile_sequalcs(node);
11469 }
11470 else if (node.type == NODE_MATCH) {
11471 return this.compile_match(node);
11472 }
11473 else if (node.type == NODE_MATCHCI) {
11474 return this.compile_matchci(node);
11475 }
11476 else if (node.type == NODE_MATCHCS) {
11477 return this.compile_matchcs(node);
11478 }
11479 else if (node.type == NODE_NOMATCH) {
11480 return this.compile_nomatch(node);
11481 }
11482 else if (node.type == NODE_NOMATCHCI) {
11483 return this.compile_nomatchci(node);
11484 }
11485 else if (node.type == NODE_NOMATCHCS) {
11486 return this.compile_nomatchcs(node);
11487 }
11488 else if (node.type == NODE_IS) {
11489 return this.compile_is(node);
11490 }
11491 else if (node.type == NODE_ISCI) {
11492 return this.compile_isci(node);
11493 }
11494 else if (node.type == NODE_ISCS) {
11495 return this.compile_iscs(node);
11496 }
11497 else if (node.type == NODE_ISNOT) {
11498 return this.compile_isnot(node);
11499 }
11500 else if (node.type == NODE_ISNOTCI) {
11501 return this.compile_isnotci(node);
11502 }
11503 else if (node.type == NODE_ISNOTCS) {
11504 return this.compile_isnotcs(node);
11505 }
11506 else if (node.type == NODE_ADD) {
11507 return this.compile_add(node);
11508 }
11509 else if (node.type == NODE_SUBTRACT) {
11510 return this.compile_subtract(node);
11511 }
11512 else if (node.type == NODE_CONCAT) {
11513 return this.compile_concat(node);
11514 }
11515 else if (node.type == NODE_MULTIPLY) {
11516 return this.compile_multiply(node);
11517 }
11518 else if (node.type == NODE_DIVIDE) {
11519 return this.compile_divide(node);
11520 }
11521 else if (node.type == NODE_REMAINDER) {
11522 return this.compile_remainder(node);
11523 }
11524 else if (node.type == NODE_NOT) {
11525 return this.compile_not(node);
11526 }
11527 else if (node.type == NODE_PLUS) {
11528 return this.compile_plus(node);
11529 }
11530 else if (node.type == NODE_MINUS) {
11531 return this.compile_minus(node);
11532 }
11533 else if (node.type == NODE_SUBSCRIPT) {
11534 return this.compile_subscript(node);
11535 }
11536 else if (node.type == NODE_SLICE) {
11537 return this.compile_slice(node);
11538 }
11539 else if (node.type == NODE_DOT) {
11540 return this.compile_dot(node);
11541 }
11542 else if (node.type == NODE_METHOD) {
11543 return this.compile_method(node);
11544 }
11545 else if (node.type == NODE_CALL) {
11546 return this.compile_call(node);
11547 }
11548 else if (node.type == NODE_NUMBER) {
11549 return this.compile_number(node);
11550 }
11551 else if (node.type == NODE_BLOB) {
11552 return this.compile_blob(node);
11553 }
11554 else if (node.type == NODE_STRING) {
11555 return this.compile_string(node);
11556 }
11557 else if (node.type == NODE_LIST) {
11558 return this.compile_list(node);
11559 }
11560 else if (node.type == NODE_DICT) {
11561 return this.compile_dict(node);
11562 }
11563 else if (node.type == NODE_OPTION) {
11564 return this.compile_option(node);
11565 }
11566 else if (node.type == NODE_IDENTIFIER) {
11567 return this.compile_identifier(node);
11568 }
11569 else if (node.type == NODE_CURLYNAME) {
11570 return this.compile_curlyname(node);
11571 }
11572 else if (node.type == NODE_ENV) {
11573 return this.compile_env(node);
11574 }
11575 else if (node.type == NODE_REG) {
11576 return this.compile_reg(node);
11577 }
11578 else if (node.type == NODE_CURLYNAMEPART) {
11579 return this.compile_curlynamepart(node);
11580 }
11581 else if (node.type == NODE_CURLYNAMEEXPR) {
11582 return this.compile_curlynameexpr(node);
11583 }
11584 else if (node.type == NODE_LAMBDA) {
11585 return this.compile_lambda(node);
11586 }
11587 else if (node.type == NODE_HEREDOC) {
11588 return this.compile_heredoc(node);
11589 }
11590 else {
11591 throw viml_printf("Compiler: unknown node: %s", viml_string(node));
11592 }
11593 return NIL;
11594}
11595
11596Compiler.prototype.compile_body = function(body) {
11597 var __c10 = body;
11598 for (var __i10 = 0; __i10 < __c10.length; ++__i10) {
11599 var node = __c10[__i10];
11600 this.compile(node);
11601 }
11602}
11603
11604Compiler.prototype.compile_toplevel = function(node) {
11605 this.compile_body(node.body);
11606 return this.lines;
11607}
11608
11609Compiler.prototype.compile_comment = function(node) {
11610 this.out(";%s", node.str);
11611}
11612
11613Compiler.prototype.compile_excmd = function(node) {
11614 this.out("(excmd \"%s\")", viml_escape(node.str, "\\\""));
11615}
11616
11617Compiler.prototype.compile_function = function(node) {
11618 var left = this.compile(node.left);
11619 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
11620 var default_args = node.default_args.map((function(vval) { return this.compile(vval); }).bind(this));
11621 if (!viml_empty(rlist)) {
11622 var remaining = FALSE;
11623 if (rlist[rlist.length - 1] == "...") {
11624 viml_remove(rlist, -1);
11625 var remaining = TRUE;
11626 }
11627 var __c11 = viml_range(viml_len(rlist));
11628 for (var __i11 = 0; __i11 < __c11.length; ++__i11) {
11629 var i = __c11[__i11];
11630 if (i < viml_len(rlist) - viml_len(default_args)) {
11631 left += viml_printf(" %s", rlist[i]);
11632 }
11633 else {
11634 left += viml_printf(" (%s %s)", rlist[i], default_args[i + viml_len(default_args) - viml_len(rlist)]);
11635 }
11636 }
11637 if (remaining) {
11638 left += " . ...";
11639 }
11640 }
11641 this.out("(function (%s)", left);
11642 this.incindent(" ");
11643 this.compile_body(node.body);
11644 this.out(")");
11645 this.decindent();
11646}
11647
11648Compiler.prototype.compile_delfunction = function(node) {
11649 this.out("(delfunction %s)", this.compile(node.left));
11650}
11651
11652Compiler.prototype.compile_return = function(node) {
11653 if (node.left === NIL) {
11654 this.out("(return)");
11655 }
11656 else {
11657 this.out("(return %s)", this.compile(node.left));
11658 }
11659}
11660
11661Compiler.prototype.compile_excall = function(node) {
11662 this.out("(call %s)", this.compile(node.left));
11663}
11664
11665Compiler.prototype.compile_eval = function(node) {
11666 this.out("(eval %s)", this.compile(node.left));
11667}
11668
11669Compiler.prototype.compile_let = function(node) {
11670 var left = "";
11671 if (node.left !== NIL) {
11672 var left = this.compile(node.left);
11673 }
11674 else {
11675 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
11676 if (node.rest !== NIL) {
11677 left += " . " + this.compile(node.rest);
11678 }
11679 var left = "(" + left + ")";
11680 }
11681 var right = this.compile(node.right);
11682 this.out("(let %s %s %s)", node.op, left, right);
11683}
11684
11685// TODO: merge with s:Compiler.compile_let() ?
11686Compiler.prototype.compile_const = function(node) {
11687 var left = "";
11688 if (node.left !== NIL) {
11689 var left = this.compile(node.left);
11690 }
11691 else {
11692 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
11693 if (node.rest !== NIL) {
11694 left += " . " + this.compile(node.rest);
11695 }
11696 var left = "(" + left + ")";
11697 }
11698 var right = this.compile(node.right);
11699 this.out("(const %s %s %s)", node.op, left, right);
11700}
11701
11702Compiler.prototype.compile_unlet = function(node) {
11703 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11704 this.out("(unlet %s)", viml_join(list, " "));
11705}
11706
11707Compiler.prototype.compile_lockvar = function(node) {
11708 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11709 if (node.depth === NIL) {
11710 this.out("(lockvar %s)", viml_join(list, " "));
11711 }
11712 else {
11713 this.out("(lockvar %s %s)", node.depth, viml_join(list, " "));
11714 }
11715}
11716
11717Compiler.prototype.compile_unlockvar = function(node) {
11718 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11719 if (node.depth === NIL) {
11720 this.out("(unlockvar %s)", viml_join(list, " "));
11721 }
11722 else {
11723 this.out("(unlockvar %s %s)", node.depth, viml_join(list, " "));
11724 }
11725}
11726
11727Compiler.prototype.compile_if = function(node) {
11728 this.out("(if %s", this.compile(node.cond));
11729 this.incindent(" ");
11730 this.compile_body(node.body);
11731 this.decindent();
11732 var __c12 = node.elseif;
11733 for (var __i12 = 0; __i12 < __c12.length; ++__i12) {
11734 var enode = __c12[__i12];
11735 this.out(" elseif %s", this.compile(enode.cond));
11736 this.incindent(" ");
11737 this.compile_body(enode.body);
11738 this.decindent();
11739 }
11740 if (node._else !== NIL) {
11741 this.out(" else");
11742 this.incindent(" ");
11743 this.compile_body(node._else.body);
11744 this.decindent();
11745 }
11746 this.incindent(" ");
11747 this.out(")");
11748 this.decindent();
11749}
11750
11751Compiler.prototype.compile_while = function(node) {
11752 this.out("(while %s", this.compile(node.cond));
11753 this.incindent(" ");
11754 this.compile_body(node.body);
11755 this.out(")");
11756 this.decindent();
11757}
11758
11759Compiler.prototype.compile_for = function(node) {
11760 var left = "";
11761 if (node.left !== NIL) {
11762 var left = this.compile(node.left);
11763 }
11764 else {
11765 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
11766 if (node.rest !== NIL) {
11767 left += " . " + this.compile(node.rest);
11768 }
11769 var left = "(" + left + ")";
11770 }
11771 var right = this.compile(node.right);
11772 this.out("(for %s %s", left, right);
11773 this.incindent(" ");
11774 this.compile_body(node.body);
11775 this.out(")");
11776 this.decindent();
11777}
11778
11779Compiler.prototype.compile_continue = function(node) {
11780 this.out("(continue)");
11781}
11782
11783Compiler.prototype.compile_break = function(node) {
11784 this.out("(break)");
11785}
11786
11787Compiler.prototype.compile_try = function(node) {
11788 this.out("(try");
11789 this.incindent(" ");
11790 this.compile_body(node.body);
11791 var __c13 = node.catch;
11792 for (var __i13 = 0; __i13 < __c13.length; ++__i13) {
11793 var cnode = __c13[__i13];
11794 if (cnode.pattern !== NIL) {
11795 this.decindent();
11796 this.out(" catch /%s/", cnode.pattern);
11797 this.incindent(" ");
11798 this.compile_body(cnode.body);
11799 }
11800 else {
11801 this.decindent();
11802 this.out(" catch");
11803 this.incindent(" ");
11804 this.compile_body(cnode.body);
11805 }
11806 }
11807 if (node._finally !== NIL) {
11808 this.decindent();
11809 this.out(" finally");
11810 this.incindent(" ");
11811 this.compile_body(node._finally.body);
11812 }
11813 this.out(")");
11814 this.decindent();
11815}
11816
11817Compiler.prototype.compile_throw = function(node) {
11818 this.out("(throw %s)", this.compile(node.left));
11819}
11820
11821Compiler.prototype.compile_echo = function(node) {
11822 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11823 this.out("(echo %s)", viml_join(list, " "));
11824}
11825
11826Compiler.prototype.compile_echon = function(node) {
11827 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11828 this.out("(echon %s)", viml_join(list, " "));
11829}
11830
11831Compiler.prototype.compile_echohl = function(node) {
11832 this.out("(echohl \"%s\")", viml_escape(node.str, "\\\""));
11833}
11834
11835Compiler.prototype.compile_echomsg = function(node) {
11836 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11837 this.out("(echomsg %s)", viml_join(list, " "));
11838}
11839
11840Compiler.prototype.compile_echoerr = function(node) {
11841 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11842 this.out("(echoerr %s)", viml_join(list, " "));
11843}
11844
11845Compiler.prototype.compile_execute = function(node) {
11846 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11847 this.out("(execute %s)", viml_join(list, " "));
11848}
11849
11850Compiler.prototype.compile_ternary = function(node) {
11851 return viml_printf("(?: %s %s %s)", this.compile(node.cond), this.compile(node.left), this.compile(node.right));
11852}
11853
11854Compiler.prototype.compile_or = function(node) {
11855 return viml_printf("(|| %s %s)", this.compile(node.left), this.compile(node.right));
11856}
11857
11858Compiler.prototype.compile_and = function(node) {
11859 return viml_printf("(&& %s %s)", this.compile(node.left), this.compile(node.right));
11860}
11861
11862Compiler.prototype.compile_equal = function(node) {
11863 return viml_printf("(== %s %s)", this.compile(node.left), this.compile(node.right));
11864}
11865
11866Compiler.prototype.compile_equalci = function(node) {
11867 return viml_printf("(==? %s %s)", this.compile(node.left), this.compile(node.right));
11868}
11869
11870Compiler.prototype.compile_equalcs = function(node) {
11871 return viml_printf("(==# %s %s)", this.compile(node.left), this.compile(node.right));
11872}
11873
11874Compiler.prototype.compile_nequal = function(node) {
11875 return viml_printf("(!= %s %s)", this.compile(node.left), this.compile(node.right));
11876}
11877
11878Compiler.prototype.compile_nequalci = function(node) {
11879 return viml_printf("(!=? %s %s)", this.compile(node.left), this.compile(node.right));
11880}
11881
11882Compiler.prototype.compile_nequalcs = function(node) {
11883 return viml_printf("(!=# %s %s)", this.compile(node.left), this.compile(node.right));
11884}
11885
11886Compiler.prototype.compile_greater = function(node) {
11887 return viml_printf("(> %s %s)", this.compile(node.left), this.compile(node.right));
11888}
11889
11890Compiler.prototype.compile_greaterci = function(node) {
11891 return viml_printf("(>? %s %s)", this.compile(node.left), this.compile(node.right));
11892}
11893
11894Compiler.prototype.compile_greatercs = function(node) {
11895 return viml_printf("(># %s %s)", this.compile(node.left), this.compile(node.right));
11896}
11897
11898Compiler.prototype.compile_gequal = function(node) {
11899 return viml_printf("(>= %s %s)", this.compile(node.left), this.compile(node.right));
11900}
11901
11902Compiler.prototype.compile_gequalci = function(node) {
11903 return viml_printf("(>=? %s %s)", this.compile(node.left), this.compile(node.right));
11904}
11905
11906Compiler.prototype.compile_gequalcs = function(node) {
11907 return viml_printf("(>=# %s %s)", this.compile(node.left), this.compile(node.right));
11908}
11909
11910Compiler.prototype.compile_smaller = function(node) {
11911 return viml_printf("(< %s %s)", this.compile(node.left), this.compile(node.right));
11912}
11913
11914Compiler.prototype.compile_smallerci = function(node) {
11915 return viml_printf("(<? %s %s)", this.compile(node.left), this.compile(node.right));
11916}
11917
11918Compiler.prototype.compile_smallercs = function(node) {
11919 return viml_printf("(<# %s %s)", this.compile(node.left), this.compile(node.right));
11920}
11921
11922Compiler.prototype.compile_sequal = function(node) {
11923 return viml_printf("(<= %s %s)", this.compile(node.left), this.compile(node.right));
11924}
11925
11926Compiler.prototype.compile_sequalci = function(node) {
11927 return viml_printf("(<=? %s %s)", this.compile(node.left), this.compile(node.right));
11928}
11929
11930Compiler.prototype.compile_sequalcs = function(node) {
11931 return viml_printf("(<=# %s %s)", this.compile(node.left), this.compile(node.right));
11932}
11933
11934Compiler.prototype.compile_match = function(node) {
11935 return viml_printf("(=~ %s %s)", this.compile(node.left), this.compile(node.right));
11936}
11937
11938Compiler.prototype.compile_matchci = function(node) {
11939 return viml_printf("(=~? %s %s)", this.compile(node.left), this.compile(node.right));
11940}
11941
11942Compiler.prototype.compile_matchcs = function(node) {
11943 return viml_printf("(=~# %s %s)", this.compile(node.left), this.compile(node.right));
11944}
11945
11946Compiler.prototype.compile_nomatch = function(node) {
11947 return viml_printf("(!~ %s %s)", this.compile(node.left), this.compile(node.right));
11948}
11949
11950Compiler.prototype.compile_nomatchci = function(node) {
11951 return viml_printf("(!~? %s %s)", this.compile(node.left), this.compile(node.right));
11952}
11953
11954Compiler.prototype.compile_nomatchcs = function(node) {
11955 return viml_printf("(!~# %s %s)", this.compile(node.left), this.compile(node.right));
11956}
11957
11958Compiler.prototype.compile_is = function(node) {
11959 return viml_printf("(is %s %s)", this.compile(node.left), this.compile(node.right));
11960}
11961
11962Compiler.prototype.compile_isci = function(node) {
11963 return viml_printf("(is? %s %s)", this.compile(node.left), this.compile(node.right));
11964}
11965
11966Compiler.prototype.compile_iscs = function(node) {
11967 return viml_printf("(is# %s %s)", this.compile(node.left), this.compile(node.right));
11968}
11969
11970Compiler.prototype.compile_isnot = function(node) {
11971 return viml_printf("(isnot %s %s)", this.compile(node.left), this.compile(node.right));
11972}
11973
11974Compiler.prototype.compile_isnotci = function(node) {
11975 return viml_printf("(isnot? %s %s)", this.compile(node.left), this.compile(node.right));
11976}
11977
11978Compiler.prototype.compile_isnotcs = function(node) {
11979 return viml_printf("(isnot# %s %s)", this.compile(node.left), this.compile(node.right));
11980}
11981
11982Compiler.prototype.compile_add = function(node) {
11983 return viml_printf("(+ %s %s)", this.compile(node.left), this.compile(node.right));
11984}
11985
11986Compiler.prototype.compile_subtract = function(node) {
11987 return viml_printf("(- %s %s)", this.compile(node.left), this.compile(node.right));
11988}
11989
11990Compiler.prototype.compile_concat = function(node) {
11991 return viml_printf("(concat %s %s)", this.compile(node.left), this.compile(node.right));
11992}
11993
11994Compiler.prototype.compile_multiply = function(node) {
11995 return viml_printf("(* %s %s)", this.compile(node.left), this.compile(node.right));
11996}
11997
11998Compiler.prototype.compile_divide = function(node) {
11999 return viml_printf("(/ %s %s)", this.compile(node.left), this.compile(node.right));
12000}
12001
12002Compiler.prototype.compile_remainder = function(node) {
12003 return viml_printf("(%% %s %s)", this.compile(node.left), this.compile(node.right));
12004}
12005
12006Compiler.prototype.compile_not = function(node) {
12007 return viml_printf("(! %s)", this.compile(node.left));
12008}
12009
12010Compiler.prototype.compile_plus = function(node) {
12011 return viml_printf("(+ %s)", this.compile(node.left));
12012}
12013
12014Compiler.prototype.compile_minus = function(node) {
12015 return viml_printf("(- %s)", this.compile(node.left));
12016}
12017
12018Compiler.prototype.compile_subscript = function(node) {
12019 return viml_printf("(subscript %s %s)", this.compile(node.left), this.compile(node.right));
12020}
12021
12022Compiler.prototype.compile_slice = function(node) {
12023 var r0 = node.rlist[0] === NIL ? "nil" : this.compile(node.rlist[0]);
12024 var r1 = node.rlist[1] === NIL ? "nil" : this.compile(node.rlist[1]);
12025 return viml_printf("(slice %s %s %s)", this.compile(node.left), r0, r1);
12026}
12027
12028Compiler.prototype.compile_dot = function(node) {
12029 return viml_printf("(dot %s %s)", this.compile(node.left), this.compile(node.right));
12030}
12031
12032Compiler.prototype.compile_method = function(node) {
12033 return viml_printf("(method %s %s)", this.compile(node.left), this.compile(node.right));
12034}
12035
12036Compiler.prototype.compile_call = function(node) {
12037 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12038 if (viml_empty(rlist)) {
12039 return viml_printf("(%s)", this.compile(node.left));
12040 }
12041 else {
12042 return viml_printf("(%s %s)", this.compile(node.left), viml_join(rlist, " "));
12043 }
12044}
12045
12046Compiler.prototype.compile_number = function(node) {
12047 return node.value;
12048}
12049
12050Compiler.prototype.compile_blob = function(node) {
12051 return node.value;
12052}
12053
12054Compiler.prototype.compile_string = function(node) {
12055 return node.value;
12056}
12057
12058Compiler.prototype.compile_list = function(node) {
12059 var value = node.value.map((function(vval) { return this.compile(vval); }).bind(this));
12060 if (viml_empty(value)) {
12061 return "(list)";
12062 }
12063 else {
12064 return viml_printf("(list %s)", viml_join(value, " "));
12065 }
12066}
12067
12068Compiler.prototype.compile_dict = function(node) {
12069 var value = node.value.map((function(vval) { return "(" + this.compile(vval[0]) + " " + this.compile(vval[1]) + ")"; }).bind(this));
12070 if (viml_empty(value)) {
12071 return "(dict)";
12072 }
12073 else {
12074 return viml_printf("(dict %s)", viml_join(value, " "));
12075 }
12076}
12077
12078Compiler.prototype.compile_option = function(node) {
12079 return node.value;
12080}
12081
12082Compiler.prototype.compile_identifier = function(node) {
12083 return node.value;
12084}
12085
12086Compiler.prototype.compile_curlyname = function(node) {
12087 return viml_join(node.value.map((function(vval) { return this.compile(vval); }).bind(this)), "");
12088}
12089
12090Compiler.prototype.compile_env = function(node) {
12091 return node.value;
12092}
12093
12094Compiler.prototype.compile_reg = function(node) {
12095 return node.value;
12096}
12097
12098Compiler.prototype.compile_curlynamepart = function(node) {
12099 return node.value;
12100}
12101
12102Compiler.prototype.compile_curlynameexpr = function(node) {
12103 return "{" + this.compile(node.value) + "}";
12104}
12105
12106Compiler.prototype.escape_string = function(str) {
12107 var m = {"\n":"\\n", "\t":"\\t", "\r":"\\r"};
12108 var out = "\"";
12109 var __c14 = viml_range(viml_len(str));
12110 for (var __i14 = 0; __i14 < __c14.length; ++__i14) {
12111 var i = __c14[__i14];
12112 var c = str[i];
12113 if (viml_has_key(m, c)) {
12114 out += m[c];
12115 }
12116 else {
12117 out += c;
12118 }
12119 }
12120 out += "\"";
12121 return out;
12122}
12123
12124Compiler.prototype.compile_lambda = function(node) {
12125 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12126 return viml_printf("(lambda (%s) %s)", viml_join(rlist, " "), this.compile(node.left));
12127}
12128
12129Compiler.prototype.compile_heredoc = function(node) {
12130 if (viml_empty(node.rlist)) {
12131 var rlist = "(list)";
12132 }
12133 else {
12134 var rlist = "(list " + viml_join(node.rlist.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
12135 }
12136 if (viml_empty(node.body)) {
12137 var body = "(list)";
12138 }
12139 else {
12140 var body = "(list " + viml_join(node.body.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
12141 }
12142 var op = this.escape_string(node.op);
12143 return viml_printf("(heredoc %s %s %s)", rlist, op, body);
12144}
12145
12146// TODO: under construction
12147function RegexpParser() { this.__init__.apply(this, arguments); }
12148RegexpParser.prototype.RE_VERY_NOMAGIC = 1;
12149RegexpParser.prototype.RE_NOMAGIC = 2;
12150RegexpParser.prototype.RE_MAGIC = 3;
12151RegexpParser.prototype.RE_VERY_MAGIC = 4;
12152RegexpParser.prototype.__init__ = function(reader, cmd, delim) {
12153 this.reader = reader;
12154 this.cmd = cmd;
12155 this.delim = delim;
12156 this.reg_magic = this.RE_MAGIC;
12157}
12158
12159RegexpParser.prototype.isend = function(c) {
12160 return c == "<EOF>" || c == "<EOL>" || c == this.delim;
12161}
12162
12163RegexpParser.prototype.parse_regexp = function() {
12164 var prevtoken = "";
12165 var ntoken = "";
12166 var ret = [];
12167 if (this.reader.peekn(4) == "\\%#=") {
12168 var epos = this.reader.getpos();
12169 var token = this.reader.getn(5);
12170 if (token != "\\%#=0" && token != "\\%#=1" && token != "\\%#=2") {
12171 throw Err("E864: \\%#= can only be followed by 0, 1, or 2", epos);
12172 }
12173 viml_add(ret, token);
12174 }
12175 while (!this.isend(this.reader.peek())) {
12176 var prevtoken = ntoken;
12177 var __tmp = this.get_token();
12178 var token = __tmp[0];
12179 var ntoken = __tmp[1];
12180 if (ntoken == "\\m") {
12181 this.reg_magic = this.RE_MAGIC;
12182 }
12183 else if (ntoken == "\\M") {
12184 this.reg_magic = this.RE_NOMAGIC;
12185 }
12186 else if (ntoken == "\\v") {
12187 this.reg_magic = this.RE_VERY_MAGIC;
12188 }
12189 else if (ntoken == "\\V") {
12190 this.reg_magic = this.RE_VERY_NOMAGIC;
12191 }
12192 else if (ntoken == "\\*") {
12193 // '*' is not magic as the very first character.
12194 if (prevtoken == "" || prevtoken == "\\^" || prevtoken == "\\&" || prevtoken == "\\|" || prevtoken == "\\(") {
12195 var ntoken = "*";
12196 }
12197 }
12198 else if (ntoken == "\\^") {
12199 // '^' is only magic as the very first character.
12200 if (this.reg_magic != this.RE_VERY_MAGIC && prevtoken != "" && prevtoken != "\\&" && prevtoken != "\\|" && prevtoken != "\\n" && prevtoken != "\\(" && prevtoken != "\\%(") {
12201 var ntoken = "^";
12202 }
12203 }
12204 else if (ntoken == "\\$") {
12205 // '$' is only magic as the very last character
12206 var pos = this.reader.tell();
12207 if (this.reg_magic != this.RE_VERY_MAGIC) {
12208 while (!this.isend(this.reader.peek())) {
12209 var __tmp = this.get_token();
12210 var t = __tmp[0];
12211 var n = __tmp[1];
12212 // XXX: Vim doesn't check \v and \V?
12213 if (n == "\\c" || n == "\\C" || n == "\\m" || n == "\\M" || n == "\\Z") {
12214 continue;
12215 }
12216 if (n != "\\|" && n != "\\&" && n != "\\n" && n != "\\)") {
12217 var ntoken = "$";
12218 }
12219 break;
12220 }
12221 }
12222 this.reader.seek_set(pos);
12223 }
12224 else if (ntoken == "\\?") {
12225 // '?' is literal in '?' command.
12226 if (this.cmd == "?") {
12227 var ntoken = "?";
12228 }
12229 }
12230 viml_add(ret, ntoken);
12231 }
12232 return ret;
12233}
12234
12235// @return [actual_token, normalized_token]
12236RegexpParser.prototype.get_token = function() {
12237 if (this.reg_magic == this.RE_VERY_MAGIC) {
12238 return this.get_token_very_magic();
12239 }
12240 else if (this.reg_magic == this.RE_MAGIC) {
12241 return this.get_token_magic();
12242 }
12243 else if (this.reg_magic == this.RE_NOMAGIC) {
12244 return this.get_token_nomagic();
12245 }
12246 else if (this.reg_magic == this.RE_VERY_NOMAGIC) {
12247 return this.get_token_very_nomagic();
12248 }
12249}
12250
12251RegexpParser.prototype.get_token_very_magic = function() {
12252 if (this.isend(this.reader.peek())) {
12253 return ["<END>", "<END>"];
12254 }
12255 var c = this.reader.get();
12256 if (c == "\\") {
12257 return this.get_token_backslash_common();
12258 }
12259 else if (c == "*") {
12260 return ["*", "\\*"];
12261 }
12262 else if (c == "+") {
12263 return ["+", "\\+"];
12264 }
12265 else if (c == "=") {
12266 return ["=", "\\="];
12267 }
12268 else if (c == "?") {
12269 return ["?", "\\?"];
12270 }
12271 else if (c == "{") {
12272 return this.get_token_brace("{");
12273 }
12274 else if (c == "@") {
12275 return this.get_token_at("@");
12276 }
12277 else if (c == "^") {
12278 return ["^", "\\^"];
12279 }
12280 else if (c == "$") {
12281 return ["$", "\\$"];
12282 }
12283 else if (c == ".") {
12284 return [".", "\\."];
12285 }
12286 else if (c == "<") {
12287 return ["<", "\\<"];
12288 }
12289 else if (c == ">") {
12290 return [">", "\\>"];
12291 }
12292 else if (c == "%") {
12293 return this.get_token_percent("%");
12294 }
12295 else if (c == "[") {
12296 return this.get_token_sq("[");
12297 }
12298 else if (c == "~") {
12299 return ["~", "\\~"];
12300 }
12301 else if (c == "|") {
12302 return ["|", "\\|"];
12303 }
12304 else if (c == "&") {
12305 return ["&", "\\&"];
12306 }
12307 else if (c == "(") {
12308 return ["(", "\\("];
12309 }
12310 else if (c == ")") {
12311 return [")", "\\)"];
12312 }
12313 return [c, c];
12314}
12315
12316RegexpParser.prototype.get_token_magic = function() {
12317 if (this.isend(this.reader.peek())) {
12318 return ["<END>", "<END>"];
12319 }
12320 var c = this.reader.get();
12321 if (c == "\\") {
12322 var pos = this.reader.tell();
12323 var c = this.reader.get();
12324 if (c == "+") {
12325 return ["\\+", "\\+"];
12326 }
12327 else if (c == "=") {
12328 return ["\\=", "\\="];
12329 }
12330 else if (c == "?") {
12331 return ["\\?", "\\?"];
12332 }
12333 else if (c == "{") {
12334 return this.get_token_brace("\\{");
12335 }
12336 else if (c == "@") {
12337 return this.get_token_at("\\@");
12338 }
12339 else if (c == "<") {
12340 return ["\\<", "\\<"];
12341 }
12342 else if (c == ">") {
12343 return ["\\>", "\\>"];
12344 }
12345 else if (c == "%") {
12346 return this.get_token_percent("\\%");
12347 }
12348 else if (c == "|") {
12349 return ["\\|", "\\|"];
12350 }
12351 else if (c == "&") {
12352 return ["\\&", "\\&"];
12353 }
12354 else if (c == "(") {
12355 return ["\\(", "\\("];
12356 }
12357 else if (c == ")") {
12358 return ["\\)", "\\)"];
12359 }
12360 this.reader.seek_set(pos);
12361 return this.get_token_backslash_common();
12362 }
12363 else if (c == "*") {
12364 return ["*", "\\*"];
12365 }
12366 else if (c == "^") {
12367 return ["^", "\\^"];
12368 }
12369 else if (c == "$") {
12370 return ["$", "\\$"];
12371 }
12372 else if (c == ".") {
12373 return [".", "\\."];
12374 }
12375 else if (c == "[") {
12376 return this.get_token_sq("[");
12377 }
12378 else if (c == "~") {
12379 return ["~", "\\~"];
12380 }
12381 return [c, c];
12382}
12383
12384RegexpParser.prototype.get_token_nomagic = function() {
12385 if (this.isend(this.reader.peek())) {
12386 return ["<END>", "<END>"];
12387 }
12388 var c = this.reader.get();
12389 if (c == "\\") {
12390 var pos = this.reader.tell();
12391 var c = this.reader.get();
12392 if (c == "*") {
12393 return ["\\*", "\\*"];
12394 }
12395 else if (c == "+") {
12396 return ["\\+", "\\+"];
12397 }
12398 else if (c == "=") {
12399 return ["\\=", "\\="];
12400 }
12401 else if (c == "?") {
12402 return ["\\?", "\\?"];
12403 }
12404 else if (c == "{") {
12405 return this.get_token_brace("\\{");
12406 }
12407 else if (c == "@") {
12408 return this.get_token_at("\\@");
12409 }
12410 else if (c == ".") {
12411 return ["\\.", "\\."];
12412 }
12413 else if (c == "<") {
12414 return ["\\<", "\\<"];
12415 }
12416 else if (c == ">") {
12417 return ["\\>", "\\>"];
12418 }
12419 else if (c == "%") {
12420 return this.get_token_percent("\\%");
12421 }
12422 else if (c == "~") {
12423 return ["\\~", "\\^"];
12424 }
12425 else if (c == "[") {
12426 return this.get_token_sq("\\[");
12427 }
12428 else if (c == "|") {
12429 return ["\\|", "\\|"];
12430 }
12431 else if (c == "&") {
12432 return ["\\&", "\\&"];
12433 }
12434 else if (c == "(") {
12435 return ["\\(", "\\("];
12436 }
12437 else if (c == ")") {
12438 return ["\\)", "\\)"];
12439 }
12440 this.reader.seek_set(pos);
12441 return this.get_token_backslash_common();
12442 }
12443 else if (c == "^") {
12444 return ["^", "\\^"];
12445 }
12446 else if (c == "$") {
12447 return ["$", "\\$"];
12448 }
12449 return [c, c];
12450}
12451
12452RegexpParser.prototype.get_token_very_nomagic = function() {
12453 if (this.isend(this.reader.peek())) {
12454 return ["<END>", "<END>"];
12455 }
12456 var c = this.reader.get();
12457 if (c == "\\") {
12458 var pos = this.reader.tell();
12459 var c = this.reader.get();
12460 if (c == "*") {
12461 return ["\\*", "\\*"];
12462 }
12463 else if (c == "+") {
12464 return ["\\+", "\\+"];
12465 }
12466 else if (c == "=") {
12467 return ["\\=", "\\="];
12468 }
12469 else if (c == "?") {
12470 return ["\\?", "\\?"];
12471 }
12472 else if (c == "{") {
12473 return this.get_token_brace("\\{");
12474 }
12475 else if (c == "@") {
12476 return this.get_token_at("\\@");
12477 }
12478 else if (c == "^") {
12479 return ["\\^", "\\^"];
12480 }
12481 else if (c == "$") {
12482 return ["\\$", "\\$"];
12483 }
12484 else if (c == "<") {
12485 return ["\\<", "\\<"];
12486 }
12487 else if (c == ">") {
12488 return ["\\>", "\\>"];
12489 }
12490 else if (c == "%") {
12491 return this.get_token_percent("\\%");
12492 }
12493 else if (c == "~") {
12494 return ["\\~", "\\~"];
12495 }
12496 else if (c == "[") {
12497 return this.get_token_sq("\\[");
12498 }
12499 else if (c == "|") {
12500 return ["\\|", "\\|"];
12501 }
12502 else if (c == "&") {
12503 return ["\\&", "\\&"];
12504 }
12505 else if (c == "(") {
12506 return ["\\(", "\\("];
12507 }
12508 else if (c == ")") {
12509 return ["\\)", "\\)"];
12510 }
12511 this.reader.seek_set(pos);
12512 return this.get_token_backslash_common();
12513 }
12514 return [c, c];
12515}
12516
12517RegexpParser.prototype.get_token_backslash_common = function() {
12518 var cclass = "iIkKfFpPsSdDxXoOwWhHaAlLuU";
12519 var c = this.reader.get();
12520 if (c == "\\") {
12521 return ["\\\\", "\\\\"];
12522 }
12523 else if (viml_stridx(cclass, c) != -1) {
12524 return ["\\" + c, "\\" + c];
12525 }
12526 else if (c == "_") {
12527 var epos = this.reader.getpos();
12528 var c = this.reader.get();
12529 if (viml_stridx(cclass, c) != -1) {
12530 return ["\\_" + c, "\\_ . c"];
12531 }
12532 else if (c == "^") {
12533 return ["\\_^", "\\_^"];
12534 }
12535 else if (c == "$") {
12536 return ["\\_$", "\\_$"];
12537 }
12538 else if (c == ".") {
12539 return ["\\_.", "\\_."];
12540 }
12541 else if (c == "[") {
12542 return this.get_token_sq("\\_[");
12543 }
12544 throw Err("E63: invalid use of \\_", epos);
12545 }
12546 else if (viml_stridx("etrb", c) != -1) {
12547 return ["\\" + c, "\\" + c];
12548 }
12549 else if (viml_stridx("123456789", c) != -1) {
12550 return ["\\" + c, "\\" + c];
12551 }
12552 else if (c == "z") {
12553 var epos = this.reader.getpos();
12554 var c = this.reader.get();
12555 if (viml_stridx("123456789", c) != -1) {
12556 return ["\\z" + c, "\\z" + c];
12557 }
12558 else if (c == "s") {
12559 return ["\\zs", "\\zs"];
12560 }
12561 else if (c == "e") {
12562 return ["\\ze", "\\ze"];
12563 }
12564 else if (c == "(") {
12565 return ["\\z(", "\\z("];
12566 }
12567 throw Err("E68: Invalid character after \\z", epos);
12568 }
12569 else if (viml_stridx("cCmMvVZ", c) != -1) {
12570 return ["\\" + c, "\\" + c];
12571 }
12572 else if (c == "%") {
12573 var epos = this.reader.getpos();
12574 var c = this.reader.get();
12575 if (c == "d") {
12576 var r = this.getdecchrs();
12577 if (r != "") {
12578 return ["\\%d" + r, "\\%d" + r];
12579 }
12580 }
12581 else if (c == "o") {
12582 var r = this.getoctchrs();
12583 if (r != "") {
12584 return ["\\%o" + r, "\\%o" + r];
12585 }
12586 }
12587 else if (c == "x") {
12588 var r = this.gethexchrs(2);
12589 if (r != "") {
12590 return ["\\%x" + r, "\\%x" + r];
12591 }
12592 }
12593 else if (c == "u") {
12594 var r = this.gethexchrs(4);
12595 if (r != "") {
12596 return ["\\%u" + r, "\\%u" + r];
12597 }
12598 }
12599 else if (c == "U") {
12600 var r = this.gethexchrs(8);
12601 if (r != "") {
12602 return ["\\%U" + r, "\\%U" + r];
12603 }
12604 }
12605 throw Err("E678: Invalid character after \\%[dxouU]", epos);
12606 }
12607 return ["\\" + c, c];
12608}
12609
12610// \{}
12611RegexpParser.prototype.get_token_brace = function(pre) {
12612 var r = "";
12613 var minus = "";
12614 var comma = "";
12615 var n = "";
12616 var m = "";
12617 if (this.reader.p(0) == "-") {
12618 var minus = this.reader.get();
12619 r += minus;
12620 }
12621 if (isdigit(this.reader.p(0))) {
12622 var n = this.reader.read_digit();
12623 r += n;
12624 }
12625 if (this.reader.p(0) == ",") {
12626 var comma = this.rader.get();
12627 r += comma;
12628 }
12629 if (isdigit(this.reader.p(0))) {
12630 var m = this.reader.read_digit();
12631 r += m;
12632 }
12633 if (this.reader.p(0) == "\\") {
12634 r += this.reader.get();
12635 }
12636 if (this.reader.p(0) != "}") {
12637 throw Err("E554: Syntax error in \\{...}", this.reader.getpos());
12638 }
12639 this.reader.get();
12640 return [pre + r, "\\{" + minus + n + comma + m + "}"];
12641}
12642
12643// \[]
12644RegexpParser.prototype.get_token_sq = function(pre) {
12645 var start = this.reader.tell();
12646 var r = "";
12647 // Complement of range
12648 if (this.reader.p(0) == "^") {
12649 r += this.reader.get();
12650 }
12651 // At the start ']' and '-' mean the literal character.
12652 if (this.reader.p(0) == "]" || this.reader.p(0) == "-") {
12653 r += this.reader.get();
12654 }
12655 while (TRUE) {
12656 var startc = 0;
12657 var c = this.reader.p(0);
12658 if (this.isend(c)) {
12659 // If there is no matching ']', we assume the '[' is a normal character.
12660 this.reader.seek_set(start);
12661 return [pre, "["];
12662 }
12663 else if (c == "]") {
12664 this.reader.seek_cur(1);
12665 return [pre + r + "]", "\\[" + r + "]"];
12666 }
12667 else if (c == "[") {
12668 var e = this.get_token_sq_char_class();
12669 if (e == "") {
12670 var e = this.get_token_sq_equi_class();
12671 if (e == "") {
12672 var e = this.get_token_sq_coll_element();
12673 if (e == "") {
12674 var __tmp = this.get_token_sq_c();
12675 var e = __tmp[0];
12676 var startc = __tmp[1];
12677 }
12678 }
12679 }
12680 r += e;
12681 }
12682 else {
12683 var __tmp = this.get_token_sq_c();
12684 var e = __tmp[0];
12685 var startc = __tmp[1];
12686 r += e;
12687 }
12688 if (startc != 0 && this.reader.p(0) == "-" && !this.isend(this.reader.p(1)) && !(this.reader.p(1) == "\\" && this.reader.p(2) == "n")) {
12689 this.reader.seek_cur(1);
12690 r += "-";
12691 var c = this.reader.p(0);
12692 if (c == "[") {
12693 var e = this.get_token_sq_coll_element();
12694 if (e != "") {
12695 var endc = viml_char2nr(e[2]);
12696 }
12697 else {
12698 var __tmp = this.get_token_sq_c();
12699 var e = __tmp[0];
12700 var endc = __tmp[1];
12701 }
12702 r += e;
12703 }
12704 else {
12705 var __tmp = this.get_token_sq_c();
12706 var e = __tmp[0];
12707 var endc = __tmp[1];
12708 r += e;
12709 }
12710 if (startc > endc || endc > startc + 256) {
12711 throw Err("E16: Invalid range", this.reader.getpos());
12712 }
12713 }
12714 }
12715}
12716
12717// [c]
12718RegexpParser.prototype.get_token_sq_c = function() {
12719 var c = this.reader.p(0);
12720 if (c == "\\") {
12721 this.reader.seek_cur(1);
12722 var c = this.reader.p(0);
12723 if (c == "n") {
12724 this.reader.seek_cur(1);
12725 return ["\\n", 0];
12726 }
12727 else if (c == "r") {
12728 this.reader.seek_cur(1);
12729 return ["\\r", 13];
12730 }
12731 else if (c == "t") {
12732 this.reader.seek_cur(1);
12733 return ["\\t", 9];
12734 }
12735 else if (c == "e") {
12736 this.reader.seek_cur(1);
12737 return ["\\e", 27];
12738 }
12739 else if (c == "b") {
12740 this.reader.seek_cur(1);
12741 return ["\\b", 8];
12742 }
12743 else if (viml_stridx("]^-\\", c) != -1) {
12744 this.reader.seek_cur(1);
12745 return ["\\" + c, viml_char2nr(c)];
12746 }
12747 else if (viml_stridx("doxuU", c) != -1) {
12748 var __tmp = this.get_token_sq_coll_char();
12749 var c = __tmp[0];
12750 var n = __tmp[1];
12751 return [c, n];
12752 }
12753 else {
12754 return ["\\", viml_char2nr("\\")];
12755 }
12756 }
12757 else if (c == "-") {
12758 this.reader.seek_cur(1);
12759 return ["-", viml_char2nr("-")];
12760 }
12761 else {
12762 this.reader.seek_cur(1);
12763 return [c, viml_char2nr(c)];
12764 }
12765}
12766
12767// [\d123]
12768RegexpParser.prototype.get_token_sq_coll_char = function() {
12769 var pos = this.reader.tell();
12770 var c = this.reader.get();
12771 if (c == "d") {
12772 var r = this.getdecchrs();
12773 var n = viml_str2nr(r, 10);
12774 }
12775 else if (c == "o") {
12776 var r = this.getoctchrs();
12777 var n = viml_str2nr(r, 8);
12778 }
12779 else if (c == "x") {
12780 var r = this.gethexchrs(2);
12781 var n = viml_str2nr(r, 16);
12782 }
12783 else if (c == "u") {
12784 var r = this.gethexchrs(4);
12785 var n = viml_str2nr(r, 16);
12786 }
12787 else if (c == "U") {
12788 var r = this.gethexchrs(8);
12789 var n = viml_str2nr(r, 16);
12790 }
12791 else {
12792 var r = "";
12793 }
12794 if (r == "") {
12795 this.reader.seek_set(pos);
12796 return "\\";
12797 }
12798 return ["\\" + c + r, n];
12799}
12800
12801// [[.a.]]
12802RegexpParser.prototype.get_token_sq_coll_element = function() {
12803 if (this.reader.p(0) == "[" && this.reader.p(1) == "." && !this.isend(this.reader.p(2)) && this.reader.p(3) == "." && this.reader.p(4) == "]") {
12804 return this.reader.getn(5);
12805 }
12806 return "";
12807}
12808
12809// [[=a=]]
12810RegexpParser.prototype.get_token_sq_equi_class = function() {
12811 if (this.reader.p(0) == "[" && this.reader.p(1) == "=" && !this.isend(this.reader.p(2)) && this.reader.p(3) == "=" && this.reader.p(4) == "]") {
12812 return this.reader.getn(5);
12813 }
12814 return "";
12815}
12816
12817// [[:alpha:]]
12818RegexpParser.prototype.get_token_sq_char_class = function() {
12819 var class_names = ["alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "xdigit", "tab", "return", "backspace", "escape"];
12820 var pos = this.reader.tell();
12821 if (this.reader.p(0) == "[" && this.reader.p(1) == ":") {
12822 this.reader.seek_cur(2);
12823 var r = this.reader.read_alpha();
12824 if (this.reader.p(0) == ":" && this.reader.p(1) == "]") {
12825 this.reader.seek_cur(2);
12826 var __c15 = class_names;
12827 for (var __i15 = 0; __i15 < __c15.length; ++__i15) {
12828 var name = __c15[__i15];
12829 if (r == name) {
12830 return "[:" + name + ":]";
12831 }
12832 }
12833 }
12834 }
12835 this.reader.seek_set(pos);
12836 return "";
12837}
12838
12839// \@...
12840RegexpParser.prototype.get_token_at = function(pre) {
12841 var epos = this.reader.getpos();
12842 var c = this.reader.get();
12843 if (c == ">") {
12844 return [pre + ">", "\\@>"];
12845 }
12846 else if (c == "=") {
12847 return [pre + "=", "\\@="];
12848 }
12849 else if (c == "!") {
12850 return [pre + "!", "\\@!"];
12851 }
12852 else if (c == "<") {
12853 var c = this.reader.get();
12854 if (c == "=") {
12855 return [pre + "<=", "\\@<="];
12856 }
12857 else if (c == "!") {
12858 return [pre + "<!", "\\@<!"];
12859 }
12860 }
12861 throw Err("E64: @ follows nothing", epos);
12862}
12863
12864// \%...
12865RegexpParser.prototype.get_token_percent = function(pre) {
12866 var c = this.reader.get();
12867 if (c == "^") {
12868 return [pre + "^", "\\%^"];
12869 }
12870 else if (c == "$") {
12871 return [pre + "$", "\\%$"];
12872 }
12873 else if (c == "V") {
12874 return [pre + "V", "\\%V"];
12875 }
12876 else if (c == "#") {
12877 return [pre + "#", "\\%#"];
12878 }
12879 else if (c == "[") {
12880 return this.get_token_percent_sq(pre + "[");
12881 }
12882 else if (c == "(") {
12883 return [pre + "(", "\\%("];
12884 }
12885 else {
12886 return this.get_token_mlcv(pre);
12887 }
12888}
12889
12890// \%[]
12891RegexpParser.prototype.get_token_percent_sq = function(pre) {
12892 var r = "";
12893 while (TRUE) {
12894 var c = this.reader.peek();
12895 if (this.isend(c)) {
12896 throw Err("E69: Missing ] after \\%[", this.reader.getpos());
12897 }
12898 else if (c == "]") {
12899 if (r == "") {
12900 throw Err("E70: Empty \\%[", this.reader.getpos());
12901 }
12902 this.reader.seek_cur(1);
12903 break;
12904 }
12905 this.reader.seek_cur(1);
12906 r += c;
12907 }
12908 return [pre + r + "]", "\\%[" + r + "]"];
12909}
12910
12911// \%'m \%l \%c \%v
12912RegexpParser.prototype.get_token_mlvc = function(pre) {
12913 var r = "";
12914 var cmp = "";
12915 if (this.reader.p(0) == "<" || this.reader.p(0) == ">") {
12916 var cmp = this.reader.get();
12917 r += cmp;
12918 }
12919 if (this.reader.p(0) == "'") {
12920 r += this.reader.get();
12921 var c = this.reader.p(0);
12922 if (this.isend(c)) {
12923 // FIXME: Should be error? Vim allow this.
12924 var c = "";
12925 }
12926 else {
12927 var c = this.reader.get();
12928 }
12929 return [pre + r + c, "\\%" + cmp + "'" + c];
12930 }
12931 else if (isdigit(this.reader.p(0))) {
12932 var d = this.reader.read_digit();
12933 r += d;
12934 var c = this.reader.p(0);
12935 if (c == "l") {
12936 this.reader.get();
12937 return [pre + r + "l", "\\%" + cmp + d + "l"];
12938 }
12939 else if (c == "c") {
12940 this.reader.get();
12941 return [pre + r + "c", "\\%" + cmp + d + "c"];
12942 }
12943 else if (c == "v") {
12944 this.reader.get();
12945 return [pre + r + "v", "\\%" + cmp + d + "v"];
12946 }
12947 }
12948 throw Err("E71: Invalid character after %", this.reader.getpos());
12949}
12950
12951RegexpParser.prototype.getdecchrs = function() {
12952 return this.reader.read_digit();
12953}
12954
12955RegexpParser.prototype.getoctchrs = function() {
12956 return this.reader.read_odigit();
12957}
12958
12959RegexpParser.prototype.gethexchrs = function(n) {
12960 var r = "";
12961 var __c16 = viml_range(n);
12962 for (var __i16 = 0; __i16 < __c16.length; ++__i16) {
12963 var i = __c16[__i16];
12964 var c = this.reader.peek();
12965 if (!isxdigit(c)) {
12966 break;
12967 }
12968 r += this.reader.get();
12969 }
12970 return r;
12971}
12972
12973if (__webpack_require__.c[__webpack_require__.s] === module) {
12974 main();
12975}
12976else {
12977 module.exports = {
12978 VimLParser: VimLParser,
12979 StringReader: StringReader,
12980 Compiler: Compiler
12981 };
12982}
12983
12984/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(47)(module)))
12985
12986/***/ }),
12987/* 47 */
12988/***/ (function(module, exports) {
12989
12990module.exports = function(module) {
12991 if (!module.webpackPolyfill) {
12992 module.deprecate = function() {};
12993 module.paths = [];
12994 // module.parent = undefined by default
12995 if (!module.children) module.children = [];
12996 Object.defineProperty(module, "loaded", {
12997 enumerable: true,
12998 get: function() {
12999 return module.l;
13000 }
13001 });
13002 Object.defineProperty(module, "id", {
13003 enumerable: true,
13004 get: function() {
13005 return module.i;
13006 }
13007 });
13008 module.webpackPolyfill = 1;
13009 }
13010 return module;
13011};
13012
13013
13014/***/ }),
13015/* 48 */
13016/***/ (function(module, exports, __webpack_require__) {
13017
13018"use strict";
13019
13020Object.defineProperty(exports, "__esModule", { value: true });
13021exports.errorLinePattern = /[^:]+:\s*(.+?):\s*line\s*([0-9]+)\s*col\s*([0-9]+)/;
13022exports.commentPattern = /^[ \t]*("|')/;
13023exports.keywordPattern = /[\w#&$<>.:]/;
13024exports.builtinFunctionPattern = /^((<SID>|\b(v|g|b|s|l|a):)?[\w#&]+)[ \t]*\([^)]*\)/;
13025exports.wordPrePattern = /^.*?(((<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+)|(<SID>|<SID|<SI|<S|<|\b(v|g|b|s|l|a):))$/;
13026exports.wordNextPattern = /^((SID>|ID>|D>|>|<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+|(:[\w#&$.]+)).*?(\r\n|\r|\n)?$/;
13027exports.colorschemePattern = /\bcolorscheme[ \t]+\w*$/;
13028exports.mapCommandPattern = /^([ \t]*(\[ \t]*)?)\w*map[ \t]+/;
13029exports.highlightLinkPattern = /^[ \t]*(hi|highlight)[ \t]+link([ \t]+[^ \t]+)*[ \t]*$/;
13030exports.highlightPattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]*$/;
13031exports.highlightValuePattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]+([^ \t=]+)=[^ \t=]*$/;
13032exports.autocmdPattern = /^[ \t]*(au|autocmd)!?[ \t]+([^ \t,]+,)*[^ \t,]*$/;
13033exports.builtinVariablePattern = [
13034 /\bv:\w*$/,
13035];
13036exports.optionPattern = [
13037 /(^|[ \t]+)&\w*$/,
13038 /(^|[ \t]+)set(l|local|g|global)?[ \t]+\w+$/,
13039];
13040exports.notFunctionPattern = [
13041 /^[ \t]*\\$/,
13042 /^[ \t]*\w+$/,
13043 /^[ \t]*"/,
13044 /(let|set|colorscheme)[ \t][^ \t]*$/,
13045 /[^([,\\ \t\w#>]\w*$/,
13046 /^[ \t]*(hi|highlight)([ \t]+link)?([ \t]+[^ \t]+)*[ \t]*$/,
13047 exports.autocmdPattern,
13048];
13049exports.commandPattern = [
13050 /(^|[ \t]):\w+$/,
13051 /^[ \t]*\w+$/,
13052 /:?silent!?[ \t]\w+/,
13053];
13054exports.featurePattern = [
13055 /\bhas\([ \t]*["']\w*/,
13056];
13057exports.expandPattern = [
13058 /\bexpand\(['"]<\w*$/,
13059 /\bexpand\([ \t]*['"]\w*$/,
13060];
13061exports.notIdentifierPattern = [
13062 exports.commentPattern,
13063 /("|'):\w*$/,
13064 /^[ \t]*\\$/,
13065 /^[ \t]*call[ \t]+[^ \t()]*$/,
13066 /('|"|#|&|\$|<)\w*$/,
13067];
13068
13069
13070/***/ }),
13071/* 49 */,
13072/* 50 */,
13073/* 51 */,
13074/* 52 */,
13075/* 53 */
13076/***/ (function(module, exports, __webpack_require__) {
13077
13078"use strict";
13079
13080const taskManager = __webpack_require__(54);
13081const async_1 = __webpack_require__(84);
13082const stream_1 = __webpack_require__(117);
13083const sync_1 = __webpack_require__(118);
13084const settings_1 = __webpack_require__(120);
13085const utils = __webpack_require__(55);
13086function FastGlob(source, options) {
13087 try {
13088 assertPatternsInput(source);
13089 }
13090 catch (error) {
13091 return Promise.reject(error);
13092 }
13093 const works = getWorks(source, async_1.default, options);
13094 return Promise.all(works).then(utils.array.flatten);
13095}
13096(function (FastGlob) {
13097 function sync(source, options) {
13098 assertPatternsInput(source);
13099 const works = getWorks(source, sync_1.default, options);
13100 return utils.array.flatten(works);
13101 }
13102 FastGlob.sync = sync;
13103 function stream(source, options) {
13104 assertPatternsInput(source);
13105 const works = getWorks(source, stream_1.default, options);
13106 /**
13107 * The stream returned by the provider cannot work with an asynchronous iterator.
13108 * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
13109 * This affects performance (+25%). I don't see best solution right now.
13110 */
13111 return utils.stream.merge(works);
13112 }
13113 FastGlob.stream = stream;
13114 function generateTasks(source, options) {
13115 assertPatternsInput(source);
13116 const patterns = [].concat(source);
13117 const settings = new settings_1.default(options);
13118 return taskManager.generate(patterns, settings);
13119 }
13120 FastGlob.generateTasks = generateTasks;
13121})(FastGlob || (FastGlob = {}));
13122function getWorks(source, _Provider, options) {
13123 const patterns = [].concat(source);
13124 const settings = new settings_1.default(options);
13125 const tasks = taskManager.generate(patterns, settings);
13126 const provider = new _Provider(settings);
13127 return tasks.map(provider.read, provider);
13128}
13129function assertPatternsInput(source) {
13130 if ([].concat(source).every(isString)) {
13131 return;
13132 }
13133 throw new TypeError('Patterns must be a string or an array of strings');
13134}
13135function isString(source) {
13136 /* tslint:disable-next-line strict-type-predicates */
13137 return typeof source === 'string';
13138}
13139module.exports = FastGlob;
13140
13141
13142/***/ }),
13143/* 54 */
13144/***/ (function(module, exports, __webpack_require__) {
13145
13146"use strict";
13147
13148Object.defineProperty(exports, "__esModule", { value: true });
13149const utils = __webpack_require__(55);
13150function generate(patterns, settings) {
13151 const positivePatterns = getPositivePatterns(patterns);
13152 const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
13153 /**
13154 * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
13155 * filepath directly (without read directory).
13156 */
13157 const staticPatterns = !settings.caseSensitiveMatch ? [] : positivePatterns.filter(utils.pattern.isStaticPattern);
13158 const dynamicPatterns = !settings.caseSensitiveMatch ? positivePatterns : positivePatterns.filter(utils.pattern.isDynamicPattern);
13159 const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
13160 const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
13161 return staticTasks.concat(dynamicTasks);
13162}
13163exports.generate = generate;
13164function convertPatternsToTasks(positive, negative, dynamic) {
13165 const positivePatternsGroup = groupPatternsByBaseDirectory(positive);
13166 // When we have a global group – there is no reason to divide the patterns into independent tasks.
13167 // In this case, the global task covers the rest.
13168 if ('.' in positivePatternsGroup) {
13169 const task = convertPatternGroupToTask('.', positive, negative, dynamic);
13170 return [task];
13171 }
13172 return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic);
13173}
13174exports.convertPatternsToTasks = convertPatternsToTasks;
13175function getPositivePatterns(patterns) {
13176 return utils.pattern.getPositivePatterns(patterns);
13177}
13178exports.getPositivePatterns = getPositivePatterns;
13179function getNegativePatternsAsPositive(patterns, ignore) {
13180 const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
13181 const positive = negative.map(utils.pattern.convertToPositivePattern);
13182 return positive;
13183}
13184exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
13185function groupPatternsByBaseDirectory(patterns) {
13186 return patterns.reduce((collection, pattern) => {
13187 const base = utils.pattern.getBaseDirectory(pattern);
13188 if (base in collection) {
13189 collection[base].push(pattern);
13190 }
13191 else {
13192 collection[base] = [pattern];
13193 }
13194 return collection;
13195 }, {});
13196}
13197exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
13198function convertPatternGroupsToTasks(positive, negative, dynamic) {
13199 return Object.keys(positive).map((base) => {
13200 return convertPatternGroupToTask(base, positive[base], negative, dynamic);
13201 });
13202}
13203exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
13204function convertPatternGroupToTask(base, positive, negative, dynamic) {
13205 return {
13206 dynamic,
13207 positive,
13208 negative,
13209 base,
13210 patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
13211 };
13212}
13213exports.convertPatternGroupToTask = convertPatternGroupToTask;
13214
13215
13216/***/ }),
13217/* 55 */
13218/***/ (function(module, exports, __webpack_require__) {
13219
13220"use strict";
13221
13222Object.defineProperty(exports, "__esModule", { value: true });
13223const array = __webpack_require__(56);
13224exports.array = array;
13225const errno = __webpack_require__(57);
13226exports.errno = errno;
13227const fs = __webpack_require__(58);
13228exports.fs = fs;
13229const path = __webpack_require__(59);
13230exports.path = path;
13231const pattern = __webpack_require__(60);
13232exports.pattern = pattern;
13233const stream = __webpack_require__(81);
13234exports.stream = stream;
13235
13236
13237/***/ }),
13238/* 56 */
13239/***/ (function(module, exports, __webpack_require__) {
13240
13241"use strict";
13242
13243Object.defineProperty(exports, "__esModule", { value: true });
13244function flatten(items) {
13245 return items.reduce((collection, item) => [].concat(collection, item), []);
13246}
13247exports.flatten = flatten;
13248
13249
13250/***/ }),
13251/* 57 */
13252/***/ (function(module, exports, __webpack_require__) {
13253
13254"use strict";
13255
13256Object.defineProperty(exports, "__esModule", { value: true });
13257function isEnoentCodeError(error) {
13258 return error.code === 'ENOENT';
13259}
13260exports.isEnoentCodeError = isEnoentCodeError;
13261
13262
13263/***/ }),
13264/* 58 */
13265/***/ (function(module, exports, __webpack_require__) {
13266
13267"use strict";
13268
13269Object.defineProperty(exports, "__esModule", { value: true });
13270class DirentFromStats {
13271 constructor(name, stats) {
13272 this.name = name;
13273 this.isBlockDevice = stats.isBlockDevice.bind(stats);
13274 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
13275 this.isDirectory = stats.isDirectory.bind(stats);
13276 this.isFIFO = stats.isFIFO.bind(stats);
13277 this.isFile = stats.isFile.bind(stats);
13278 this.isSocket = stats.isSocket.bind(stats);
13279 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
13280 }
13281}
13282function createDirentFromStats(name, stats) {
13283 return new DirentFromStats(name, stats);
13284}
13285exports.createDirentFromStats = createDirentFromStats;
13286
13287
13288/***/ }),
13289/* 59 */
13290/***/ (function(module, exports, __webpack_require__) {
13291
13292"use strict";
13293
13294Object.defineProperty(exports, "__esModule", { value: true });
13295const path = __webpack_require__(15);
13296/**
13297 * Designed to work only with simple paths: `dir\\file`.
13298 */
13299function unixify(filepath) {
13300 return filepath.replace(/\\/g, '/');
13301}
13302exports.unixify = unixify;
13303function makeAbsolute(cwd, filepath) {
13304 return path.resolve(cwd, filepath);
13305}
13306exports.makeAbsolute = makeAbsolute;
13307
13308
13309/***/ }),
13310/* 60 */
13311/***/ (function(module, exports, __webpack_require__) {
13312
13313"use strict";
13314
13315Object.defineProperty(exports, "__esModule", { value: true });
13316const path = __webpack_require__(15);
13317const globParent = __webpack_require__(61);
13318const isGlob = __webpack_require__(62);
13319const micromatch = __webpack_require__(64);
13320const GLOBSTAR = '**';
13321function isStaticPattern(pattern) {
13322 return !isDynamicPattern(pattern);
13323}
13324exports.isStaticPattern = isStaticPattern;
13325function isDynamicPattern(pattern) {
13326 return isGlob(pattern, { strict: false });
13327}
13328exports.isDynamicPattern = isDynamicPattern;
13329function convertToPositivePattern(pattern) {
13330 return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
13331}
13332exports.convertToPositivePattern = convertToPositivePattern;
13333function convertToNegativePattern(pattern) {
13334 return '!' + pattern;
13335}
13336exports.convertToNegativePattern = convertToNegativePattern;
13337function isNegativePattern(pattern) {
13338 return pattern.startsWith('!') && pattern[1] !== '(';
13339}
13340exports.isNegativePattern = isNegativePattern;
13341function isPositivePattern(pattern) {
13342 return !isNegativePattern(pattern);
13343}
13344exports.isPositivePattern = isPositivePattern;
13345function getNegativePatterns(patterns) {
13346 return patterns.filter(isNegativePattern);
13347}
13348exports.getNegativePatterns = getNegativePatterns;
13349function getPositivePatterns(patterns) {
13350 return patterns.filter(isPositivePattern);
13351}
13352exports.getPositivePatterns = getPositivePatterns;
13353function getBaseDirectory(pattern) {
13354 return globParent(pattern);
13355}
13356exports.getBaseDirectory = getBaseDirectory;
13357function hasGlobStar(pattern) {
13358 return pattern.indexOf(GLOBSTAR) !== -1;
13359}
13360exports.hasGlobStar = hasGlobStar;
13361function endsWithSlashGlobStar(pattern) {
13362 return pattern.endsWith('/' + GLOBSTAR);
13363}
13364exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
13365function isAffectDepthOfReadingPattern(pattern) {
13366 const basename = path.basename(pattern);
13367 return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
13368}
13369exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
13370function getNaiveDepth(pattern) {
13371 const base = getBaseDirectory(pattern);
13372 const patternDepth = pattern.split('/').length;
13373 const patternBaseDepth = base.split('/').length;
13374 /**
13375 * This is a hack for pattern that has no base directory.
13376 *
13377 * This is related to the `*\something\*` pattern.
13378 */
13379 if (base === '.') {
13380 return patternDepth - patternBaseDepth;
13381 }
13382 return patternDepth - patternBaseDepth - 1;
13383}
13384exports.getNaiveDepth = getNaiveDepth;
13385function getMaxNaivePatternsDepth(patterns) {
13386 return patterns.reduce((max, pattern) => {
13387 const depth = getNaiveDepth(pattern);
13388 return depth > max ? depth : max;
13389 }, 0);
13390}
13391exports.getMaxNaivePatternsDepth = getMaxNaivePatternsDepth;
13392function makeRe(pattern, options) {
13393 return micromatch.makeRe(pattern, options);
13394}
13395exports.makeRe = makeRe;
13396function convertPatternsToRe(patterns, options) {
13397 return patterns.map((pattern) => makeRe(pattern, options));
13398}
13399exports.convertPatternsToRe = convertPatternsToRe;
13400function matchAny(entry, patternsRe) {
13401 const filepath = entry.replace(/^\.[\\\/]/, '');
13402 return patternsRe.some((patternRe) => patternRe.test(filepath));
13403}
13404exports.matchAny = matchAny;
13405
13406
13407/***/ }),
13408/* 61 */
13409/***/ (function(module, exports, __webpack_require__) {
13410
13411"use strict";
13412
13413
13414var isGlob = __webpack_require__(62);
13415var pathPosixDirname = __webpack_require__(15).posix.dirname;
13416var isWin32 = __webpack_require__(16).platform() === 'win32';
13417
13418var slash = '/';
13419var backslash = /\\/g;
13420var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
13421var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
13422var escaped = /\\([\*\?\|\[\]\(\)\{\}])/g;
13423
13424module.exports = function globParent(str) {
13425 // flip windows path separators
13426 if (isWin32 && str.indexOf(slash) < 0) {
13427 str = str.replace(backslash, slash);
13428 }
13429
13430 // special case for strings ending in enclosure containing path separator
13431 if (enclosure.test(str)) {
13432 str += slash;
13433 }
13434
13435 // preserves full path in case of trailing path separator
13436 str += 'a';
13437
13438 // remove path parts that are globby
13439 do {
13440 str = pathPosixDirname(str);
13441 } while (isGlob(str) || globby.test(str));
13442
13443 // remove escape chars and return result
13444 return str.replace(escaped, '$1');
13445};
13446
13447
13448/***/ }),
13449/* 62 */
13450/***/ (function(module, exports, __webpack_require__) {
13451
13452/*!
13453 * is-glob <https://github.com/jonschlinkert/is-glob>
13454 *
13455 * Copyright (c) 2014-2017, Jon Schlinkert.
13456 * Released under the MIT License.
13457 */
13458
13459var isExtglob = __webpack_require__(63);
13460var chars = { '{': '}', '(': ')', '[': ']'};
13461var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
13462var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
13463
13464module.exports = function isGlob(str, options) {
13465 if (typeof str !== 'string' || str === '') {
13466 return false;
13467 }
13468
13469 if (isExtglob(str)) {
13470 return true;
13471 }
13472
13473 var regex = strictRegex;
13474 var match;
13475
13476 // optionally relax regex
13477 if (options && options.strict === false) {
13478 regex = relaxedRegex;
13479 }
13480
13481 while ((match = regex.exec(str))) {
13482 if (match[2]) return true;
13483 var idx = match.index + match[0].length;
13484
13485 // if an open bracket/brace/paren is escaped,
13486 // set the index to the next closing character
13487 var open = match[1];
13488 var close = open ? chars[open] : null;
13489 if (open && close) {
13490 var n = str.indexOf(close, idx);
13491 if (n !== -1) {
13492 idx = n + 1;
13493 }
13494 }
13495
13496 str = str.slice(idx);
13497 }
13498 return false;
13499};
13500
13501
13502/***/ }),
13503/* 63 */
13504/***/ (function(module, exports) {
13505
13506/*!
13507 * is-extglob <https://github.com/jonschlinkert/is-extglob>
13508 *
13509 * Copyright (c) 2014-2016, Jon Schlinkert.
13510 * Licensed under the MIT License.
13511 */
13512
13513module.exports = function isExtglob(str) {
13514 if (typeof str !== 'string' || str === '') {
13515 return false;
13516 }
13517
13518 var match;
13519 while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
13520 if (match[2]) return true;
13521 str = str.slice(match.index + match[0].length);
13522 }
13523
13524 return false;
13525};
13526
13527
13528/***/ }),
13529/* 64 */
13530/***/ (function(module, exports, __webpack_require__) {
13531
13532"use strict";
13533
13534
13535const util = __webpack_require__(42);
13536const braces = __webpack_require__(65);
13537const picomatch = __webpack_require__(75);
13538const utils = __webpack_require__(78);
13539const isEmptyString = val => typeof val === 'string' && (val === '' || val === './');
13540
13541/**
13542 * Returns an array of strings that match one or more glob patterns.
13543 *
13544 * ```js
13545 * const mm = require('micromatch');
13546 * // mm(list, patterns[, options]);
13547 *
13548 * console.log(mm(['a.js', 'a.txt'], ['*.js']));
13549 * //=> [ 'a.js' ]
13550 * ```
13551 * @param {String|Array<string>} list List of strings to match.
13552 * @param {String|Array<string>} patterns One or more glob patterns to use for matching.
13553 * @param {Object} options See available [options](#options)
13554 * @return {Array} Returns an array of matches
13555 * @summary false
13556 * @api public
13557 */
13558
13559const micromatch = (list, patterns, options) => {
13560 patterns = [].concat(patterns);
13561 list = [].concat(list);
13562
13563 let omit = new Set();
13564 let keep = new Set();
13565 let items = new Set();
13566 let negatives = 0;
13567
13568 let onResult = state => {
13569 items.add(state.output);
13570 if (options && options.onResult) {
13571 options.onResult(state);
13572 }
13573 };
13574
13575 for (let i = 0; i < patterns.length; i++) {
13576 let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
13577 let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
13578 if (negated) negatives++;
13579
13580 for (let item of list) {
13581 let matched = isMatch(item, true);
13582
13583 let match = negated ? !matched.isMatch : matched.isMatch;
13584 if (!match) continue;
13585
13586 if (negated) {
13587 omit.add(matched.output);
13588 } else {
13589 omit.delete(matched.output);
13590 keep.add(matched.output);
13591 }
13592 }
13593 }
13594
13595 let result = negatives === patterns.length ? [...items] : [...keep];
13596 let matches = result.filter(item => !omit.has(item));
13597
13598 if (options && matches.length === 0) {
13599 if (options.failglob === true) {
13600 throw new Error(`No matches found for "${patterns.join(', ')}"`);
13601 }
13602
13603 if (options.nonull === true || options.nullglob === true) {
13604 return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns;
13605 }
13606 }
13607
13608 return matches;
13609};
13610
13611/**
13612 * Backwards compatibility
13613 */
13614
13615micromatch.match = micromatch;
13616
13617/**
13618 * Returns a matcher function from the given glob `pattern` and `options`.
13619 * The returned function takes a string to match as its only argument and returns
13620 * true if the string is a match.
13621 *
13622 * ```js
13623 * const mm = require('micromatch');
13624 * // mm.matcher(pattern[, options]);
13625 *
13626 * const isMatch = mm.matcher('*.!(*a)');
13627 * console.log(isMatch('a.a')); //=> false
13628 * console.log(isMatch('a.b')); //=> true
13629 * ```
13630 * @param {String} `pattern` Glob pattern
13631 * @param {Object} `options`
13632 * @return {Function} Returns a matcher function.
13633 * @api public
13634 */
13635
13636micromatch.matcher = (pattern, options) => picomatch(pattern, options);
13637
13638/**
13639 * Returns true if **any** of the given glob `patterns` match the specified `string`.
13640 *
13641 * ```js
13642 * const mm = require('micromatch');
13643 * // mm.isMatch(string, patterns[, options]);
13644 *
13645 * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
13646 * console.log(mm.isMatch('a.a', 'b.*')); //=> false
13647 * ```
13648 * @param {String} str The string to test.
13649 * @param {String|Array} patterns One or more glob patterns to use for matching.
13650 * @param {Object} [options] See available [options](#options).
13651 * @return {Boolean} Returns true if any patterns match `str`
13652 * @api public
13653 */
13654
13655micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
13656
13657/**
13658 * Backwards compatibility
13659 */
13660
13661micromatch.any = micromatch.isMatch;
13662
13663/**
13664 * Returns a list of strings that _**do not match any**_ of the given `patterns`.
13665 *
13666 * ```js
13667 * const mm = require('micromatch');
13668 * // mm.not(list, patterns[, options]);
13669 *
13670 * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
13671 * //=> ['b.b', 'c.c']
13672 * ```
13673 * @param {Array} `list` Array of strings to match.
13674 * @param {String|Array} `patterns` One or more glob pattern to use for matching.
13675 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13676 * @return {Array} Returns an array of strings that **do not match** the given patterns.
13677 * @api public
13678 */
13679
13680micromatch.not = (list, patterns, options = {}) => {
13681 patterns = [].concat(patterns).map(String);
13682 let result = new Set();
13683 let items = [];
13684
13685 let onResult = state => {
13686 if (options.onResult) options.onResult(state);
13687 items.push(state.output);
13688 };
13689
13690 let matches = micromatch(list, patterns, { ...options, onResult });
13691
13692 for (let item of items) {
13693 if (!matches.includes(item)) {
13694 result.add(item);
13695 }
13696 }
13697 return [...result];
13698};
13699
13700/**
13701 * Returns true if the given `string` contains the given pattern. Similar
13702 * to [.isMatch](#isMatch) but the pattern can match any part of the string.
13703 *
13704 * ```js
13705 * var mm = require('micromatch');
13706 * // mm.contains(string, pattern[, options]);
13707 *
13708 * console.log(mm.contains('aa/bb/cc', '*b'));
13709 * //=> true
13710 * console.log(mm.contains('aa/bb/cc', '*d'));
13711 * //=> false
13712 * ```
13713 * @param {String} `str` The string to match.
13714 * @param {String|Array} `patterns` Glob pattern to use for matching.
13715 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13716 * @return {Boolean} Returns true if the patter matches any part of `str`.
13717 * @api public
13718 */
13719
13720micromatch.contains = (str, pattern, options) => {
13721 if (typeof str !== 'string') {
13722 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
13723 }
13724
13725 if (Array.isArray(pattern)) {
13726 return pattern.some(p => micromatch.contains(str, p, options));
13727 }
13728
13729 if (typeof pattern === 'string') {
13730 if (isEmptyString(str) || isEmptyString(pattern)) {
13731 return false;
13732 }
13733
13734 if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {
13735 return true;
13736 }
13737 }
13738
13739 return micromatch.isMatch(str, pattern, { ...options, contains: true });
13740};
13741
13742/**
13743 * Filter the keys of the given object with the given `glob` pattern
13744 * and `options`. Does not attempt to match nested keys. If you need this feature,
13745 * use [glob-object][] instead.
13746 *
13747 * ```js
13748 * const mm = require('micromatch');
13749 * // mm.matchKeys(object, patterns[, options]);
13750 *
13751 * const obj = { aa: 'a', ab: 'b', ac: 'c' };
13752 * console.log(mm.matchKeys(obj, '*b'));
13753 * //=> { ab: 'b' }
13754 * ```
13755 * @param {Object} `object` The object with keys to filter.
13756 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
13757 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13758 * @return {Object} Returns an object with only keys that match the given patterns.
13759 * @api public
13760 */
13761
13762micromatch.matchKeys = (obj, patterns, options) => {
13763 if (!utils.isObject(obj)) {
13764 throw new TypeError('Expected the first argument to be an object');
13765 }
13766 let keys = micromatch(Object.keys(obj), patterns, options);
13767 let res = {};
13768 for (let key of keys) res[key] = obj[key];
13769 return res;
13770};
13771
13772/**
13773 * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
13774 *
13775 * ```js
13776 * const mm = require('micromatch');
13777 * // mm.some(list, patterns[, options]);
13778 *
13779 * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
13780 * // true
13781 * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
13782 * // false
13783 * ```
13784 * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
13785 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
13786 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13787 * @return {Boolean} Returns true if any patterns match `str`
13788 * @api public
13789 */
13790
13791micromatch.some = (list, patterns, options) => {
13792 let items = [].concat(list);
13793
13794 for (let pattern of [].concat(patterns)) {
13795 let isMatch = picomatch(String(pattern), options);
13796 if (items.some(item => isMatch(item))) {
13797 return true;
13798 }
13799 }
13800 return false;
13801};
13802
13803/**
13804 * Returns true if every string in the given `list` matches
13805 * any of the given glob `patterns`.
13806 *
13807 * ```js
13808 * const mm = require('micromatch');
13809 * // mm.every(list, patterns[, options]);
13810 *
13811 * console.log(mm.every('foo.js', ['foo.js']));
13812 * // true
13813 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
13814 * // true
13815 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
13816 * // false
13817 * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
13818 * // false
13819 * ```
13820 * @param {String|Array} `list` The string or array of strings to test.
13821 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
13822 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13823 * @return {Boolean} Returns true if any patterns match `str`
13824 * @api public
13825 */
13826
13827micromatch.every = (list, patterns, options) => {
13828 let items = [].concat(list);
13829
13830 for (let pattern of [].concat(patterns)) {
13831 let isMatch = picomatch(String(pattern), options);
13832 if (!items.every(item => isMatch(item))) {
13833 return false;
13834 }
13835 }
13836 return true;
13837};
13838
13839/**
13840 * Returns true if **all** of the given `patterns` match
13841 * the specified string.
13842 *
13843 * ```js
13844 * const mm = require('micromatch');
13845 * // mm.all(string, patterns[, options]);
13846 *
13847 * console.log(mm.all('foo.js', ['foo.js']));
13848 * // true
13849 *
13850 * console.log(mm.all('foo.js', ['*.js', '!foo.js']));
13851 * // false
13852 *
13853 * console.log(mm.all('foo.js', ['*.js', 'foo.js']));
13854 * // true
13855 *
13856 * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
13857 * // true
13858 * ```
13859 * @param {String|Array} `str` The string to test.
13860 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
13861 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13862 * @return {Boolean} Returns true if any patterns match `str`
13863 * @api public
13864 */
13865
13866micromatch.all = (str, patterns, options) => {
13867 if (typeof str !== 'string') {
13868 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
13869 }
13870
13871 return [].concat(patterns).every(p => picomatch(p, options)(str));
13872};
13873
13874/**
13875 * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
13876 *
13877 * ```js
13878 * const mm = require('micromatch');
13879 * // mm.capture(pattern, string[, options]);
13880 *
13881 * console.log(mm.capture('test/*.js', 'test/foo.js'));
13882 * //=> ['foo']
13883 * console.log(mm.capture('test/*.js', 'foo/bar.css'));
13884 * //=> null
13885 * ```
13886 * @param {String} `glob` Glob pattern to use for matching.
13887 * @param {String} `input` String to match
13888 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13889 * @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
13890 * @api public
13891 */
13892
13893micromatch.capture = (glob, input, options) => {
13894 let posix = utils.isWindows(options);
13895 let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
13896 let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
13897
13898 if (match) {
13899 return match.slice(1).map(v => v === void 0 ? '' : v);
13900 }
13901};
13902
13903/**
13904 * Create a regular expression from the given glob `pattern`.
13905 *
13906 * ```js
13907 * const mm = require('micromatch');
13908 * // mm.makeRe(pattern[, options]);
13909 *
13910 * console.log(mm.makeRe('*.js'));
13911 * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
13912 * ```
13913 * @param {String} `pattern` A glob pattern to convert to regex.
13914 * @param {Object} `options`
13915 * @return {RegExp} Returns a regex created from the given pattern.
13916 * @api public
13917 */
13918
13919micromatch.makeRe = (...args) => picomatch.makeRe(...args);
13920
13921/**
13922 * Scan a glob pattern to separate the pattern into segments. Used
13923 * by the [split](#split) method.
13924 *
13925 * ```js
13926 * const mm = require('micromatch');
13927 * const state = mm.scan(pattern[, options]);
13928 * ```
13929 * @param {String} `pattern`
13930 * @param {Object} `options`
13931 * @return {Object} Returns an object with
13932 * @api public
13933 */
13934
13935micromatch.scan = (...args) => picomatch.scan(...args);
13936
13937/**
13938 * Parse a glob pattern to create the source string for a regular
13939 * expression.
13940 *
13941 * ```js
13942 * const mm = require('micromatch');
13943 * const state = mm(pattern[, options]);
13944 * ```
13945 * @param {String} `glob`
13946 * @param {Object} `options`
13947 * @return {Object} Returns an object with useful properties and output to be used as regex source string.
13948 * @api public
13949 */
13950
13951micromatch.parse = (patterns, options) => {
13952 let res = [];
13953 for (let pattern of [].concat(patterns || [])) {
13954 for (let str of braces(String(pattern), options)) {
13955 res.push(picomatch.parse(str, options));
13956 }
13957 }
13958 return res;
13959};
13960
13961/**
13962 * Process the given brace `pattern`.
13963 *
13964 * ```js
13965 * const { braces } = require('micromatch');
13966 * console.log(braces('foo/{a,b,c}/bar'));
13967 * //=> [ 'foo/(a|b|c)/bar' ]
13968 *
13969 * console.log(braces('foo/{a,b,c}/bar', { expand: true }));
13970 * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
13971 * ```
13972 * @param {String} `pattern` String with brace pattern to process.
13973 * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
13974 * @return {Array}
13975 * @api public
13976 */
13977
13978micromatch.braces = (pattern, options) => {
13979 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
13980 if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
13981 return [pattern];
13982 }
13983 return braces(pattern, options);
13984};
13985
13986/**
13987 * Expand braces
13988 */
13989
13990micromatch.braceExpand = (pattern, options) => {
13991 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
13992 return micromatch.braces(pattern, { ...options, expand: true });
13993};
13994
13995/**
13996 * Expose micromatch
13997 */
13998
13999module.exports = micromatch;
14000
14001
14002/***/ }),
14003/* 65 */
14004/***/ (function(module, exports, __webpack_require__) {
14005
14006"use strict";
14007
14008
14009const stringify = __webpack_require__(66);
14010const compile = __webpack_require__(68);
14011const expand = __webpack_require__(72);
14012const parse = __webpack_require__(73);
14013
14014/**
14015 * Expand the given pattern or create a regex-compatible string.
14016 *
14017 * ```js
14018 * const braces = require('braces');
14019 * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
14020 * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
14021 * ```
14022 * @param {String} `str`
14023 * @param {Object} `options`
14024 * @return {String}
14025 * @api public
14026 */
14027
14028const braces = (input, options = {}) => {
14029 let output = [];
14030
14031 if (Array.isArray(input)) {
14032 for (let pattern of input) {
14033 let result = braces.create(pattern, options);
14034 if (Array.isArray(result)) {
14035 output.push(...result);
14036 } else {
14037 output.push(result);
14038 }
14039 }
14040 } else {
14041 output = [].concat(braces.create(input, options));
14042 }
14043
14044 if (options && options.expand === true && options.nodupes === true) {
14045 output = [...new Set(output)];
14046 }
14047 return output;
14048};
14049
14050/**
14051 * Parse the given `str` with the given `options`.
14052 *
14053 * ```js
14054 * // braces.parse(pattern, [, options]);
14055 * const ast = braces.parse('a/{b,c}/d');
14056 * console.log(ast);
14057 * ```
14058 * @param {String} pattern Brace pattern to parse
14059 * @param {Object} options
14060 * @return {Object} Returns an AST
14061 * @api public
14062 */
14063
14064braces.parse = (input, options = {}) => parse(input, options);
14065
14066/**
14067 * Creates a braces string from an AST, or an AST node.
14068 *
14069 * ```js
14070 * const braces = require('braces');
14071 * let ast = braces.parse('foo/{a,b}/bar');
14072 * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
14073 * ```
14074 * @param {String} `input` Brace pattern or AST.
14075 * @param {Object} `options`
14076 * @return {Array} Returns an array of expanded values.
14077 * @api public
14078 */
14079
14080braces.stringify = (input, options = {}) => {
14081 if (typeof input === 'string') {
14082 return stringify(braces.parse(input, options), options);
14083 }
14084 return stringify(input, options);
14085};
14086
14087/**
14088 * Compiles a brace pattern into a regex-compatible, optimized string.
14089 * This method is called by the main [braces](#braces) function by default.
14090 *
14091 * ```js
14092 * const braces = require('braces');
14093 * console.log(braces.compile('a/{b,c}/d'));
14094 * //=> ['a/(b|c)/d']
14095 * ```
14096 * @param {String} `input` Brace pattern or AST.
14097 * @param {Object} `options`
14098 * @return {Array} Returns an array of expanded values.
14099 * @api public
14100 */
14101
14102braces.compile = (input, options = {}) => {
14103 if (typeof input === 'string') {
14104 input = braces.parse(input, options);
14105 }
14106 return compile(input, options);
14107};
14108
14109/**
14110 * Expands a brace pattern into an array. This method is called by the
14111 * main [braces](#braces) function when `options.expand` is true. Before
14112 * using this method it's recommended that you read the [performance notes](#performance))
14113 * and advantages of using [.compile](#compile) instead.
14114 *
14115 * ```js
14116 * const braces = require('braces');
14117 * console.log(braces.expand('a/{b,c}/d'));
14118 * //=> ['a/b/d', 'a/c/d'];
14119 * ```
14120 * @param {String} `pattern` Brace pattern
14121 * @param {Object} `options`
14122 * @return {Array} Returns an array of expanded values.
14123 * @api public
14124 */
14125
14126braces.expand = (input, options = {}) => {
14127 if (typeof input === 'string') {
14128 input = braces.parse(input, options);
14129 }
14130
14131 let result = expand(input, options);
14132
14133 // filter out empty strings if specified
14134 if (options.noempty === true) {
14135 result = result.filter(Boolean);
14136 }
14137
14138 // filter out duplicates if specified
14139 if (options.nodupes === true) {
14140 result = [...new Set(result)];
14141 }
14142
14143 return result;
14144};
14145
14146/**
14147 * Processes a brace pattern and returns either an expanded array
14148 * (if `options.expand` is true), a highly optimized regex-compatible string.
14149 * This method is called by the main [braces](#braces) function.
14150 *
14151 * ```js
14152 * const braces = require('braces');
14153 * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
14154 * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
14155 * ```
14156 * @param {String} `pattern` Brace pattern
14157 * @param {Object} `options`
14158 * @return {Array} Returns an array of expanded values.
14159 * @api public
14160 */
14161
14162braces.create = (input, options = {}) => {
14163 if (input === '' || input.length < 3) {
14164 return [input];
14165 }
14166
14167 return options.expand !== true
14168 ? braces.compile(input, options)
14169 : braces.expand(input, options);
14170};
14171
14172/**
14173 * Expose "braces"
14174 */
14175
14176module.exports = braces;
14177
14178
14179/***/ }),
14180/* 66 */
14181/***/ (function(module, exports, __webpack_require__) {
14182
14183"use strict";
14184
14185
14186const utils = __webpack_require__(67);
14187
14188module.exports = (ast, options = {}) => {
14189 let stringify = (node, parent = {}) => {
14190 let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
14191 let invalidNode = node.invalid === true && options.escapeInvalid === true;
14192 let output = '';
14193
14194 if (node.value) {
14195 if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
14196 return '\\' + node.value;
14197 }
14198 return node.value;
14199 }
14200
14201 if (node.value) {
14202 return node.value;
14203 }
14204
14205 if (node.nodes) {
14206 for (let child of node.nodes) {
14207 output += stringify(child);
14208 }
14209 }
14210 return output;
14211 };
14212
14213 return stringify(ast);
14214};
14215
14216
14217
14218/***/ }),
14219/* 67 */
14220/***/ (function(module, exports, __webpack_require__) {
14221
14222"use strict";
14223
14224
14225exports.isInteger = num => {
14226 if (typeof num === 'number') {
14227 return Number.isInteger(num);
14228 }
14229 if (typeof num === 'string' && num.trim() !== '') {
14230 return Number.isInteger(Number(num));
14231 }
14232 return false;
14233};
14234
14235/**
14236 * Find a node of the given type
14237 */
14238
14239exports.find = (node, type) => node.nodes.find(node => node.type === type);
14240
14241/**
14242 * Find a node of the given type
14243 */
14244
14245exports.exceedsLimit = (min, max, step = 1, limit) => {
14246 if (limit === false) return false;
14247 if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
14248 return ((Number(max) - Number(min)) / Number(step)) >= limit;
14249};
14250
14251/**
14252 * Escape the given node with '\\' before node.value
14253 */
14254
14255exports.escapeNode = (block, n = 0, type) => {
14256 let node = block.nodes[n];
14257 if (!node) return;
14258
14259 if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
14260 if (node.escaped !== true) {
14261 node.value = '\\' + node.value;
14262 node.escaped = true;
14263 }
14264 }
14265};
14266
14267/**
14268 * Returns true if the given brace node should be enclosed in literal braces
14269 */
14270
14271exports.encloseBrace = node => {
14272 if (node.type !== 'brace') return false;
14273 if ((node.commas >> 0 + node.ranges >> 0) === 0) {
14274 node.invalid = true;
14275 return true;
14276 }
14277 return false;
14278};
14279
14280/**
14281 * Returns true if a brace node is invalid.
14282 */
14283
14284exports.isInvalidBrace = block => {
14285 if (block.type !== 'brace') return false;
14286 if (block.invalid === true || block.dollar) return true;
14287 if ((block.commas >> 0 + block.ranges >> 0) === 0) {
14288 block.invalid = true;
14289 return true;
14290 }
14291 if (block.open !== true || block.close !== true) {
14292 block.invalid = true;
14293 return true;
14294 }
14295 return false;
14296};
14297
14298/**
14299 * Returns true if a node is an open or close node
14300 */
14301
14302exports.isOpenOrClose = node => {
14303 if (node.type === 'open' || node.type === 'close') {
14304 return true;
14305 }
14306 return node.open === true || node.close === true;
14307};
14308
14309/**
14310 * Reduce an array of text nodes.
14311 */
14312
14313exports.reduce = nodes => nodes.reduce((acc, node) => {
14314 if (node.type === 'text') acc.push(node.value);
14315 if (node.type === 'range') node.type = 'text';
14316 return acc;
14317}, []);
14318
14319/**
14320 * Flatten an array
14321 */
14322
14323exports.flatten = (...args) => {
14324 const result = [];
14325 const flat = arr => {
14326 for (let i = 0; i < arr.length; i++) {
14327 let ele = arr[i];
14328 Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
14329 }
14330 return result;
14331 };
14332 flat(args);
14333 return result;
14334};
14335
14336
14337/***/ }),
14338/* 68 */
14339/***/ (function(module, exports, __webpack_require__) {
14340
14341"use strict";
14342
14343
14344const fill = __webpack_require__(69);
14345const utils = __webpack_require__(67);
14346
14347const compile = (ast, options = {}) => {
14348 let walk = (node, parent = {}) => {
14349 let invalidBlock = utils.isInvalidBrace(parent);
14350 let invalidNode = node.invalid === true && options.escapeInvalid === true;
14351 let invalid = invalidBlock === true || invalidNode === true;
14352 let prefix = options.escapeInvalid === true ? '\\' : '';
14353 let output = '';
14354
14355 if (node.isOpen === true) {
14356 return prefix + node.value;
14357 }
14358 if (node.isClose === true) {
14359 return prefix + node.value;
14360 }
14361
14362 if (node.type === 'open') {
14363 return invalid ? (prefix + node.value) : '(';
14364 }
14365
14366 if (node.type === 'close') {
14367 return invalid ? (prefix + node.value) : ')';
14368 }
14369
14370 if (node.type === 'comma') {
14371 return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
14372 }
14373
14374 if (node.value) {
14375 return node.value;
14376 }
14377
14378 if (node.nodes && node.ranges > 0) {
14379 let args = utils.reduce(node.nodes);
14380 let range = fill(...args, { ...options, wrap: false, toRegex: true });
14381
14382 if (range.length !== 0) {
14383 return args.length > 1 && range.length > 1 ? `(${range})` : range;
14384 }
14385 }
14386
14387 if (node.nodes) {
14388 for (let child of node.nodes) {
14389 output += walk(child, node);
14390 }
14391 }
14392 return output;
14393 };
14394
14395 return walk(ast);
14396};
14397
14398module.exports = compile;
14399
14400
14401/***/ }),
14402/* 69 */
14403/***/ (function(module, exports, __webpack_require__) {
14404
14405"use strict";
14406/*!
14407 * fill-range <https://github.com/jonschlinkert/fill-range>
14408 *
14409 * Copyright (c) 2014-present, Jon Schlinkert.
14410 * Licensed under the MIT License.
14411 */
14412
14413
14414
14415const util = __webpack_require__(42);
14416const toRegexRange = __webpack_require__(70);
14417
14418const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
14419
14420const transform = toNumber => {
14421 return value => toNumber === true ? Number(value) : String(value);
14422};
14423
14424const isValidValue = value => {
14425 return typeof value === 'number' || (typeof value === 'string' && value !== '');
14426};
14427
14428const isNumber = num => Number.isInteger(+num);
14429
14430const zeros = input => {
14431 let value = `${input}`;
14432 let index = -1;
14433 if (value[0] === '-') value = value.slice(1);
14434 if (value === '0') return false;
14435 while (value[++index] === '0');
14436 return index > 0;
14437};
14438
14439const stringify = (start, end, options) => {
14440 if (typeof start === 'string' || typeof end === 'string') {
14441 return true;
14442 }
14443 return options.stringify === true;
14444};
14445
14446const pad = (input, maxLength, toNumber) => {
14447 if (maxLength > 0) {
14448 let dash = input[0] === '-' ? '-' : '';
14449 if (dash) input = input.slice(1);
14450 input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
14451 }
14452 if (toNumber === false) {
14453 return String(input);
14454 }
14455 return input;
14456};
14457
14458const toMaxLen = (input, maxLength) => {
14459 let negative = input[0] === '-' ? '-' : '';
14460 if (negative) {
14461 input = input.slice(1);
14462 maxLength--;
14463 }
14464 while (input.length < maxLength) input = '0' + input;
14465 return negative ? ('-' + input) : input;
14466};
14467
14468const toSequence = (parts, options) => {
14469 parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
14470 parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
14471
14472 let prefix = options.capture ? '' : '?:';
14473 let positives = '';
14474 let negatives = '';
14475 let result;
14476
14477 if (parts.positives.length) {
14478 positives = parts.positives.join('|');
14479 }
14480
14481 if (parts.negatives.length) {
14482 negatives = `-(${prefix}${parts.negatives.join('|')})`;
14483 }
14484
14485 if (positives && negatives) {
14486 result = `${positives}|${negatives}`;
14487 } else {
14488 result = positives || negatives;
14489 }
14490
14491 if (options.wrap) {
14492 return `(${prefix}${result})`;
14493 }
14494
14495 return result;
14496};
14497
14498const toRange = (a, b, isNumbers, options) => {
14499 if (isNumbers) {
14500 return toRegexRange(a, b, { wrap: false, ...options });
14501 }
14502
14503 let start = String.fromCharCode(a);
14504 if (a === b) return start;
14505
14506 let stop = String.fromCharCode(b);
14507 return `[${start}-${stop}]`;
14508};
14509
14510const toRegex = (start, end, options) => {
14511 if (Array.isArray(start)) {
14512 let wrap = options.wrap === true;
14513 let prefix = options.capture ? '' : '?:';
14514 return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
14515 }
14516 return toRegexRange(start, end, options);
14517};
14518
14519const rangeError = (...args) => {
14520 return new RangeError('Invalid range arguments: ' + util.inspect(...args));
14521};
14522
14523const invalidRange = (start, end, options) => {
14524 if (options.strictRanges === true) throw rangeError([start, end]);
14525 return [];
14526};
14527
14528const invalidStep = (step, options) => {
14529 if (options.strictRanges === true) {
14530 throw new TypeError(`Expected step "${step}" to be a number`);
14531 }
14532 return [];
14533};
14534
14535const fillNumbers = (start, end, step = 1, options = {}) => {
14536 let a = Number(start);
14537 let b = Number(end);
14538
14539 if (!Number.isInteger(a) || !Number.isInteger(b)) {
14540 if (options.strictRanges === true) throw rangeError([start, end]);
14541 return [];
14542 }
14543
14544 // fix negative zero
14545 if (a === 0) a = 0;
14546 if (b === 0) b = 0;
14547
14548 let descending = a > b;
14549 let startString = String(start);
14550 let endString = String(end);
14551 let stepString = String(step);
14552 step = Math.max(Math.abs(step), 1);
14553
14554 let padded = zeros(startString) || zeros(endString) || zeros(stepString);
14555 let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
14556 let toNumber = padded === false && stringify(start, end, options) === false;
14557 let format = options.transform || transform(toNumber);
14558
14559 if (options.toRegex && step === 1) {
14560 return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
14561 }
14562
14563 let parts = { negatives: [], positives: [] };
14564 let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
14565 let range = [];
14566 let index = 0;
14567
14568 while (descending ? a >= b : a <= b) {
14569 if (options.toRegex === true && step > 1) {
14570 push(a);
14571 } else {
14572 range.push(pad(format(a, index), maxLen, toNumber));
14573 }
14574 a = descending ? a - step : a + step;
14575 index++;
14576 }
14577
14578 if (options.toRegex === true) {
14579 return step > 1
14580 ? toSequence(parts, options)
14581 : toRegex(range, null, { wrap: false, ...options });
14582 }
14583
14584 return range;
14585};
14586
14587const fillLetters = (start, end, step = 1, options = {}) => {
14588 if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
14589 return invalidRange(start, end, options);
14590 }
14591
14592
14593 let format = options.transform || (val => String.fromCharCode(val));
14594 let a = `${start}`.charCodeAt(0);
14595 let b = `${end}`.charCodeAt(0);
14596
14597 let descending = a > b;
14598 let min = Math.min(a, b);
14599 let max = Math.max(a, b);
14600
14601 if (options.toRegex && step === 1) {
14602 return toRange(min, max, false, options);
14603 }
14604
14605 let range = [];
14606 let index = 0;
14607
14608 while (descending ? a >= b : a <= b) {
14609 range.push(format(a, index));
14610 a = descending ? a - step : a + step;
14611 index++;
14612 }
14613
14614 if (options.toRegex === true) {
14615 return toRegex(range, null, { wrap: false, options });
14616 }
14617
14618 return range;
14619};
14620
14621const fill = (start, end, step, options = {}) => {
14622 if (end == null && isValidValue(start)) {
14623 return [start];
14624 }
14625
14626 if (!isValidValue(start) || !isValidValue(end)) {
14627 return invalidRange(start, end, options);
14628 }
14629
14630 if (typeof step === 'function') {
14631 return fill(start, end, 1, { transform: step });
14632 }
14633
14634 if (isObject(step)) {
14635 return fill(start, end, 0, step);
14636 }
14637
14638 let opts = { ...options };
14639 if (opts.capture === true) opts.wrap = true;
14640 step = step || opts.step || 1;
14641
14642 if (!isNumber(step)) {
14643 if (step != null && !isObject(step)) return invalidStep(step, opts);
14644 return fill(start, end, 1, step);
14645 }
14646
14647 if (isNumber(start) && isNumber(end)) {
14648 return fillNumbers(start, end, step, opts);
14649 }
14650
14651 return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
14652};
14653
14654module.exports = fill;
14655
14656
14657/***/ }),
14658/* 70 */
14659/***/ (function(module, exports, __webpack_require__) {
14660
14661"use strict";
14662/*!
14663 * to-regex-range <https://github.com/micromatch/to-regex-range>
14664 *
14665 * Copyright (c) 2015-present, Jon Schlinkert.
14666 * Released under the MIT License.
14667 */
14668
14669
14670
14671const isNumber = __webpack_require__(71);
14672
14673const toRegexRange = (min, max, options) => {
14674 if (isNumber(min) === false) {
14675 throw new TypeError('toRegexRange: expected the first argument to be a number');
14676 }
14677
14678 if (max === void 0 || min === max) {
14679 return String(min);
14680 }
14681
14682 if (isNumber(max) === false) {
14683 throw new TypeError('toRegexRange: expected the second argument to be a number.');
14684 }
14685
14686 let opts = { relaxZeros: true, ...options };
14687 if (typeof opts.strictZeros === 'boolean') {
14688 opts.relaxZeros = opts.strictZeros === false;
14689 }
14690
14691 let relax = String(opts.relaxZeros);
14692 let shorthand = String(opts.shorthand);
14693 let capture = String(opts.capture);
14694 let wrap = String(opts.wrap);
14695 let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
14696
14697 if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
14698 return toRegexRange.cache[cacheKey].result;
14699 }
14700
14701 let a = Math.min(min, max);
14702 let b = Math.max(min, max);
14703
14704 if (Math.abs(a - b) === 1) {
14705 let result = min + '|' + max;
14706 if (opts.capture) {
14707 return `(${result})`;
14708 }
14709 if (opts.wrap === false) {
14710 return result;
14711 }
14712 return `(?:${result})`;
14713 }
14714
14715 let isPadded = hasPadding(min) || hasPadding(max);
14716 let state = { min, max, a, b };
14717 let positives = [];
14718 let negatives = [];
14719
14720 if (isPadded) {
14721 state.isPadded = isPadded;
14722 state.maxLen = String(state.max).length;
14723 }
14724
14725 if (a < 0) {
14726 let newMin = b < 0 ? Math.abs(b) : 1;
14727 negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
14728 a = state.a = 0;
14729 }
14730
14731 if (b >= 0) {
14732 positives = splitToPatterns(a, b, state, opts);
14733 }
14734
14735 state.negatives = negatives;
14736 state.positives = positives;
14737 state.result = collatePatterns(negatives, positives, opts);
14738
14739 if (opts.capture === true) {
14740 state.result = `(${state.result})`;
14741 } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
14742 state.result = `(?:${state.result})`;
14743 }
14744
14745 toRegexRange.cache[cacheKey] = state;
14746 return state.result;
14747};
14748
14749function collatePatterns(neg, pos, options) {
14750 let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
14751 let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
14752 let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
14753 let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
14754 return subpatterns.join('|');
14755}
14756
14757function splitToRanges(min, max) {
14758 let nines = 1;
14759 let zeros = 1;
14760
14761 let stop = countNines(min, nines);
14762 let stops = new Set([max]);
14763
14764 while (min <= stop && stop <= max) {
14765 stops.add(stop);
14766 nines += 1;
14767 stop = countNines(min, nines);
14768 }
14769
14770 stop = countZeros(max + 1, zeros) - 1;
14771
14772 while (min < stop && stop <= max) {
14773 stops.add(stop);
14774 zeros += 1;
14775 stop = countZeros(max + 1, zeros) - 1;
14776 }
14777
14778 stops = [...stops];
14779 stops.sort(compare);
14780 return stops;
14781}
14782
14783/**
14784 * Convert a range to a regex pattern
14785 * @param {Number} `start`
14786 * @param {Number} `stop`
14787 * @return {String}
14788 */
14789
14790function rangeToPattern(start, stop, options) {
14791 if (start === stop) {
14792 return { pattern: start, count: [], digits: 0 };
14793 }
14794
14795 let zipped = zip(start, stop);
14796 let digits = zipped.length;
14797 let pattern = '';
14798 let count = 0;
14799
14800 for (let i = 0; i < digits; i++) {
14801 let [startDigit, stopDigit] = zipped[i];
14802
14803 if (startDigit === stopDigit) {
14804 pattern += startDigit;
14805
14806 } else if (startDigit !== '0' || stopDigit !== '9') {
14807 pattern += toCharacterClass(startDigit, stopDigit, options);
14808
14809 } else {
14810 count++;
14811 }
14812 }
14813
14814 if (count) {
14815 pattern += options.shorthand === true ? '\\d' : '[0-9]';
14816 }
14817
14818 return { pattern, count: [count], digits };
14819}
14820
14821function splitToPatterns(min, max, tok, options) {
14822 let ranges = splitToRanges(min, max);
14823 let tokens = [];
14824 let start = min;
14825 let prev;
14826
14827 for (let i = 0; i < ranges.length; i++) {
14828 let max = ranges[i];
14829 let obj = rangeToPattern(String(start), String(max), options);
14830 let zeros = '';
14831
14832 if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
14833 if (prev.count.length > 1) {
14834 prev.count.pop();
14835 }
14836
14837 prev.count.push(obj.count[0]);
14838 prev.string = prev.pattern + toQuantifier(prev.count);
14839 start = max + 1;
14840 continue;
14841 }
14842
14843 if (tok.isPadded) {
14844 zeros = padZeros(max, tok, options);
14845 }
14846
14847 obj.string = zeros + obj.pattern + toQuantifier(obj.count);
14848 tokens.push(obj);
14849 start = max + 1;
14850 prev = obj;
14851 }
14852
14853 return tokens;
14854}
14855
14856function filterPatterns(arr, comparison, prefix, intersection, options) {
14857 let result = [];
14858
14859 for (let ele of arr) {
14860 let { string } = ele;
14861
14862 // only push if _both_ are negative...
14863 if (!intersection && !contains(comparison, 'string', string)) {
14864 result.push(prefix + string);
14865 }
14866
14867 // or _both_ are positive
14868 if (intersection && contains(comparison, 'string', string)) {
14869 result.push(prefix + string);
14870 }
14871 }
14872 return result;
14873}
14874
14875/**
14876 * Zip strings
14877 */
14878
14879function zip(a, b) {
14880 let arr = [];
14881 for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
14882 return arr;
14883}
14884
14885function compare(a, b) {
14886 return a > b ? 1 : b > a ? -1 : 0;
14887}
14888
14889function contains(arr, key, val) {
14890 return arr.some(ele => ele[key] === val);
14891}
14892
14893function countNines(min, len) {
14894 return Number(String(min).slice(0, -len) + '9'.repeat(len));
14895}
14896
14897function countZeros(integer, zeros) {
14898 return integer - (integer % Math.pow(10, zeros));
14899}
14900
14901function toQuantifier(digits) {
14902 let [start = 0, stop = ''] = digits;
14903 if (stop || start > 1) {
14904 return `{${start + (stop ? ',' + stop : '')}}`;
14905 }
14906 return '';
14907}
14908
14909function toCharacterClass(a, b, options) {
14910 return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
14911}
14912
14913function hasPadding(str) {
14914 return /^-?(0+)\d/.test(str);
14915}
14916
14917function padZeros(value, tok, options) {
14918 if (!tok.isPadded) {
14919 return value;
14920 }
14921
14922 let diff = Math.abs(tok.maxLen - String(value).length);
14923 let relax = options.relaxZeros !== false;
14924
14925 switch (diff) {
14926 case 0:
14927 return '';
14928 case 1:
14929 return relax ? '0?' : '0';
14930 case 2:
14931 return relax ? '0{0,2}' : '00';
14932 default: {
14933 return relax ? `0{0,${diff}}` : `0{${diff}}`;
14934 }
14935 }
14936}
14937
14938/**
14939 * Cache
14940 */
14941
14942toRegexRange.cache = {};
14943toRegexRange.clearCache = () => (toRegexRange.cache = {});
14944
14945/**
14946 * Expose `toRegexRange`
14947 */
14948
14949module.exports = toRegexRange;
14950
14951
14952/***/ }),
14953/* 71 */
14954/***/ (function(module, exports, __webpack_require__) {
14955
14956"use strict";
14957/*!
14958 * is-number <https://github.com/jonschlinkert/is-number>
14959 *
14960 * Copyright (c) 2014-present, Jon Schlinkert.
14961 * Released under the MIT License.
14962 */
14963
14964
14965
14966module.exports = function(num) {
14967 if (typeof num === 'number') {
14968 return num - num === 0;
14969 }
14970 if (typeof num === 'string' && num.trim() !== '') {
14971 return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
14972 }
14973 return false;
14974};
14975
14976
14977/***/ }),
14978/* 72 */
14979/***/ (function(module, exports, __webpack_require__) {
14980
14981"use strict";
14982
14983
14984const fill = __webpack_require__(69);
14985const stringify = __webpack_require__(66);
14986const utils = __webpack_require__(67);
14987
14988const append = (queue = '', stash = '', enclose = false) => {
14989 let result = [];
14990
14991 queue = [].concat(queue);
14992 stash = [].concat(stash);
14993
14994 if (!stash.length) return queue;
14995 if (!queue.length) {
14996 return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
14997 }
14998
14999 for (let item of queue) {
15000 if (Array.isArray(item)) {
15001 for (let value of item) {
15002 result.push(append(value, stash, enclose));
15003 }
15004 } else {
15005 for (let ele of stash) {
15006 if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
15007 result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));
15008 }
15009 }
15010 }
15011 return utils.flatten(result);
15012};
15013
15014const expand = (ast, options = {}) => {
15015 let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
15016
15017 let walk = (node, parent = {}) => {
15018 node.queue = [];
15019
15020 let p = parent;
15021 let q = parent.queue;
15022
15023 while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
15024 p = p.parent;
15025 q = p.queue;
15026 }
15027
15028 if (node.invalid || node.dollar) {
15029 q.push(append(q.pop(), stringify(node, options)));
15030 return;
15031 }
15032
15033 if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
15034 q.push(append(q.pop(), ['{}']));
15035 return;
15036 }
15037
15038 if (node.nodes && node.ranges > 0) {
15039 let args = utils.reduce(node.nodes);
15040
15041 if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
15042 throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
15043 }
15044
15045 let range = fill(...args, options);
15046 if (range.length === 0) {
15047 range = stringify(node, options);
15048 }
15049
15050 q.push(append(q.pop(), range));
15051 node.nodes = [];
15052 return;
15053 }
15054
15055 let enclose = utils.encloseBrace(node);
15056 let queue = node.queue;
15057 let block = node;
15058
15059 while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
15060 block = block.parent;
15061 queue = block.queue;
15062 }
15063
15064 for (let i = 0; i < node.nodes.length; i++) {
15065 let child = node.nodes[i];
15066
15067 if (child.type === 'comma' && node.type === 'brace') {
15068 if (i === 1) queue.push('');
15069 queue.push('');
15070 continue;
15071 }
15072
15073 if (child.type === 'close') {
15074 q.push(append(q.pop(), queue, enclose));
15075 continue;
15076 }
15077
15078 if (child.value && child.type !== 'open') {
15079 queue.push(append(queue.pop(), child.value));
15080 continue;
15081 }
15082
15083 if (child.nodes) {
15084 walk(child, node);
15085 }
15086 }
15087
15088 return queue;
15089 };
15090
15091 return utils.flatten(walk(ast));
15092};
15093
15094module.exports = expand;
15095
15096
15097/***/ }),
15098/* 73 */
15099/***/ (function(module, exports, __webpack_require__) {
15100
15101"use strict";
15102
15103
15104const stringify = __webpack_require__(66);
15105
15106/**
15107 * Constants
15108 */
15109
15110const {
15111 MAX_LENGTH,
15112 CHAR_BACKSLASH, /* \ */
15113 CHAR_BACKTICK, /* ` */
15114 CHAR_COMMA, /* , */
15115 CHAR_DOT, /* . */
15116 CHAR_LEFT_PARENTHESES, /* ( */
15117 CHAR_RIGHT_PARENTHESES, /* ) */
15118 CHAR_LEFT_CURLY_BRACE, /* { */
15119 CHAR_RIGHT_CURLY_BRACE, /* } */
15120 CHAR_LEFT_SQUARE_BRACKET, /* [ */
15121 CHAR_RIGHT_SQUARE_BRACKET, /* ] */
15122 CHAR_DOUBLE_QUOTE, /* " */
15123 CHAR_SINGLE_QUOTE, /* ' */
15124 CHAR_NO_BREAK_SPACE,
15125 CHAR_ZERO_WIDTH_NOBREAK_SPACE
15126} = __webpack_require__(74);
15127
15128/**
15129 * parse
15130 */
15131
15132const parse = (input, options = {}) => {
15133 if (typeof input !== 'string') {
15134 throw new TypeError('Expected a string');
15135 }
15136
15137 let opts = options || {};
15138 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
15139 if (input.length > max) {
15140 throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
15141 }
15142
15143 let ast = { type: 'root', input, nodes: [] };
15144 let stack = [ast];
15145 let block = ast;
15146 let prev = ast;
15147 let brackets = 0;
15148 let length = input.length;
15149 let index = 0;
15150 let depth = 0;
15151 let value;
15152 let memo = {};
15153
15154 /**
15155 * Helpers
15156 */
15157
15158 const advance = () => input[index++];
15159 const push = node => {
15160 if (node.type === 'text' && prev.type === 'dot') {
15161 prev.type = 'text';
15162 }
15163
15164 if (prev && prev.type === 'text' && node.type === 'text') {
15165 prev.value += node.value;
15166 return;
15167 }
15168
15169 block.nodes.push(node);
15170 node.parent = block;
15171 node.prev = prev;
15172 prev = node;
15173 return node;
15174 };
15175
15176 push({ type: 'bos' });
15177
15178 while (index < length) {
15179 block = stack[stack.length - 1];
15180 value = advance();
15181
15182 /**
15183 * Invalid chars
15184 */
15185
15186 if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
15187 continue;
15188 }
15189
15190 /**
15191 * Escaped chars
15192 */
15193
15194 if (value === CHAR_BACKSLASH) {
15195 push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
15196 continue;
15197 }
15198
15199 /**
15200 * Right square bracket (literal): ']'
15201 */
15202
15203 if (value === CHAR_RIGHT_SQUARE_BRACKET) {
15204 push({ type: 'text', value: '\\' + value });
15205 continue;
15206 }
15207
15208 /**
15209 * Left square bracket: '['
15210 */
15211
15212 if (value === CHAR_LEFT_SQUARE_BRACKET) {
15213 brackets++;
15214
15215 let closed = true;
15216 let next;
15217
15218 while (index < length && (next = advance())) {
15219 value += next;
15220
15221 if (next === CHAR_LEFT_SQUARE_BRACKET) {
15222 brackets++;
15223 continue;
15224 }
15225
15226 if (next === CHAR_BACKSLASH) {
15227 value += advance();
15228 continue;
15229 }
15230
15231 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
15232 brackets--;
15233
15234 if (brackets === 0) {
15235 break;
15236 }
15237 }
15238 }
15239
15240 push({ type: 'text', value });
15241 continue;
15242 }
15243
15244 /**
15245 * Parentheses
15246 */
15247
15248 if (value === CHAR_LEFT_PARENTHESES) {
15249 block = push({ type: 'paren', nodes: [] });
15250 stack.push(block);
15251 push({ type: 'text', value });
15252 continue;
15253 }
15254
15255 if (value === CHAR_RIGHT_PARENTHESES) {
15256 if (block.type !== 'paren') {
15257 push({ type: 'text', value });
15258 continue;
15259 }
15260 block = stack.pop();
15261 push({ type: 'text', value });
15262 block = stack[stack.length - 1];
15263 continue;
15264 }
15265
15266 /**
15267 * Quotes: '|"|`
15268 */
15269
15270 if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
15271 let open = value;
15272 let next;
15273
15274 if (options.keepQuotes !== true) {
15275 value = '';
15276 }
15277
15278 while (index < length && (next = advance())) {
15279 if (next === CHAR_BACKSLASH) {
15280 value += next + advance();
15281 continue;
15282 }
15283
15284 if (next === open) {
15285 if (options.keepQuotes === true) value += next;
15286 break;
15287 }
15288
15289 value += next;
15290 }
15291
15292 push({ type: 'text', value });
15293 continue;
15294 }
15295
15296 /**
15297 * Left curly brace: '{'
15298 */
15299
15300 if (value === CHAR_LEFT_CURLY_BRACE) {
15301 depth++;
15302
15303 let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
15304 let brace = {
15305 type: 'brace',
15306 open: true,
15307 close: false,
15308 dollar,
15309 depth,
15310 commas: 0,
15311 ranges: 0,
15312 nodes: []
15313 };
15314
15315 block = push(brace);
15316 stack.push(block);
15317 push({ type: 'open', value });
15318 continue;
15319 }
15320
15321 /**
15322 * Right curly brace: '}'
15323 */
15324
15325 if (value === CHAR_RIGHT_CURLY_BRACE) {
15326 if (block.type !== 'brace') {
15327 push({ type: 'text', value });
15328 continue;
15329 }
15330
15331 let type = 'close';
15332 block = stack.pop();
15333 block.close = true;
15334
15335 push({ type, value });
15336 depth--;
15337
15338 block = stack[stack.length - 1];
15339 continue;
15340 }
15341
15342 /**
15343 * Comma: ','
15344 */
15345
15346 if (value === CHAR_COMMA && depth > 0) {
15347 if (block.ranges > 0) {
15348 block.ranges = 0;
15349 let open = block.nodes.shift();
15350 block.nodes = [open, { type: 'text', value: stringify(block) }];
15351 }
15352
15353 push({ type: 'comma', value });
15354 block.commas++;
15355 continue;
15356 }
15357
15358 /**
15359 * Dot: '.'
15360 */
15361
15362 if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
15363 let siblings = block.nodes;
15364
15365 if (depth === 0 || siblings.length === 0) {
15366 push({ type: 'text', value });
15367 continue;
15368 }
15369
15370 if (prev.type === 'dot') {
15371 block.range = [];
15372 prev.value += value;
15373 prev.type = 'range';
15374
15375 if (block.nodes.length !== 3 && block.nodes.length !== 5) {
15376 block.invalid = true;
15377 block.ranges = 0;
15378 prev.type = 'text';
15379 continue;
15380 }
15381
15382 block.ranges++;
15383 block.args = [];
15384 continue;
15385 }
15386
15387 if (prev.type === 'range') {
15388 siblings.pop();
15389
15390 let before = siblings[siblings.length - 1];
15391 before.value += prev.value + value;
15392 prev = before;
15393 block.ranges--;
15394 continue;
15395 }
15396
15397 push({ type: 'dot', value });
15398 continue;
15399 }
15400
15401 /**
15402 * Text
15403 */
15404
15405 push({ type: 'text', value });
15406 }
15407
15408 // Mark imbalanced braces and brackets as invalid
15409 do {
15410 block = stack.pop();
15411
15412 if (block.type !== 'root') {
15413 block.nodes.forEach(node => {
15414 if (!node.nodes) {
15415 if (node.type === 'open') node.isOpen = true;
15416 if (node.type === 'close') node.isClose = true;
15417 if (!node.nodes) node.type = 'text';
15418 node.invalid = true;
15419 }
15420 });
15421
15422 // get the location of the block on parent.nodes (block's siblings)
15423 let parent = stack[stack.length - 1];
15424 let index = parent.nodes.indexOf(block);
15425 // replace the (invalid) block with it's nodes
15426 parent.nodes.splice(index, 1, ...block.nodes);
15427 }
15428 } while (stack.length > 0);
15429
15430 push({ type: 'eos' });
15431 return ast;
15432};
15433
15434module.exports = parse;
15435
15436
15437/***/ }),
15438/* 74 */
15439/***/ (function(module, exports, __webpack_require__) {
15440
15441"use strict";
15442
15443
15444module.exports = {
15445 MAX_LENGTH: 1024 * 64,
15446
15447 // Digits
15448 CHAR_0: '0', /* 0 */
15449 CHAR_9: '9', /* 9 */
15450
15451 // Alphabet chars.
15452 CHAR_UPPERCASE_A: 'A', /* A */
15453 CHAR_LOWERCASE_A: 'a', /* a */
15454 CHAR_UPPERCASE_Z: 'Z', /* Z */
15455 CHAR_LOWERCASE_Z: 'z', /* z */
15456
15457 CHAR_LEFT_PARENTHESES: '(', /* ( */
15458 CHAR_RIGHT_PARENTHESES: ')', /* ) */
15459
15460 CHAR_ASTERISK: '*', /* * */
15461
15462 // Non-alphabetic chars.
15463 CHAR_AMPERSAND: '&', /* & */
15464 CHAR_AT: '@', /* @ */
15465 CHAR_BACKSLASH: '\\', /* \ */
15466 CHAR_BACKTICK: '`', /* ` */
15467 CHAR_CARRIAGE_RETURN: '\r', /* \r */
15468 CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
15469 CHAR_COLON: ':', /* : */
15470 CHAR_COMMA: ',', /* , */
15471 CHAR_DOLLAR: '$', /* . */
15472 CHAR_DOT: '.', /* . */
15473 CHAR_DOUBLE_QUOTE: '"', /* " */
15474 CHAR_EQUAL: '=', /* = */
15475 CHAR_EXCLAMATION_MARK: '!', /* ! */
15476 CHAR_FORM_FEED: '\f', /* \f */
15477 CHAR_FORWARD_SLASH: '/', /* / */
15478 CHAR_HASH: '#', /* # */
15479 CHAR_HYPHEN_MINUS: '-', /* - */
15480 CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
15481 CHAR_LEFT_CURLY_BRACE: '{', /* { */
15482 CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
15483 CHAR_LINE_FEED: '\n', /* \n */
15484 CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
15485 CHAR_PERCENT: '%', /* % */
15486 CHAR_PLUS: '+', /* + */
15487 CHAR_QUESTION_MARK: '?', /* ? */
15488 CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
15489 CHAR_RIGHT_CURLY_BRACE: '}', /* } */
15490 CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
15491 CHAR_SEMICOLON: ';', /* ; */
15492 CHAR_SINGLE_QUOTE: '\'', /* ' */
15493 CHAR_SPACE: ' ', /* */
15494 CHAR_TAB: '\t', /* \t */
15495 CHAR_UNDERSCORE: '_', /* _ */
15496 CHAR_VERTICAL_LINE: '|', /* | */
15497 CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
15498};
15499
15500
15501/***/ }),
15502/* 75 */
15503/***/ (function(module, exports, __webpack_require__) {
15504
15505"use strict";
15506
15507
15508module.exports = __webpack_require__(76);
15509
15510
15511/***/ }),
15512/* 76 */
15513/***/ (function(module, exports, __webpack_require__) {
15514
15515"use strict";
15516
15517
15518const path = __webpack_require__(15);
15519const scan = __webpack_require__(77);
15520const parse = __webpack_require__(80);
15521const utils = __webpack_require__(78);
15522
15523/**
15524 * Creates a matcher function from one or more glob patterns. The
15525 * returned function takes a string to match as its first argument,
15526 * and returns true if the string is a match. The returned matcher
15527 * function also takes a boolean as the second argument that, when true,
15528 * returns an object with additional information.
15529 *
15530 * ```js
15531 * const picomatch = require('picomatch');
15532 * // picomatch(glob[, options]);
15533 *
15534 * const isMatch = picomatch('*.!(*a)');
15535 * console.log(isMatch('a.a')); //=> false
15536 * console.log(isMatch('a.b')); //=> true
15537 * ```
15538 * @name picomatch
15539 * @param {String|Array} `globs` One or more glob patterns.
15540 * @param {Object=} `options`
15541 * @return {Function=} Returns a matcher function.
15542 * @api public
15543 */
15544
15545const picomatch = (glob, options, returnState = false) => {
15546 if (Array.isArray(glob)) {
15547 let fns = glob.map(input => picomatch(input, options, returnState));
15548 return str => {
15549 for (let isMatch of fns) {
15550 let state = isMatch(str);
15551 if (state) return state;
15552 }
15553 return false;
15554 };
15555 }
15556
15557 if (typeof glob !== 'string' || glob === '') {
15558 throw new TypeError('Expected pattern to be a non-empty string');
15559 }
15560
15561 let opts = options || {};
15562 let posix = utils.isWindows(options);
15563 let regex = picomatch.makeRe(glob, options, false, true);
15564 let state = regex.state;
15565 delete regex.state;
15566
15567 let isIgnored = () => false;
15568 if (opts.ignore) {
15569 let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
15570 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
15571 }
15572
15573 const matcher = (input, returnObject = false) => {
15574 let { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
15575 let result = { glob, state, regex, posix, input, output, match, isMatch };
15576
15577 if (typeof opts.onResult === 'function') {
15578 opts.onResult(result);
15579 }
15580
15581 if (isMatch === false) {
15582 result.isMatch = false;
15583 return returnObject ? result : false;
15584 }
15585
15586 if (isIgnored(input)) {
15587 if (typeof opts.onIgnore === 'function') {
15588 opts.onIgnore(result);
15589 }
15590 result.isMatch = false;
15591 return returnObject ? result : false;
15592 }
15593
15594 if (typeof opts.onMatch === 'function') {
15595 opts.onMatch(result);
15596 }
15597 return returnObject ? result : true;
15598 };
15599
15600 if (returnState) {
15601 matcher.state = state;
15602 }
15603
15604 return matcher;
15605};
15606
15607/**
15608 * Test `input` with the given `regex`. This is used by the main
15609 * `picomatch()` function to test the input string.
15610 *
15611 * ```js
15612 * const picomatch = require('picomatch');
15613 * // picomatch.test(input, regex[, options]);
15614 *
15615 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
15616 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
15617 * ```
15618 * @param {String} `input` String to test.
15619 * @param {RegExp} `regex`
15620 * @return {Object} Returns an object with matching info.
15621 * @api public
15622 */
15623
15624picomatch.test = (input, regex, options, { glob, posix } = {}) => {
15625 if (typeof input !== 'string') {
15626 throw new TypeError('Expected input to be a string');
15627 }
15628
15629 if (input === '') {
15630 return { isMatch: false, output: '' };
15631 }
15632
15633 let opts = options || {};
15634 let format = opts.format || (posix ? utils.toPosixSlashes : null);
15635 let match = input === glob;
15636 let output = (match && format) ? format(input) : input;
15637
15638 if (match === false) {
15639 output = format ? format(input) : input;
15640 match = output === glob;
15641 }
15642
15643 if (match === false || opts.capture === true) {
15644 if (opts.matchBase === true || opts.basename === true) {
15645 match = picomatch.matchBase(input, regex, options, posix);
15646 } else {
15647 match = regex.exec(output);
15648 }
15649 }
15650
15651 return { isMatch: !!match, match, output };
15652};
15653
15654/**
15655 * Match the basename of a filepath.
15656 *
15657 * ```js
15658 * const picomatch = require('picomatch');
15659 * // picomatch.matchBase(input, glob[, options]);
15660 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
15661 * ```
15662 * @param {String} `input` String to test.
15663 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
15664 * @return {Boolean}
15665 * @api public
15666 */
15667
15668picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
15669 let regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
15670 return regex.test(path.basename(input));
15671};
15672
15673/**
15674 * Returns true if **any** of the given glob `patterns` match the specified `string`.
15675 *
15676 * ```js
15677 * const picomatch = require('picomatch');
15678 * // picomatch.isMatch(string, patterns[, options]);
15679 *
15680 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
15681 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
15682 * ```
15683 * @param {String|Array} str The string to test.
15684 * @param {String|Array} patterns One or more glob patterns to use for matching.
15685 * @param {Object} [options] See available [options](#options).
15686 * @return {Boolean} Returns true if any patterns match `str`
15687 * @api public
15688 */
15689
15690picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
15691
15692/**
15693 * Parse a glob pattern to create the source string for a regular
15694 * expression.
15695 *
15696 * ```js
15697 * const picomatch = require('picomatch');
15698 * const result = picomatch.parse(glob[, options]);
15699 * ```
15700 * @param {String} `glob`
15701 * @param {Object} `options`
15702 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
15703 * @api public
15704 */
15705
15706picomatch.parse = (glob, options) => parse(glob, options);
15707
15708/**
15709 * Scan a glob pattern to separate the pattern into segments.
15710 *
15711 * ```js
15712 * const picomatch = require('picomatch');
15713 * // picomatch.scan(input[, options]);
15714 *
15715 * const result = picomatch.scan('!./foo/*.js');
15716 * console.log(result);
15717 * // { prefix: '!./',
15718 * // input: '!./foo/*.js',
15719 * // base: 'foo',
15720 * // glob: '*.js',
15721 * // negated: true,
15722 * // isGlob: true }
15723 * ```
15724 * @param {String} `input` Glob pattern to scan.
15725 * @param {Object} `options`
15726 * @return {Object} Returns an object with
15727 * @api public
15728 */
15729
15730picomatch.scan = (input, options) => scan(input, options);
15731
15732/**
15733 * Create a regular expression from a glob pattern.
15734 *
15735 * ```js
15736 * const picomatch = require('picomatch');
15737 * // picomatch.makeRe(input[, options]);
15738 *
15739 * console.log(picomatch.makeRe('*.js'));
15740 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
15741 * ```
15742 * @param {String} `input` A glob pattern to convert to regex.
15743 * @param {Object} `options`
15744 * @return {RegExp} Returns a regex created from the given pattern.
15745 * @api public
15746 */
15747
15748picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
15749 if (!input || typeof input !== 'string') {
15750 throw new TypeError('Expected a non-empty string');
15751 }
15752
15753 let opts = options || {};
15754 let prepend = opts.contains ? '' : '^';
15755 let append = opts.contains ? '' : '$';
15756 let state = { negated: false, fastpaths: true };
15757 let prefix = '';
15758 let output;
15759
15760 if (input.startsWith('./')) {
15761 input = input.slice(2);
15762 prefix = state.prefix = './';
15763 }
15764
15765 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
15766 output = parse.fastpaths(input, options);
15767 }
15768
15769 if (output === void 0) {
15770 state = picomatch.parse(input, options);
15771 state.prefix = prefix + (state.prefix || '');
15772 output = state.output;
15773 }
15774
15775 if (returnOutput === true) {
15776 return output;
15777 }
15778
15779 let source = `${prepend}(?:${output})${append}`;
15780 if (state && state.negated === true) {
15781 source = `^(?!${source}).*$`;
15782 }
15783
15784 let regex = picomatch.toRegex(source, options);
15785 if (returnState === true) {
15786 regex.state = state;
15787 }
15788
15789 return regex;
15790};
15791
15792/**
15793 * Create a regular expression from the given regex source string.
15794 *
15795 * ```js
15796 * const picomatch = require('picomatch');
15797 * // picomatch.toRegex(source[, options]);
15798 *
15799 * const { output } = picomatch.parse('*.js');
15800 * console.log(picomatch.toRegex(output));
15801 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
15802 * ```
15803 * @param {String} `source` Regular expression source string.
15804 * @param {Object} `options`
15805 * @return {RegExp}
15806 * @api public
15807 */
15808
15809picomatch.toRegex = (source, options) => {
15810 try {
15811 let opts = options || {};
15812 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
15813 } catch (err) {
15814 if (options && options.debug === true) throw err;
15815 return /$^/;
15816 }
15817};
15818
15819/**
15820 * Picomatch constants.
15821 * @return {Object}
15822 */
15823
15824picomatch.constants = __webpack_require__(79);
15825
15826/**
15827 * Expose "picomatch"
15828 */
15829
15830module.exports = picomatch;
15831
15832
15833/***/ }),
15834/* 77 */
15835/***/ (function(module, exports, __webpack_require__) {
15836
15837"use strict";
15838
15839
15840const utils = __webpack_require__(78);
15841
15842const {
15843 CHAR_ASTERISK, /* * */
15844 CHAR_AT, /* @ */
15845 CHAR_BACKWARD_SLASH, /* \ */
15846 CHAR_COMMA, /* , */
15847 CHAR_DOT, /* . */
15848 CHAR_EXCLAMATION_MARK, /* ! */
15849 CHAR_FORWARD_SLASH, /* / */
15850 CHAR_LEFT_CURLY_BRACE, /* { */
15851 CHAR_LEFT_PARENTHESES, /* ( */
15852 CHAR_LEFT_SQUARE_BRACKET, /* [ */
15853 CHAR_PLUS, /* + */
15854 CHAR_QUESTION_MARK, /* ? */
15855 CHAR_RIGHT_CURLY_BRACE, /* } */
15856 CHAR_RIGHT_PARENTHESES, /* ) */
15857 CHAR_RIGHT_SQUARE_BRACKET /* ] */
15858} = __webpack_require__(79);
15859
15860const isPathSeparator = code => {
15861 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
15862};
15863
15864/**
15865 * Quickly scans a glob pattern and returns an object with a handful of
15866 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
15867 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
15868 *
15869 * ```js
15870 * const pm = require('picomatch');
15871 * console.log(pm.scan('foo/bar/*.js'));
15872 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
15873 * ```
15874 * @param {String} `str`
15875 * @param {Object} `options`
15876 * @return {Object} Returns an object with tokens and regex source string.
15877 * @api public
15878 */
15879
15880module.exports = (input, options) => {
15881 let opts = options || {};
15882 let length = input.length - 1;
15883 let index = -1;
15884 let start = 0;
15885 let lastIndex = 0;
15886 let isGlob = false;
15887 let backslashes = false;
15888 let negated = false;
15889 let braces = 0;
15890 let prev;
15891 let code;
15892
15893 let braceEscaped = false;
15894
15895 let eos = () => index >= length;
15896 let advance = () => {
15897 prev = code;
15898 return input.charCodeAt(++index);
15899 };
15900
15901 while (index < length) {
15902 code = advance();
15903 let next;
15904
15905 if (code === CHAR_BACKWARD_SLASH) {
15906 backslashes = true;
15907 next = advance();
15908
15909 if (next === CHAR_LEFT_CURLY_BRACE) {
15910 braceEscaped = true;
15911 }
15912 continue;
15913 }
15914
15915 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
15916 braces++;
15917
15918 while (!eos() && (next = advance())) {
15919 if (next === CHAR_BACKWARD_SLASH) {
15920 backslashes = true;
15921 next = advance();
15922 continue;
15923 }
15924
15925 if (next === CHAR_LEFT_CURLY_BRACE) {
15926 braces++;
15927 continue;
15928 }
15929
15930 if (!braceEscaped && next === CHAR_DOT && (next = advance()) === CHAR_DOT) {
15931 isGlob = true;
15932 break;
15933 }
15934
15935 if (!braceEscaped && next === CHAR_COMMA) {
15936 isGlob = true;
15937 break;
15938 }
15939
15940 if (next === CHAR_RIGHT_CURLY_BRACE) {
15941 braces--;
15942 if (braces === 0) {
15943 braceEscaped = false;
15944 break;
15945 }
15946 }
15947 }
15948 }
15949
15950 if (code === CHAR_FORWARD_SLASH) {
15951 if (prev === CHAR_DOT && index === (start + 1)) {
15952 start += 2;
15953 continue;
15954 }
15955
15956 lastIndex = index + 1;
15957 continue;
15958 }
15959
15960 if (code === CHAR_ASTERISK) {
15961 isGlob = true;
15962 break;
15963 }
15964
15965 if (code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK) {
15966 isGlob = true;
15967 break;
15968 }
15969
15970 if (code === CHAR_LEFT_SQUARE_BRACKET) {
15971 while (!eos() && (next = advance())) {
15972 if (next === CHAR_BACKWARD_SLASH) {
15973 backslashes = true;
15974 next = advance();
15975 continue;
15976 }
15977
15978 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
15979 isGlob = true;
15980 break;
15981 }
15982 }
15983 }
15984
15985 let isExtglobChar = code === CHAR_PLUS
15986 || code === CHAR_AT
15987 || code === CHAR_EXCLAMATION_MARK;
15988
15989 if (isExtglobChar && input.charCodeAt(index + 1) === CHAR_LEFT_PARENTHESES) {
15990 isGlob = true;
15991 break;
15992 }
15993
15994 if (code === CHAR_EXCLAMATION_MARK && index === start) {
15995 negated = true;
15996 start++;
15997 continue;
15998 }
15999
16000 if (code === CHAR_LEFT_PARENTHESES) {
16001 while (!eos() && (next = advance())) {
16002 if (next === CHAR_BACKWARD_SLASH) {
16003 backslashes = true;
16004 next = advance();
16005 continue;
16006 }
16007
16008 if (next === CHAR_RIGHT_PARENTHESES) {
16009 isGlob = true;
16010 break;
16011 }
16012 }
16013 }
16014
16015 if (isGlob) {
16016 break;
16017 }
16018 }
16019
16020 let prefix = '';
16021 let orig = input;
16022 let base = input;
16023 let glob = '';
16024
16025 if (start > 0) {
16026 prefix = input.slice(0, start);
16027 input = input.slice(start);
16028 lastIndex -= start;
16029 }
16030
16031 if (base && isGlob === true && lastIndex > 0) {
16032 base = input.slice(0, lastIndex);
16033 glob = input.slice(lastIndex);
16034 } else if (isGlob === true) {
16035 base = '';
16036 glob = input;
16037 } else {
16038 base = input;
16039 }
16040
16041 if (base && base !== '' && base !== '/' && base !== input) {
16042 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
16043 base = base.slice(0, -1);
16044 }
16045 }
16046
16047 if (opts.unescape === true) {
16048 if (glob) glob = utils.removeBackslashes(glob);
16049
16050 if (base && backslashes === true) {
16051 base = utils.removeBackslashes(base);
16052 }
16053 }
16054
16055 return { prefix, input: orig, base, glob, negated, isGlob };
16056};
16057
16058
16059/***/ }),
16060/* 78 */
16061/***/ (function(module, exports, __webpack_require__) {
16062
16063"use strict";
16064
16065
16066const path = __webpack_require__(15);
16067const win32 = process.platform === 'win32';
16068const {
16069 REGEX_SPECIAL_CHARS,
16070 REGEX_SPECIAL_CHARS_GLOBAL,
16071 REGEX_REMOVE_BACKSLASH
16072} = __webpack_require__(79);
16073
16074exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
16075exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
16076exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
16077exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
16078exports.toPosixSlashes = str => str.replace(/\\/g, '/');
16079
16080exports.removeBackslashes = str => {
16081 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
16082 return match === '\\' ? '' : match;
16083 });
16084}
16085
16086exports.supportsLookbehinds = () => {
16087 let segs = process.version.slice(1).split('.');
16088 if (segs.length === 3 && +segs[0] >= 9 || (+segs[0] === 8 && +segs[1] >= 10)) {
16089 return true;
16090 }
16091 return false;
16092};
16093
16094exports.isWindows = options => {
16095 if (options && typeof options.windows === 'boolean') {
16096 return options.windows;
16097 }
16098 return win32 === true || path.sep === '\\';
16099};
16100
16101exports.escapeLast = (input, char, lastIdx) => {
16102 let idx = input.lastIndexOf(char, lastIdx);
16103 if (idx === -1) return input;
16104 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
16105 return input.slice(0, idx) + '\\' + input.slice(idx);
16106};
16107
16108
16109/***/ }),
16110/* 79 */
16111/***/ (function(module, exports, __webpack_require__) {
16112
16113"use strict";
16114
16115
16116const path = __webpack_require__(15);
16117const WIN_SLASH = '\\\\/';
16118const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
16119
16120/**
16121 * Posix glob regex
16122 */
16123
16124const DOT_LITERAL = '\\.';
16125const PLUS_LITERAL = '\\+';
16126const QMARK_LITERAL = '\\?';
16127const SLASH_LITERAL = '\\/';
16128const ONE_CHAR = '(?=.)';
16129const QMARK = '[^/]';
16130const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
16131const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
16132const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
16133const NO_DOT = `(?!${DOT_LITERAL})`;
16134const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
16135const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
16136const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
16137const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
16138const STAR = `${QMARK}*?`;
16139
16140const POSIX_CHARS = {
16141 DOT_LITERAL,
16142 PLUS_LITERAL,
16143 QMARK_LITERAL,
16144 SLASH_LITERAL,
16145 ONE_CHAR,
16146 QMARK,
16147 END_ANCHOR,
16148 DOTS_SLASH,
16149 NO_DOT,
16150 NO_DOTS,
16151 NO_DOT_SLASH,
16152 NO_DOTS_SLASH,
16153 QMARK_NO_DOT,
16154 STAR,
16155 START_ANCHOR
16156};
16157
16158/**
16159 * Windows glob regex
16160 */
16161
16162const WINDOWS_CHARS = {
16163 ...POSIX_CHARS,
16164
16165 SLASH_LITERAL: `[${WIN_SLASH}]`,
16166 QMARK: WIN_NO_SLASH,
16167 STAR: `${WIN_NO_SLASH}*?`,
16168 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
16169 NO_DOT: `(?!${DOT_LITERAL})`,
16170 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
16171 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
16172 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
16173 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
16174 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
16175 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
16176};
16177
16178/**
16179 * POSIX Bracket Regex
16180 */
16181
16182const POSIX_REGEX_SOURCE = {
16183 alnum: 'a-zA-Z0-9',
16184 alpha: 'a-zA-Z',
16185 ascii: '\\x00-\\x7F',
16186 blank: ' \\t',
16187 cntrl: '\\x00-\\x1F\\x7F',
16188 digit: '0-9',
16189 graph: '\\x21-\\x7E',
16190 lower: 'a-z',
16191 print: '\\x20-\\x7E ',
16192 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
16193 space: ' \\t\\r\\n\\v\\f',
16194 upper: 'A-Z',
16195 word: 'A-Za-z0-9_',
16196 xdigit: 'A-Fa-f0-9'
16197};
16198
16199module.exports = {
16200 MAX_LENGTH: 1024 * 64,
16201 POSIX_REGEX_SOURCE,
16202
16203 // regular expressions
16204 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
16205 REGEX_NON_SPECIAL_CHAR: /^[^@![\].,$*+?^{}()|\\/]+/,
16206 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
16207 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
16208 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
16209 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
16210
16211 // Replace globs with equivalent patterns to reduce parsing time.
16212 REPLACEMENTS: {
16213 '***': '*',
16214 '**/**': '**',
16215 '**/**/**': '**'
16216 },
16217
16218 // Digits
16219 CHAR_0: 48, /* 0 */
16220 CHAR_9: 57, /* 9 */
16221
16222 // Alphabet chars.
16223 CHAR_UPPERCASE_A: 65, /* A */
16224 CHAR_LOWERCASE_A: 97, /* a */
16225 CHAR_UPPERCASE_Z: 90, /* Z */
16226 CHAR_LOWERCASE_Z: 122, /* z */
16227
16228 CHAR_LEFT_PARENTHESES: 40, /* ( */
16229 CHAR_RIGHT_PARENTHESES: 41, /* ) */
16230
16231 CHAR_ASTERISK: 42, /* * */
16232
16233 // Non-alphabetic chars.
16234 CHAR_AMPERSAND: 38, /* & */
16235 CHAR_AT: 64, /* @ */
16236 CHAR_BACKWARD_SLASH: 92, /* \ */
16237 CHAR_CARRIAGE_RETURN: 13, /* \r */
16238 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
16239 CHAR_COLON: 58, /* : */
16240 CHAR_COMMA: 44, /* , */
16241 CHAR_DOT: 46, /* . */
16242 CHAR_DOUBLE_QUOTE: 34, /* " */
16243 CHAR_EQUAL: 61, /* = */
16244 CHAR_EXCLAMATION_MARK: 33, /* ! */
16245 CHAR_FORM_FEED: 12, /* \f */
16246 CHAR_FORWARD_SLASH: 47, /* / */
16247 CHAR_GRAVE_ACCENT: 96, /* ` */
16248 CHAR_HASH: 35, /* # */
16249 CHAR_HYPHEN_MINUS: 45, /* - */
16250 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
16251 CHAR_LEFT_CURLY_BRACE: 123, /* { */
16252 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
16253 CHAR_LINE_FEED: 10, /* \n */
16254 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
16255 CHAR_PERCENT: 37, /* % */
16256 CHAR_PLUS: 43, /* + */
16257 CHAR_QUESTION_MARK: 63, /* ? */
16258 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
16259 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
16260 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
16261 CHAR_SEMICOLON: 59, /* ; */
16262 CHAR_SINGLE_QUOTE: 39, /* ' */
16263 CHAR_SPACE: 32, /* */
16264 CHAR_TAB: 9, /* \t */
16265 CHAR_UNDERSCORE: 95, /* _ */
16266 CHAR_VERTICAL_LINE: 124, /* | */
16267 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
16268
16269 SEP: path.sep,
16270
16271 /**
16272 * Create EXTGLOB_CHARS
16273 */
16274
16275 extglobChars(chars) {
16276 return {
16277 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
16278 '?': { type: 'qmark', open: '(?:', close: ')?' },
16279 '+': { type: 'plus', open: '(?:', close: ')+' },
16280 '*': { type: 'star', open: '(?:', close: ')*' },
16281 '@': { type: 'at', open: '(?:', close: ')' }
16282 };
16283 },
16284
16285 /**
16286 * Create GLOB_CHARS
16287 */
16288
16289 globChars(win32) {
16290 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
16291 }
16292};
16293
16294
16295/***/ }),
16296/* 80 */
16297/***/ (function(module, exports, __webpack_require__) {
16298
16299"use strict";
16300
16301
16302const utils = __webpack_require__(78);
16303const constants = __webpack_require__(79);
16304
16305/**
16306 * Constants
16307 */
16308
16309const {
16310 MAX_LENGTH,
16311 POSIX_REGEX_SOURCE,
16312 REGEX_NON_SPECIAL_CHAR,
16313 REGEX_SPECIAL_CHARS_BACKREF,
16314 REPLACEMENTS
16315} = constants;
16316
16317/**
16318 * Helpers
16319 */
16320
16321const expandRange = (args, options) => {
16322 if (typeof options.expandRange === 'function') {
16323 return options.expandRange(...args, options);
16324 }
16325
16326 args.sort();
16327 let value = `[${args.join('-')}]`;
16328
16329 try {
16330 /* eslint-disable no-new */
16331 new RegExp(value);
16332 } catch (ex) {
16333 return args.map(v => utils.escapeRegex(v)).join('..');
16334 }
16335
16336 return value;
16337};
16338
16339const negate = state => {
16340 let count = 1;
16341
16342 while (state.peek() === '!' && (state.peek(2) !== '(' || state.peek(3) === '?')) {
16343 state.advance();
16344 state.start++;
16345 count++;
16346 }
16347
16348 if (count % 2 === 0) {
16349 return false;
16350 }
16351
16352 state.negated = true;
16353 state.start++;
16354 return true;
16355};
16356
16357/**
16358 * Create the message for a syntax error
16359 */
16360
16361const syntaxError = (type, char) => {
16362 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
16363};
16364
16365/**
16366 * Parse the given input string.
16367 * @param {String} input
16368 * @param {Object} options
16369 * @return {Object}
16370 */
16371
16372const parse = (input, options) => {
16373 if (typeof input !== 'string') {
16374 throw new TypeError('Expected a string');
16375 }
16376
16377 input = REPLACEMENTS[input] || input;
16378
16379 let opts = { ...options };
16380 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
16381 let len = input.length;
16382 if (len > max) {
16383 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
16384 }
16385
16386 let bos = { type: 'bos', value: '', output: opts.prepend || '' };
16387 let tokens = [bos];
16388
16389 let capture = opts.capture ? '' : '?:';
16390 let win32 = utils.isWindows(options);
16391
16392 // create constants based on platform, for windows or posix
16393 const PLATFORM_CHARS = constants.globChars(win32);
16394 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
16395
16396 const {
16397 DOT_LITERAL,
16398 PLUS_LITERAL,
16399 SLASH_LITERAL,
16400 ONE_CHAR,
16401 DOTS_SLASH,
16402 NO_DOT,
16403 NO_DOT_SLASH,
16404 NO_DOTS_SLASH,
16405 QMARK,
16406 QMARK_NO_DOT,
16407 STAR,
16408 START_ANCHOR
16409 } = PLATFORM_CHARS;
16410
16411 const globstar = (opts) => {
16412 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
16413 };
16414
16415 let nodot = opts.dot ? '' : NO_DOT;
16416 let star = opts.bash === true ? globstar(opts) : STAR;
16417 let qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
16418
16419 if (opts.capture) {
16420 star = `(${star})`;
16421 }
16422
16423 // minimatch options support
16424 if (typeof opts.noext === 'boolean') {
16425 opts.noextglob = opts.noext;
16426 }
16427
16428 let state = {
16429 index: -1,
16430 start: 0,
16431 consumed: '',
16432 output: '',
16433 backtrack: false,
16434 brackets: 0,
16435 braces: 0,
16436 parens: 0,
16437 quotes: 0,
16438 tokens
16439 };
16440
16441 let extglobs = [];
16442 let stack = [];
16443 let prev = bos;
16444 let value;
16445
16446 /**
16447 * Tokenizing helpers
16448 */
16449
16450 const eos = () => state.index === len - 1;
16451 const peek = state.peek = (n = 1) => input[state.index + n];
16452 const advance = state.advance = () => input[++state.index];
16453 const append = token => {
16454 state.output += token.output != null ? token.output : token.value;
16455 state.consumed += token.value || '';
16456 };
16457
16458 const increment = type => {
16459 state[type]++;
16460 stack.push(type);
16461 };
16462
16463 const decrement = type => {
16464 state[type]--;
16465 stack.pop();
16466 };
16467
16468 /**
16469 * Push tokens onto the tokens array. This helper speeds up
16470 * tokenizing by 1) helping us avoid backtracking as much as possible,
16471 * and 2) helping us avoid creating extra tokens when consecutive
16472 * characters are plain text. This improves performance and simplifies
16473 * lookbehinds.
16474 */
16475
16476 const push = tok => {
16477 if (prev.type === 'globstar') {
16478 let isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
16479 let isExtglob = extglobs.length && (tok.type === 'pipe' || tok.type === 'paren');
16480 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
16481 state.output = state.output.slice(0, -prev.output.length);
16482 prev.type = 'star';
16483 prev.value = '*';
16484 prev.output = star;
16485 state.output += prev.output;
16486 }
16487 }
16488
16489 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
16490 extglobs[extglobs.length - 1].inner += tok.value;
16491 }
16492
16493 if (tok.value || tok.output) append(tok);
16494 if (prev && prev.type === 'text' && tok.type === 'text') {
16495 prev.value += tok.value;
16496 return;
16497 }
16498
16499 tok.prev = prev;
16500 tokens.push(tok);
16501 prev = tok;
16502 };
16503
16504 const extglobOpen = (type, value) => {
16505 let token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
16506
16507 token.prev = prev;
16508 token.parens = state.parens;
16509 token.output = state.output;
16510 let output = (opts.capture ? '(' : '') + token.open;
16511
16512 push({ type, value, output: state.output ? '' : ONE_CHAR });
16513 push({ type: 'paren', extglob: true, value: advance(), output });
16514 increment('parens');
16515 extglobs.push(token);
16516 };
16517
16518 const extglobClose = token => {
16519 let output = token.close + (opts.capture ? ')' : '');
16520
16521 if (token.type === 'negate') {
16522 let extglobStar = star;
16523
16524 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
16525 extglobStar = globstar(opts);
16526 }
16527
16528 if (extglobStar !== star || eos() || /^\)+$/.test(input.slice(state.index + 1))) {
16529 output = token.close = ')$))' + extglobStar;
16530 }
16531
16532 if (token.prev.type === 'bos' && eos()) {
16533 state.negatedExtglob = true;
16534 }
16535 }
16536
16537 push({ type: 'paren', extglob: true, value, output });
16538 decrement('parens');
16539 };
16540
16541 if (opts.fastpaths !== false && !/(^[*!]|[/{[()\]}"])/.test(input)) {
16542 let backslashes = false;
16543
16544 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
16545 if (first === '\\') {
16546 backslashes = true;
16547 return m;
16548 }
16549
16550 if (first === '?') {
16551 if (esc) {
16552 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
16553 }
16554 if (index === 0) {
16555 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
16556 }
16557 return QMARK.repeat(chars.length);
16558 }
16559
16560 if (first === '.') {
16561 return DOT_LITERAL.repeat(chars.length);
16562 }
16563
16564 if (first === '*') {
16565 if (esc) {
16566 return esc + first + (rest ? star : '');
16567 }
16568 return star;
16569 }
16570 return esc ? m : '\\' + m;
16571 });
16572
16573 if (backslashes === true) {
16574 if (opts.unescape === true) {
16575 output = output.replace(/\\/g, '');
16576 } else {
16577 output = output.replace(/\\+/g, m => {
16578 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
16579 });
16580 }
16581 }
16582
16583 state.output = output;
16584 return state;
16585 }
16586
16587 /**
16588 * Tokenize input until we reach end-of-string
16589 */
16590
16591 while (!eos()) {
16592 value = advance();
16593
16594 if (value === '\u0000') {
16595 continue;
16596 }
16597
16598 /**
16599 * Escaped characters
16600 */
16601
16602 if (value === '\\') {
16603 let next = peek();
16604
16605 if (next === '/' && opts.bash !== true) {
16606 continue;
16607 }
16608
16609 if (next === '.' || next === ';') {
16610 continue;
16611 }
16612
16613 if (!next) {
16614 value += '\\';
16615 push({ type: 'text', value });
16616 continue;
16617 }
16618
16619 // collapse slashes to reduce potential for exploits
16620 let match = /^\\+/.exec(input.slice(state.index + 1));
16621 let slashes = 0;
16622
16623 if (match && match[0].length > 2) {
16624 slashes = match[0].length;
16625 state.index += slashes;
16626 if (slashes % 2 !== 0) {
16627 value += '\\';
16628 }
16629 }
16630
16631 if (opts.unescape === true) {
16632 value = advance() || '';
16633 } else {
16634 value += advance() || '';
16635 }
16636
16637 if (state.brackets === 0) {
16638 push({ type: 'text', value });
16639 continue;
16640 }
16641 }
16642
16643 /**
16644 * If we're inside a regex character class, continue
16645 * until we reach the closing bracket.
16646 */
16647
16648 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
16649 if (opts.posix !== false && value === ':') {
16650 let inner = prev.value.slice(1);
16651 if (inner.includes('[')) {
16652 prev.posix = true;
16653
16654 if (inner.includes(':')) {
16655 let idx = prev.value.lastIndexOf('[');
16656 let pre = prev.value.slice(0, idx);
16657 let rest = prev.value.slice(idx + 2);
16658 let posix = POSIX_REGEX_SOURCE[rest];
16659 if (posix) {
16660 prev.value = pre + posix;
16661 state.backtrack = true;
16662 advance();
16663
16664 if (!bos.output && tokens.indexOf(prev) === 1) {
16665 bos.output = ONE_CHAR;
16666 }
16667 continue;
16668 }
16669 }
16670 }
16671 }
16672
16673 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
16674 value = '\\' + value;
16675 }
16676
16677 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
16678 value = '\\' + value;
16679 }
16680
16681 if (opts.posix === true && value === '!' && prev.value === '[') {
16682 value = '^';
16683 }
16684
16685 prev.value += value;
16686 append({ value });
16687 continue;
16688 }
16689
16690 /**
16691 * If we're inside a quoted string, continue
16692 * until we reach the closing double quote.
16693 */
16694
16695 if (state.quotes === 1 && value !== '"') {
16696 value = utils.escapeRegex(value);
16697 prev.value += value;
16698 append({ value });
16699 continue;
16700 }
16701
16702 /**
16703 * Double quotes
16704 */
16705
16706 if (value === '"') {
16707 state.quotes = state.quotes === 1 ? 0 : 1;
16708 if (opts.keepQuotes === true) {
16709 push({ type: 'text', value });
16710 }
16711 continue;
16712 }
16713
16714 /**
16715 * Parentheses
16716 */
16717
16718 if (value === '(') {
16719 push({ type: 'paren', value });
16720 increment('parens');
16721 continue;
16722 }
16723
16724 if (value === ')') {
16725 if (state.parens === 0 && opts.strictBrackets === true) {
16726 throw new SyntaxError(syntaxError('opening', '('));
16727 }
16728
16729 let extglob = extglobs[extglobs.length - 1];
16730 if (extglob && state.parens === extglob.parens + 1) {
16731 extglobClose(extglobs.pop());
16732 continue;
16733 }
16734
16735 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
16736 decrement('parens');
16737 continue;
16738 }
16739
16740 /**
16741 * Brackets
16742 */
16743
16744 if (value === '[') {
16745 if (opts.nobracket === true || !input.slice(state.index + 1).includes(']')) {
16746 if (opts.nobracket !== true && opts.strictBrackets === true) {
16747 throw new SyntaxError(syntaxError('closing', ']'));
16748 }
16749
16750 value = '\\' + value;
16751 } else {
16752 increment('brackets');
16753 }
16754
16755 push({ type: 'bracket', value });
16756 continue;
16757 }
16758
16759 if (value === ']') {
16760 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
16761 push({ type: 'text', value, output: '\\' + value });
16762 continue;
16763 }
16764
16765 if (state.brackets === 0) {
16766 if (opts.strictBrackets === true) {
16767 throw new SyntaxError(syntaxError('opening', '['));
16768 }
16769
16770 push({ type: 'text', value, output: '\\' + value });
16771 continue;
16772 }
16773
16774 decrement('brackets');
16775
16776 let prevValue = prev.value.slice(1);
16777 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
16778 value = '/' + value;
16779 }
16780
16781 prev.value += value;
16782 append({ value });
16783
16784 // when literal brackets are explicitly disabled
16785 // assume we should match with a regex character class
16786 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
16787 continue;
16788 }
16789
16790 let escaped = utils.escapeRegex(prev.value);
16791 state.output = state.output.slice(0, -prev.value.length);
16792
16793 // when literal brackets are explicitly enabled
16794 // assume we should escape the brackets to match literal characters
16795 if (opts.literalBrackets === true) {
16796 state.output += escaped;
16797 prev.value = escaped;
16798 continue;
16799 }
16800
16801 // when the user specifies nothing, try to match both
16802 prev.value = `(${capture}${escaped}|${prev.value})`;
16803 state.output += prev.value;
16804 continue;
16805 }
16806
16807 /**
16808 * Braces
16809 */
16810
16811 if (value === '{' && opts.nobrace !== true) {
16812 push({ type: 'brace', value, output: '(' });
16813 increment('braces');
16814 continue;
16815 }
16816
16817 if (value === '}') {
16818 if (opts.nobrace === true || state.braces === 0) {
16819 push({ type: 'text', value, output: '\\' + value });
16820 continue;
16821 }
16822
16823 let output = ')';
16824
16825 if (state.dots === true) {
16826 let arr = tokens.slice();
16827 let range = [];
16828
16829 for (let i = arr.length - 1; i >= 0; i--) {
16830 tokens.pop();
16831 if (arr[i].type === 'brace') {
16832 break;
16833 }
16834 if (arr[i].type !== 'dots') {
16835 range.unshift(arr[i].value);
16836 }
16837 }
16838
16839 output = expandRange(range, opts);
16840 state.backtrack = true;
16841 }
16842
16843 push({ type: 'brace', value, output });
16844 decrement('braces');
16845 continue;
16846 }
16847
16848 /**
16849 * Pipes
16850 */
16851
16852 if (value === '|') {
16853 if (extglobs.length > 0) {
16854 extglobs[extglobs.length - 1].conditions++;
16855 }
16856 push({ type: 'text', value });
16857 continue;
16858 }
16859
16860 /**
16861 * Commas
16862 */
16863
16864 if (value === ',') {
16865 let output = value;
16866
16867 if (state.braces > 0 && stack[stack.length - 1] === 'braces') {
16868 output = '|';
16869 }
16870
16871 push({ type: 'comma', value, output });
16872 continue;
16873 }
16874
16875 /**
16876 * Slashes
16877 */
16878
16879 if (value === '/') {
16880 // if the beginning of the glob is "./", advance the start
16881 // to the current index, and don't add the "./" characters
16882 // to the state. This greatly simplifies lookbehinds when
16883 // checking for BOS characters like "!" and "." (not "./")
16884 if (prev.type === 'dot' && state.index === 1) {
16885 state.start = state.index + 1;
16886 state.consumed = '';
16887 state.output = '';
16888 tokens.pop();
16889 prev = bos; // reset "prev" to the first token
16890 continue;
16891 }
16892
16893 push({ type: 'slash', value, output: SLASH_LITERAL });
16894 continue;
16895 }
16896
16897 /**
16898 * Dots
16899 */
16900
16901 if (value === '.') {
16902 if (state.braces > 0 && prev.type === 'dot') {
16903 if (prev.value === '.') prev.output = DOT_LITERAL;
16904 prev.type = 'dots';
16905 prev.output += value;
16906 prev.value += value;
16907 state.dots = true;
16908 continue;
16909 }
16910
16911 push({ type: 'dot', value, output: DOT_LITERAL });
16912 continue;
16913 }
16914
16915 /**
16916 * Question marks
16917 */
16918
16919 if (value === '?') {
16920 if (prev && prev.type === 'paren') {
16921 let next = peek();
16922 let output = value;
16923
16924 if (next === '<' && !utils.supportsLookbehinds()) {
16925 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
16926 }
16927
16928 if (prev.value === '(' && !/[!=<:]/.test(next) || (next === '<' && !/[!=]/.test(peek(2)))) {
16929 output = '\\' + value;
16930 }
16931
16932 push({ type: 'text', value, output });
16933 continue;
16934 }
16935
16936 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
16937 extglobOpen('qmark', value);
16938 continue;
16939 }
16940
16941 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
16942 push({ type: 'qmark', value, output: QMARK_NO_DOT });
16943 continue;
16944 }
16945
16946 push({ type: 'qmark', value, output: QMARK });
16947 continue;
16948 }
16949
16950 /**
16951 * Exclamation
16952 */
16953
16954 if (value === '!') {
16955 if (opts.noextglob !== true && peek() === '(') {
16956 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
16957 extglobOpen('negate', value);
16958 continue;
16959 }
16960 }
16961
16962 if (opts.nonegate !== true && state.index === 0) {
16963 negate(state);
16964 continue;
16965 }
16966 }
16967
16968 /**
16969 * Plus
16970 */
16971
16972 if (value === '+') {
16973 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
16974 extglobOpen('plus', value);
16975 continue;
16976 }
16977
16978 if (prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) {
16979 let output = prev.extglob === true ? '\\' + value : value;
16980 push({ type: 'plus', value, output });
16981 continue;
16982 }
16983
16984 // use regex behavior inside parens
16985 if (state.parens > 0 && opts.regex !== false) {
16986 push({ type: 'plus', value });
16987 continue;
16988 }
16989
16990 push({ type: 'plus', value: PLUS_LITERAL });
16991 continue;
16992 }
16993
16994 /**
16995 * Plain text
16996 */
16997
16998 if (value === '@') {
16999 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17000 push({ type: 'at', value, output: '' });
17001 continue;
17002 }
17003
17004 push({ type: 'text', value });
17005 continue;
17006 }
17007
17008 /**
17009 * Plain text
17010 */
17011
17012 if (value !== '*') {
17013 if (value === '$' || value === '^') {
17014 value = '\\' + value;
17015 }
17016
17017 let match = REGEX_NON_SPECIAL_CHAR.exec(input.slice(state.index + 1));
17018 if (match) {
17019 value += match[0];
17020 state.index += match[0].length;
17021 }
17022
17023 push({ type: 'text', value });
17024 continue;
17025 }
17026
17027 /**
17028 * Stars
17029 */
17030
17031 if (prev && (prev.type === 'globstar' || prev.star === true)) {
17032 prev.type = 'star';
17033 prev.star = true;
17034 prev.value += value;
17035 prev.output = star;
17036 state.backtrack = true;
17037 state.consumed += value;
17038 continue;
17039 }
17040
17041 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17042 extglobOpen('star', value);
17043 continue;
17044 }
17045
17046 if (prev.type === 'star') {
17047 if (opts.noglobstar === true) {
17048 state.consumed += value;
17049 continue;
17050 }
17051
17052 let prior = prev.prev;
17053 let before = prior.prev;
17054 let isStart = prior.type === 'slash' || prior.type === 'bos';
17055 let afterStar = before && (before.type === 'star' || before.type === 'globstar');
17056
17057 if (opts.bash === true && (!isStart || (!eos() && peek() !== '/'))) {
17058 push({ type: 'star', value, output: '' });
17059 continue;
17060 }
17061
17062 let isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
17063 let isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
17064 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
17065 push({ type: 'star', value, output: '' });
17066 continue;
17067 }
17068
17069 // strip consecutive `/**/`
17070 while (input.slice(state.index + 1, state.index + 4) === '/**') {
17071 let after = input[state.index + 4];
17072 if (after && after !== '/') {
17073 break;
17074 }
17075 state.consumed += '/**';
17076 state.index += 3;
17077 }
17078
17079 if (prior.type === 'bos' && eos()) {
17080 prev.type = 'globstar';
17081 prev.value += value;
17082 prev.output = globstar(opts);
17083 state.output = prev.output;
17084 state.consumed += value;
17085 continue;
17086 }
17087
17088 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
17089 state.output = state.output.slice(0, -(prior.output + prev.output).length);
17090 prior.output = '(?:' + prior.output;
17091
17092 prev.type = 'globstar';
17093 prev.output = globstar(opts) + '|$)';
17094 prev.value += value;
17095
17096 state.output += prior.output + prev.output;
17097 state.consumed += value;
17098 continue;
17099 }
17100
17101 let next = peek();
17102 if (prior.type === 'slash' && prior.prev.type !== 'bos' && next === '/') {
17103 let end = peek(2) !== void 0 ? '|$' : '';
17104
17105 state.output = state.output.slice(0, -(prior.output + prev.output).length);
17106 prior.output = '(?:' + prior.output;
17107
17108 prev.type = 'globstar';
17109 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
17110 prev.value += value;
17111
17112 state.output += prior.output + prev.output;
17113 state.consumed += value + advance();
17114
17115 push({ type: 'slash', value, output: '' });
17116 continue;
17117 }
17118
17119 if (prior.type === 'bos' && next === '/') {
17120 prev.type = 'globstar';
17121 prev.value += value;
17122 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
17123 state.output = prev.output;
17124 state.consumed += value + advance();
17125 push({ type: 'slash', value, output: '' });
17126 continue;
17127 }
17128
17129 // remove single star from output
17130 state.output = state.output.slice(0, -prev.output.length);
17131
17132 // reset previous token to globstar
17133 prev.type = 'globstar';
17134 prev.output = globstar(opts);
17135 prev.value += value;
17136
17137 // reset output with globstar
17138 state.output += prev.output;
17139 state.consumed += value;
17140 continue;
17141 }
17142
17143 let token = { type: 'star', value, output: star };
17144
17145 if (opts.bash === true) {
17146 token.output = '.*?';
17147 if (prev.type === 'bos' || prev.type === 'slash') {
17148 token.output = nodot + token.output;
17149 }
17150 push(token);
17151 continue;
17152 }
17153
17154 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
17155 token.output = value;
17156 push(token);
17157 continue;
17158 }
17159
17160 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
17161 if (prev.type === 'dot') {
17162 state.output += NO_DOT_SLASH;
17163 prev.output += NO_DOT_SLASH;
17164
17165 } else if (opts.dot === true) {
17166 state.output += NO_DOTS_SLASH;
17167 prev.output += NO_DOTS_SLASH;
17168
17169 } else {
17170 state.output += nodot;
17171 prev.output += nodot;
17172 }
17173
17174 if (peek() !== '*') {
17175 state.output += ONE_CHAR;
17176 prev.output += ONE_CHAR;
17177 }
17178 }
17179
17180 push(token);
17181 }
17182
17183 while (state.brackets > 0) {
17184 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
17185 state.output = utils.escapeLast(state.output, '[');
17186 decrement('brackets');
17187 }
17188
17189 while (state.parens > 0) {
17190 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
17191 state.output = utils.escapeLast(state.output, '(');
17192 decrement('parens');
17193 }
17194
17195 while (state.braces > 0) {
17196 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
17197 state.output = utils.escapeLast(state.output, '{');
17198 decrement('braces');
17199 }
17200
17201 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
17202 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
17203 }
17204
17205 // rebuild the output if we had to backtrack at any point
17206 if (state.backtrack === true) {
17207 state.output = '';
17208
17209 for (let token of state.tokens) {
17210 state.output += token.output != null ? token.output : token.value;
17211
17212 if (token.suffix) {
17213 state.output += token.suffix;
17214 }
17215 }
17216 }
17217
17218 return state;
17219};
17220
17221/**
17222 * Fast paths for creating regular expressions for common glob patterns.
17223 * This can significantly speed up processing and has very little downside
17224 * impact when none of the fast paths match.
17225 */
17226
17227parse.fastpaths = (input, options) => {
17228 let opts = { ...options };
17229 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
17230 let len = input.length;
17231 if (len > max) {
17232 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
17233 }
17234
17235 input = REPLACEMENTS[input] || input;
17236 let win32 = utils.isWindows(options);
17237
17238 // create constants based on platform, for windows or posix
17239 const {
17240 DOT_LITERAL,
17241 SLASH_LITERAL,
17242 ONE_CHAR,
17243 DOTS_SLASH,
17244 NO_DOT,
17245 NO_DOTS,
17246 NO_DOTS_SLASH,
17247 STAR,
17248 START_ANCHOR
17249 } = constants.globChars(win32);
17250
17251 let capture = opts.capture ? '' : '?:';
17252 let star = opts.bash === true ? '.*?' : STAR;
17253 let nodot = opts.dot ? NO_DOTS : NO_DOT;
17254 let slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
17255
17256 if (opts.capture) {
17257 star = `(${star})`;
17258 }
17259
17260 const globstar = (opts) => {
17261 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
17262 };
17263
17264 const create = str => {
17265 switch (str) {
17266 case '*':
17267 return `${nodot}${ONE_CHAR}${star}`;
17268
17269 case '.*':
17270 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
17271
17272 case '*.*':
17273 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
17274
17275 case '*/*':
17276 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
17277
17278 case '**':
17279 return nodot + globstar(opts);
17280
17281 case '**/*':
17282 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
17283
17284 case '**/*.*':
17285 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
17286
17287 case '**/.*':
17288 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
17289
17290 default: {
17291 let match = /^(.*?)\.(\w+)$/.exec(str);
17292 if (!match) return;
17293
17294 let source = create(match[1], options);
17295 if (!source) return;
17296
17297 return source + DOT_LITERAL + match[2];
17298 }
17299 }
17300 };
17301
17302 let output = create(input);
17303 if (output && opts.strictSlashes !== true) {
17304 output += `${SLASH_LITERAL}?`;
17305 }
17306
17307 return output;
17308};
17309
17310module.exports = parse;
17311
17312
17313/***/ }),
17314/* 81 */
17315/***/ (function(module, exports, __webpack_require__) {
17316
17317"use strict";
17318
17319Object.defineProperty(exports, "__esModule", { value: true });
17320const merge2 = __webpack_require__(82);
17321function merge(streams) {
17322 const mergedStream = merge2(streams);
17323 streams.forEach((stream) => {
17324 stream.once('error', (err) => mergedStream.emit('error', err));
17325 });
17326 return mergedStream;
17327}
17328exports.merge = merge;
17329
17330
17331/***/ }),
17332/* 82 */
17333/***/ (function(module, exports, __webpack_require__) {
17334
17335"use strict";
17336
17337/*
17338 * merge2
17339 * https://github.com/teambition/merge2
17340 *
17341 * Copyright (c) 2014-2016 Teambition
17342 * Licensed under the MIT license.
17343 */
17344const Stream = __webpack_require__(83)
17345const PassThrough = Stream.PassThrough
17346const slice = Array.prototype.slice
17347
17348module.exports = merge2
17349
17350function merge2 () {
17351 const streamsQueue = []
17352 let merging = false
17353 const args = slice.call(arguments)
17354 let options = args[args.length - 1]
17355
17356 if (options && !Array.isArray(options) && options.pipe == null) args.pop()
17357 else options = {}
17358
17359 const doEnd = options.end !== false
17360 if (options.objectMode == null) options.objectMode = true
17361 if (options.highWaterMark == null) options.highWaterMark = 64 * 1024
17362 const mergedStream = PassThrough(options)
17363
17364 function addStream () {
17365 for (let i = 0, len = arguments.length; i < len; i++) {
17366 streamsQueue.push(pauseStreams(arguments[i], options))
17367 }
17368 mergeStream()
17369 return this
17370 }
17371
17372 function mergeStream () {
17373 if (merging) return
17374 merging = true
17375
17376 let streams = streamsQueue.shift()
17377 if (!streams) {
17378 process.nextTick(endStream)
17379 return
17380 }
17381 if (!Array.isArray(streams)) streams = [streams]
17382
17383 let pipesCount = streams.length + 1
17384
17385 function next () {
17386 if (--pipesCount > 0) return
17387 merging = false
17388 mergeStream()
17389 }
17390
17391 function pipe (stream) {
17392 function onend () {
17393 stream.removeListener('merge2UnpipeEnd', onend)
17394 stream.removeListener('end', onend)
17395 next()
17396 }
17397 // skip ended stream
17398 if (stream._readableState.endEmitted) return next()
17399
17400 stream.on('merge2UnpipeEnd', onend)
17401 stream.on('end', onend)
17402 stream.pipe(mergedStream, { end: false })
17403 // compatible for old stream
17404 stream.resume()
17405 }
17406
17407 for (let i = 0; i < streams.length; i++) pipe(streams[i])
17408
17409 next()
17410 }
17411
17412 function endStream () {
17413 merging = false
17414 // emit 'queueDrain' when all streams merged.
17415 mergedStream.emit('queueDrain')
17416 return doEnd && mergedStream.end()
17417 }
17418
17419 mergedStream.setMaxListeners(0)
17420 mergedStream.add = addStream
17421 mergedStream.on('unpipe', function (stream) {
17422 stream.emit('merge2UnpipeEnd')
17423 })
17424
17425 if (args.length) addStream.apply(null, args)
17426 return mergedStream
17427}
17428
17429// check and pause streams for pipe.
17430function pauseStreams (streams, options) {
17431 if (!Array.isArray(streams)) {
17432 // Backwards-compat with old-style streams
17433 if (!streams._readableState && streams.pipe) streams = streams.pipe(PassThrough(options))
17434 if (!streams._readableState || !streams.pause || !streams.pipe) {
17435 throw new Error('Only readable stream can be merged.')
17436 }
17437 streams.pause()
17438 } else {
17439 for (let i = 0, len = streams.length; i < len; i++) streams[i] = pauseStreams(streams[i], options)
17440 }
17441 return streams
17442}
17443
17444
17445/***/ }),
17446/* 83 */
17447/***/ (function(module, exports) {
17448
17449module.exports = require("stream");
17450
17451/***/ }),
17452/* 84 */
17453/***/ (function(module, exports, __webpack_require__) {
17454
17455"use strict";
17456
17457Object.defineProperty(exports, "__esModule", { value: true });
17458const stream_1 = __webpack_require__(85);
17459const provider_1 = __webpack_require__(112);
17460class ProviderAsync extends provider_1.default {
17461 constructor() {
17462 super(...arguments);
17463 this._reader = new stream_1.default(this._settings);
17464 }
17465 read(task) {
17466 const root = this._getRootDirectory(task);
17467 const options = this._getReaderOptions(task);
17468 const entries = [];
17469 return new Promise((resolve, reject) => {
17470 const stream = this.api(root, task, options);
17471 stream.once('error', reject);
17472 stream.on('data', (entry) => entries.push(options.transform(entry)));
17473 stream.once('end', () => resolve(entries));
17474 });
17475 }
17476 api(root, task, options) {
17477 if (task.dynamic) {
17478 return this._reader.dynamic(root, options);
17479 }
17480 return this._reader.static(task.patterns, options);
17481 }
17482}
17483exports.default = ProviderAsync;
17484
17485
17486/***/ }),
17487/* 85 */
17488/***/ (function(module, exports, __webpack_require__) {
17489
17490"use strict";
17491
17492Object.defineProperty(exports, "__esModule", { value: true });
17493const stream_1 = __webpack_require__(83);
17494const fsStat = __webpack_require__(86);
17495const fsWalk = __webpack_require__(91);
17496const reader_1 = __webpack_require__(111);
17497class ReaderStream extends reader_1.default {
17498 constructor() {
17499 super(...arguments);
17500 this._walkStream = fsWalk.walkStream;
17501 this._stat = fsStat.stat;
17502 }
17503 dynamic(root, options) {
17504 return this._walkStream(root, options);
17505 }
17506 static(patterns, options) {
17507 const filepaths = patterns.map(this._getFullEntryPath, this);
17508 const stream = new stream_1.PassThrough({ objectMode: true });
17509 stream._write = (index, _enc, done) => {
17510 return this._getEntry(filepaths[index], patterns[index], options)
17511 .then((entry) => {
17512 if (entry !== null && options.entryFilter(entry)) {
17513 stream.push(entry);
17514 }
17515 if (index === filepaths.length - 1) {
17516 stream.end();
17517 }
17518 done();
17519 })
17520 .catch(done);
17521 };
17522 for (let i = 0; i < filepaths.length; i++) {
17523 stream.write(i);
17524 }
17525 return stream;
17526 }
17527 _getEntry(filepath, pattern, options) {
17528 return this._getStat(filepath)
17529 .then((stats) => this._makeEntry(stats, pattern))
17530 .catch((error) => {
17531 if (options.errorFilter(error)) {
17532 return null;
17533 }
17534 throw error;
17535 });
17536 }
17537 _getStat(filepath) {
17538 return new Promise((resolve, reject) => {
17539 this._stat(filepath, this._fsStatSettings, (error, stats) => {
17540 error ? reject(error) : resolve(stats);
17541 });
17542 });
17543 }
17544}
17545exports.default = ReaderStream;
17546
17547
17548/***/ }),
17549/* 86 */
17550/***/ (function(module, exports, __webpack_require__) {
17551
17552"use strict";
17553
17554Object.defineProperty(exports, "__esModule", { value: true });
17555const async = __webpack_require__(87);
17556const sync = __webpack_require__(88);
17557const settings_1 = __webpack_require__(89);
17558exports.Settings = settings_1.default;
17559function stat(path, optionsOrSettingsOrCallback, callback) {
17560 if (typeof optionsOrSettingsOrCallback === 'function') {
17561 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
17562 }
17563 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
17564}
17565exports.stat = stat;
17566function statSync(path, optionsOrSettings) {
17567 const settings = getSettings(optionsOrSettings);
17568 return sync.read(path, settings);
17569}
17570exports.statSync = statSync;
17571function getSettings(settingsOrOptions = {}) {
17572 if (settingsOrOptions instanceof settings_1.default) {
17573 return settingsOrOptions;
17574 }
17575 return new settings_1.default(settingsOrOptions);
17576}
17577
17578
17579/***/ }),
17580/* 87 */
17581/***/ (function(module, exports, __webpack_require__) {
17582
17583"use strict";
17584
17585Object.defineProperty(exports, "__esModule", { value: true });
17586function read(path, settings, callback) {
17587 settings.fs.lstat(path, (lstatError, lstat) => {
17588 if (lstatError) {
17589 return callFailureCallback(callback, lstatError);
17590 }
17591 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
17592 return callSuccessCallback(callback, lstat);
17593 }
17594 settings.fs.stat(path, (statError, stat) => {
17595 if (statError) {
17596 if (settings.throwErrorOnBrokenSymbolicLink) {
17597 return callFailureCallback(callback, statError);
17598 }
17599 return callSuccessCallback(callback, lstat);
17600 }
17601 if (settings.markSymbolicLink) {
17602 stat.isSymbolicLink = () => true;
17603 }
17604 callSuccessCallback(callback, stat);
17605 });
17606 });
17607}
17608exports.read = read;
17609function callFailureCallback(callback, error) {
17610 callback(error);
17611}
17612function callSuccessCallback(callback, result) {
17613 callback(null, result);
17614}
17615
17616
17617/***/ }),
17618/* 88 */
17619/***/ (function(module, exports, __webpack_require__) {
17620
17621"use strict";
17622
17623Object.defineProperty(exports, "__esModule", { value: true });
17624function read(path, settings) {
17625 const lstat = settings.fs.lstatSync(path);
17626 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
17627 return lstat;
17628 }
17629 try {
17630 const stat = settings.fs.statSync(path);
17631 if (settings.markSymbolicLink) {
17632 stat.isSymbolicLink = () => true;
17633 }
17634 return stat;
17635 }
17636 catch (error) {
17637 if (!settings.throwErrorOnBrokenSymbolicLink) {
17638 return lstat;
17639 }
17640 throw error;
17641 }
17642}
17643exports.read = read;
17644
17645
17646/***/ }),
17647/* 89 */
17648/***/ (function(module, exports, __webpack_require__) {
17649
17650"use strict";
17651
17652Object.defineProperty(exports, "__esModule", { value: true });
17653const fs = __webpack_require__(90);
17654class Settings {
17655 constructor(_options = {}) {
17656 this._options = _options;
17657 this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
17658 this.fs = fs.createFileSystemAdapter(this._options.fs);
17659 this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
17660 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
17661 }
17662 _getValue(option, value) {
17663 return option === undefined ? value : option;
17664 }
17665}
17666exports.default = Settings;
17667
17668
17669/***/ }),
17670/* 90 */
17671/***/ (function(module, exports, __webpack_require__) {
17672
17673"use strict";
17674
17675Object.defineProperty(exports, "__esModule", { value: true });
17676const fs = __webpack_require__(36);
17677exports.FILE_SYSTEM_ADAPTER = {
17678 lstat: fs.lstat,
17679 stat: fs.stat,
17680 lstatSync: fs.lstatSync,
17681 statSync: fs.statSync
17682};
17683function createFileSystemAdapter(fsMethods) {
17684 if (!fsMethods) {
17685 return exports.FILE_SYSTEM_ADAPTER;
17686 }
17687 return Object.assign({}, exports.FILE_SYSTEM_ADAPTER, fsMethods);
17688}
17689exports.createFileSystemAdapter = createFileSystemAdapter;
17690
17691
17692/***/ }),
17693/* 91 */
17694/***/ (function(module, exports, __webpack_require__) {
17695
17696"use strict";
17697
17698Object.defineProperty(exports, "__esModule", { value: true });
17699const async_1 = __webpack_require__(92);
17700const stream_1 = __webpack_require__(107);
17701const sync_1 = __webpack_require__(108);
17702const settings_1 = __webpack_require__(110);
17703exports.Settings = settings_1.default;
17704function walk(dir, optionsOrSettingsOrCallback, callback) {
17705 if (typeof optionsOrSettingsOrCallback === 'function') {
17706 return new async_1.default(dir, getSettings()).read(optionsOrSettingsOrCallback);
17707 }
17708 new async_1.default(dir, getSettings(optionsOrSettingsOrCallback)).read(callback);
17709}
17710exports.walk = walk;
17711function walkSync(dir, optionsOrSettings) {
17712 const settings = getSettings(optionsOrSettings);
17713 const provider = new sync_1.default(dir, settings);
17714 return provider.read();
17715}
17716exports.walkSync = walkSync;
17717function walkStream(dir, optionsOrSettings) {
17718 const settings = getSettings(optionsOrSettings);
17719 const provider = new stream_1.default(dir, settings);
17720 return provider.read();
17721}
17722exports.walkStream = walkStream;
17723function getSettings(settingsOrOptions = {}) {
17724 if (settingsOrOptions instanceof settings_1.default) {
17725 return settingsOrOptions;
17726 }
17727 return new settings_1.default(settingsOrOptions);
17728}
17729
17730
17731/***/ }),
17732/* 92 */
17733/***/ (function(module, exports, __webpack_require__) {
17734
17735"use strict";
17736
17737Object.defineProperty(exports, "__esModule", { value: true });
17738const async_1 = __webpack_require__(93);
17739class AsyncProvider {
17740 constructor(_root, _settings) {
17741 this._root = _root;
17742 this._settings = _settings;
17743 this._reader = new async_1.default(this._root, this._settings);
17744 this._storage = new Set();
17745 }
17746 read(callback) {
17747 this._reader.onError((error) => {
17748 callFailureCallback(callback, error);
17749 });
17750 this._reader.onEntry((entry) => {
17751 this._storage.add(entry);
17752 });
17753 this._reader.onEnd(() => {
17754 callSuccessCallback(callback, Array.from(this._storage));
17755 });
17756 this._reader.read();
17757 }
17758}
17759exports.default = AsyncProvider;
17760function callFailureCallback(callback, error) {
17761 callback(error);
17762}
17763function callSuccessCallback(callback, entries) {
17764 callback(null, entries);
17765}
17766
17767
17768/***/ }),
17769/* 93 */
17770/***/ (function(module, exports, __webpack_require__) {
17771
17772"use strict";
17773
17774Object.defineProperty(exports, "__esModule", { value: true });
17775const events_1 = __webpack_require__(45);
17776const fsScandir = __webpack_require__(94);
17777const fastq = __webpack_require__(103);
17778const common = __webpack_require__(105);
17779const reader_1 = __webpack_require__(106);
17780class AsyncReader extends reader_1.default {
17781 constructor(_root, _settings) {
17782 super(_root, _settings);
17783 this._settings = _settings;
17784 this._scandir = fsScandir.scandir;
17785 this._emitter = new events_1.EventEmitter();
17786 this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
17787 this._isFatalError = false;
17788 this._isDestroyed = false;
17789 this._queue.drain = () => {
17790 if (!this._isFatalError) {
17791 this._emitter.emit('end');
17792 }
17793 };
17794 }
17795 read() {
17796 this._isFatalError = false;
17797 this._isDestroyed = false;
17798 setImmediate(() => {
17799 this._pushToQueue(this._root, this._settings.basePath);
17800 });
17801 return this._emitter;
17802 }
17803 destroy() {
17804 if (this._isDestroyed) {
17805 throw new Error('The reader is already destroyed');
17806 }
17807 this._isDestroyed = true;
17808 this._queue.killAndDrain();
17809 }
17810 onEntry(callback) {
17811 this._emitter.on('entry', callback);
17812 }
17813 onError(callback) {
17814 this._emitter.once('error', callback);
17815 }
17816 onEnd(callback) {
17817 this._emitter.once('end', callback);
17818 }
17819 _pushToQueue(dir, base) {
17820 const queueItem = { dir, base };
17821 this._queue.push(queueItem, (error) => {
17822 if (error) {
17823 this._handleError(error);
17824 }
17825 });
17826 }
17827 _worker(item, done) {
17828 this._scandir(item.dir, this._settings.fsScandirSettings, (error, entries) => {
17829 if (error) {
17830 return done(error, undefined);
17831 }
17832 for (const entry of entries) {
17833 this._handleEntry(entry, item.base);
17834 }
17835 done(null, undefined);
17836 });
17837 }
17838 _handleError(error) {
17839 if (!common.isFatalError(this._settings, error)) {
17840 return;
17841 }
17842 this._isFatalError = true;
17843 this._isDestroyed = true;
17844 this._emitter.emit('error', error);
17845 }
17846 _handleEntry(entry, base) {
17847 if (this._isDestroyed || this._isFatalError) {
17848 return;
17849 }
17850 const fullpath = entry.path;
17851 if (base !== undefined) {
17852 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
17853 }
17854 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
17855 this._emitEntry(entry);
17856 }
17857 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
17858 this._pushToQueue(fullpath, entry.path);
17859 }
17860 }
17861 _emitEntry(entry) {
17862 this._emitter.emit('entry', entry);
17863 }
17864}
17865exports.default = AsyncReader;
17866
17867
17868/***/ }),
17869/* 94 */
17870/***/ (function(module, exports, __webpack_require__) {
17871
17872"use strict";
17873
17874Object.defineProperty(exports, "__esModule", { value: true });
17875const async = __webpack_require__(95);
17876const sync = __webpack_require__(100);
17877const settings_1 = __webpack_require__(101);
17878exports.Settings = settings_1.default;
17879function scandir(path, optionsOrSettingsOrCallback, callback) {
17880 if (typeof optionsOrSettingsOrCallback === 'function') {
17881 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
17882 }
17883 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
17884}
17885exports.scandir = scandir;
17886function scandirSync(path, optionsOrSettings) {
17887 const settings = getSettings(optionsOrSettings);
17888 return sync.read(path, settings);
17889}
17890exports.scandirSync = scandirSync;
17891function getSettings(settingsOrOptions = {}) {
17892 if (settingsOrOptions instanceof settings_1.default) {
17893 return settingsOrOptions;
17894 }
17895 return new settings_1.default(settingsOrOptions);
17896}
17897
17898
17899/***/ }),
17900/* 95 */
17901/***/ (function(module, exports, __webpack_require__) {
17902
17903"use strict";
17904
17905Object.defineProperty(exports, "__esModule", { value: true });
17906const fsStat = __webpack_require__(86);
17907const rpl = __webpack_require__(96);
17908const constants_1 = __webpack_require__(97);
17909const utils = __webpack_require__(98);
17910function read(dir, settings, callback) {
17911 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
17912 return readdirWithFileTypes(dir, settings, callback);
17913 }
17914 return readdir(dir, settings, callback);
17915}
17916exports.read = read;
17917function readdirWithFileTypes(dir, settings, callback) {
17918 settings.fs.readdir(dir, { withFileTypes: true }, (readdirError, dirents) => {
17919 if (readdirError) {
17920 return callFailureCallback(callback, readdirError);
17921 }
17922 const entries = dirents.map((dirent) => ({
17923 dirent,
17924 name: dirent.name,
17925 path: `${dir}${settings.pathSegmentSeparator}${dirent.name}`
17926 }));
17927 if (!settings.followSymbolicLinks) {
17928 return callSuccessCallback(callback, entries);
17929 }
17930 const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
17931 rpl(tasks, (rplError, rplEntries) => {
17932 if (rplError) {
17933 return callFailureCallback(callback, rplError);
17934 }
17935 callSuccessCallback(callback, rplEntries);
17936 });
17937 });
17938}
17939exports.readdirWithFileTypes = readdirWithFileTypes;
17940function makeRplTaskEntry(entry, settings) {
17941 return (done) => {
17942 if (!entry.dirent.isSymbolicLink()) {
17943 return done(null, entry);
17944 }
17945 settings.fs.stat(entry.path, (statError, stats) => {
17946 if (statError) {
17947 if (settings.throwErrorOnBrokenSymbolicLink) {
17948 return done(statError);
17949 }
17950 return done(null, entry);
17951 }
17952 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
17953 return done(null, entry);
17954 });
17955 };
17956}
17957function readdir(dir, settings, callback) {
17958 settings.fs.readdir(dir, (readdirError, names) => {
17959 if (readdirError) {
17960 return callFailureCallback(callback, readdirError);
17961 }
17962 const filepaths = names.map((name) => `${dir}${settings.pathSegmentSeparator}${name}`);
17963 const tasks = filepaths.map((filepath) => {
17964 return (done) => fsStat.stat(filepath, settings.fsStatSettings, done);
17965 });
17966 rpl(tasks, (rplError, results) => {
17967 if (rplError) {
17968 return callFailureCallback(callback, rplError);
17969 }
17970 const entries = [];
17971 for (let index = 0; index < names.length; index++) {
17972 const name = names[index];
17973 const stats = results[index];
17974 const entry = {
17975 name,
17976 path: filepaths[index],
17977 dirent: utils.fs.createDirentFromStats(name, stats)
17978 };
17979 if (settings.stats) {
17980 entry.stats = stats;
17981 }
17982 entries.push(entry);
17983 }
17984 callSuccessCallback(callback, entries);
17985 });
17986 });
17987}
17988exports.readdir = readdir;
17989function callFailureCallback(callback, error) {
17990 callback(error);
17991}
17992function callSuccessCallback(callback, result) {
17993 callback(null, result);
17994}
17995
17996
17997/***/ }),
17998/* 96 */
17999/***/ (function(module, exports) {
18000
18001module.exports = runParallel
18002
18003function runParallel (tasks, cb) {
18004 var results, pending, keys
18005 var isSync = true
18006
18007 if (Array.isArray(tasks)) {
18008 results = []
18009 pending = tasks.length
18010 } else {
18011 keys = Object.keys(tasks)
18012 results = {}
18013 pending = keys.length
18014 }
18015
18016 function done (err) {
18017 function end () {
18018 if (cb) cb(err, results)
18019 cb = null
18020 }
18021 if (isSync) process.nextTick(end)
18022 else end()
18023 }
18024
18025 function each (i, err, result) {
18026 results[i] = result
18027 if (--pending === 0 || err) {
18028 done(err)
18029 }
18030 }
18031
18032 if (!pending) {
18033 // empty
18034 done(null)
18035 } else if (keys) {
18036 // object
18037 keys.forEach(function (key) {
18038 tasks[key](function (err, result) { each(key, err, result) })
18039 })
18040 } else {
18041 // array
18042 tasks.forEach(function (task, i) {
18043 task(function (err, result) { each(i, err, result) })
18044 })
18045 }
18046
18047 isSync = false
18048}
18049
18050
18051/***/ }),
18052/* 97 */
18053/***/ (function(module, exports, __webpack_require__) {
18054
18055"use strict";
18056
18057Object.defineProperty(exports, "__esModule", { value: true });
18058const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
18059const MAJOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
18060const MINOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
18061/**
18062 * IS `true` for Node.js 10.10 and greater.
18063 */
18064exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = MAJOR_VERSION > 10 || (MAJOR_VERSION === 10 && MINOR_VERSION >= 10);
18065
18066
18067/***/ }),
18068/* 98 */
18069/***/ (function(module, exports, __webpack_require__) {
18070
18071"use strict";
18072
18073Object.defineProperty(exports, "__esModule", { value: true });
18074const fs = __webpack_require__(99);
18075exports.fs = fs;
18076
18077
18078/***/ }),
18079/* 99 */
18080/***/ (function(module, exports, __webpack_require__) {
18081
18082"use strict";
18083
18084Object.defineProperty(exports, "__esModule", { value: true });
18085class DirentFromStats {
18086 constructor(name, stats) {
18087 this.name = name;
18088 this.isBlockDevice = stats.isBlockDevice.bind(stats);
18089 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
18090 this.isDirectory = stats.isDirectory.bind(stats);
18091 this.isFIFO = stats.isFIFO.bind(stats);
18092 this.isFile = stats.isFile.bind(stats);
18093 this.isSocket = stats.isSocket.bind(stats);
18094 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
18095 }
18096}
18097function createDirentFromStats(name, stats) {
18098 return new DirentFromStats(name, stats);
18099}
18100exports.createDirentFromStats = createDirentFromStats;
18101
18102
18103/***/ }),
18104/* 100 */
18105/***/ (function(module, exports, __webpack_require__) {
18106
18107"use strict";
18108
18109Object.defineProperty(exports, "__esModule", { value: true });
18110const fsStat = __webpack_require__(86);
18111const constants_1 = __webpack_require__(97);
18112const utils = __webpack_require__(98);
18113function read(dir, settings) {
18114 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
18115 return readdirWithFileTypes(dir, settings);
18116 }
18117 return readdir(dir, settings);
18118}
18119exports.read = read;
18120function readdirWithFileTypes(dir, settings) {
18121 const dirents = settings.fs.readdirSync(dir, { withFileTypes: true });
18122 return dirents.map((dirent) => {
18123 const entry = {
18124 dirent,
18125 name: dirent.name,
18126 path: `${dir}${settings.pathSegmentSeparator}${dirent.name}`
18127 };
18128 if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
18129 try {
18130 const stats = settings.fs.statSync(entry.path);
18131 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
18132 }
18133 catch (error) {
18134 if (settings.throwErrorOnBrokenSymbolicLink) {
18135 throw error;
18136 }
18137 }
18138 }
18139 return entry;
18140 });
18141}
18142exports.readdirWithFileTypes = readdirWithFileTypes;
18143function readdir(dir, settings) {
18144 const names = settings.fs.readdirSync(dir);
18145 return names.map((name) => {
18146 const entryPath = `${dir}${settings.pathSegmentSeparator}${name}`;
18147 const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
18148 const entry = {
18149 name,
18150 path: entryPath,
18151 dirent: utils.fs.createDirentFromStats(name, stats)
18152 };
18153 if (settings.stats) {
18154 entry.stats = stats;
18155 }
18156 return entry;
18157 });
18158}
18159exports.readdir = readdir;
18160
18161
18162/***/ }),
18163/* 101 */
18164/***/ (function(module, exports, __webpack_require__) {
18165
18166"use strict";
18167
18168Object.defineProperty(exports, "__esModule", { value: true });
18169const path = __webpack_require__(15);
18170const fsStat = __webpack_require__(86);
18171const fs = __webpack_require__(102);
18172class Settings {
18173 constructor(_options = {}) {
18174 this._options = _options;
18175 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
18176 this.fs = fs.createFileSystemAdapter(this._options.fs);
18177 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
18178 this.stats = this._getValue(this._options.stats, false);
18179 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
18180 this.fsStatSettings = new fsStat.Settings({
18181 followSymbolicLink: this.followSymbolicLinks,
18182 fs: this.fs,
18183 throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
18184 });
18185 }
18186 _getValue(option, value) {
18187 return option === undefined ? value : option;
18188 }
18189}
18190exports.default = Settings;
18191
18192
18193/***/ }),
18194/* 102 */
18195/***/ (function(module, exports, __webpack_require__) {
18196
18197"use strict";
18198
18199Object.defineProperty(exports, "__esModule", { value: true });
18200const fs = __webpack_require__(36);
18201exports.FILE_SYSTEM_ADAPTER = {
18202 lstat: fs.lstat,
18203 stat: fs.stat,
18204 lstatSync: fs.lstatSync,
18205 statSync: fs.statSync,
18206 readdir: fs.readdir,
18207 readdirSync: fs.readdirSync
18208};
18209function createFileSystemAdapter(fsMethods) {
18210 if (!fsMethods) {
18211 return exports.FILE_SYSTEM_ADAPTER;
18212 }
18213 return Object.assign({}, exports.FILE_SYSTEM_ADAPTER, fsMethods);
18214}
18215exports.createFileSystemAdapter = createFileSystemAdapter;
18216
18217
18218/***/ }),
18219/* 103 */
18220/***/ (function(module, exports, __webpack_require__) {
18221
18222"use strict";
18223
18224
18225var reusify = __webpack_require__(104)
18226
18227function fastqueue (context, worker, concurrency) {
18228 if (typeof context === 'function') {
18229 concurrency = worker
18230 worker = context
18231 context = null
18232 }
18233
18234 var cache = reusify(Task)
18235 var queueHead = null
18236 var queueTail = null
18237 var _running = 0
18238
18239 var self = {
18240 push: push,
18241 drain: noop,
18242 saturated: noop,
18243 pause: pause,
18244 paused: false,
18245 concurrency: concurrency,
18246 running: running,
18247 resume: resume,
18248 idle: idle,
18249 length: length,
18250 unshift: unshift,
18251 empty: noop,
18252 kill: kill,
18253 killAndDrain: killAndDrain
18254 }
18255
18256 return self
18257
18258 function running () {
18259 return _running
18260 }
18261
18262 function pause () {
18263 self.paused = true
18264 }
18265
18266 function length () {
18267 var current = queueHead
18268 var counter = 0
18269
18270 while (current) {
18271 current = current.next
18272 counter++
18273 }
18274
18275 return counter
18276 }
18277
18278 function resume () {
18279 if (!self.paused) return
18280 self.paused = false
18281 for (var i = 0; i < self.concurrency; i++) {
18282 _running++
18283 release()
18284 }
18285 }
18286
18287 function idle () {
18288 return _running === 0 && self.length() === 0
18289 }
18290
18291 function push (value, done) {
18292 var current = cache.get()
18293
18294 current.context = context
18295 current.release = release
18296 current.value = value
18297 current.callback = done || noop
18298
18299 if (_running === self.concurrency || self.paused) {
18300 if (queueTail) {
18301 queueTail.next = current
18302 queueTail = current
18303 } else {
18304 queueHead = current
18305 queueTail = current
18306 self.saturated()
18307 }
18308 } else {
18309 _running++
18310 worker.call(context, current.value, current.worked)
18311 }
18312 }
18313
18314 function unshift (value, done) {
18315 var current = cache.get()
18316
18317 current.context = context
18318 current.release = release
18319 current.value = value
18320 current.callback = done || noop
18321
18322 if (_running === self.concurrency || self.paused) {
18323 if (queueHead) {
18324 current.next = queueHead
18325 queueHead = current
18326 } else {
18327 queueHead = current
18328 queueTail = current
18329 self.saturated()
18330 }
18331 } else {
18332 _running++
18333 worker.call(context, current.value, current.worked)
18334 }
18335 }
18336
18337 function release (holder) {
18338 if (holder) {
18339 cache.release(holder)
18340 }
18341 var next = queueHead
18342 if (next) {
18343 if (!self.paused) {
18344 if (queueTail === queueHead) {
18345 queueTail = null
18346 }
18347 queueHead = next.next
18348 next.next = null
18349 worker.call(context, next.value, next.worked)
18350 if (queueTail === null) {
18351 self.empty()
18352 }
18353 } else {
18354 _running--
18355 }
18356 } else if (--_running === 0) {
18357 self.drain()
18358 }
18359 }
18360
18361 function kill () {
18362 queueHead = null
18363 queueTail = null
18364 self.drain = noop
18365 }
18366
18367 function killAndDrain () {
18368 queueHead = null
18369 queueTail = null
18370 self.drain()
18371 self.drain = noop
18372 }
18373}
18374
18375function noop () {}
18376
18377function Task () {
18378 this.value = null
18379 this.callback = noop
18380 this.next = null
18381 this.release = noop
18382 this.context = null
18383
18384 var self = this
18385
18386 this.worked = function worked (err, result) {
18387 var callback = self.callback
18388 self.value = null
18389 self.callback = noop
18390 callback.call(self.context, err, result)
18391 self.release(self)
18392 }
18393}
18394
18395module.exports = fastqueue
18396
18397
18398/***/ }),
18399/* 104 */
18400/***/ (function(module, exports, __webpack_require__) {
18401
18402"use strict";
18403
18404
18405function reusify (Constructor) {
18406 var head = new Constructor()
18407 var tail = head
18408
18409 function get () {
18410 var current = head
18411
18412 if (current.next) {
18413 head = current.next
18414 } else {
18415 head = new Constructor()
18416 tail = head
18417 }
18418
18419 current.next = null
18420
18421 return current
18422 }
18423
18424 function release (obj) {
18425 tail.next = obj
18426 tail = obj
18427 }
18428
18429 return {
18430 get: get,
18431 release: release
18432 }
18433}
18434
18435module.exports = reusify
18436
18437
18438/***/ }),
18439/* 105 */
18440/***/ (function(module, exports, __webpack_require__) {
18441
18442"use strict";
18443
18444Object.defineProperty(exports, "__esModule", { value: true });
18445function isFatalError(settings, error) {
18446 if (settings.errorFilter === null) {
18447 return true;
18448 }
18449 return !settings.errorFilter(error);
18450}
18451exports.isFatalError = isFatalError;
18452function isAppliedFilter(filter, value) {
18453 return filter === null || filter(value);
18454}
18455exports.isAppliedFilter = isAppliedFilter;
18456function replacePathSegmentSeparator(filepath, separator) {
18457 return filepath.split(/[\\\/]/).join(separator);
18458}
18459exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
18460function joinPathSegments(a, b, separator) {
18461 if (a === '') {
18462 return b;
18463 }
18464 return a + separator + b;
18465}
18466exports.joinPathSegments = joinPathSegments;
18467
18468
18469/***/ }),
18470/* 106 */
18471/***/ (function(module, exports, __webpack_require__) {
18472
18473"use strict";
18474
18475Object.defineProperty(exports, "__esModule", { value: true });
18476const common = __webpack_require__(105);
18477class Reader {
18478 constructor(_root, _settings) {
18479 this._root = _root;
18480 this._settings = _settings;
18481 this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
18482 }
18483}
18484exports.default = Reader;
18485
18486
18487/***/ }),
18488/* 107 */
18489/***/ (function(module, exports, __webpack_require__) {
18490
18491"use strict";
18492
18493Object.defineProperty(exports, "__esModule", { value: true });
18494const stream_1 = __webpack_require__(83);
18495const async_1 = __webpack_require__(93);
18496class StreamProvider {
18497 constructor(_root, _settings) {
18498 this._root = _root;
18499 this._settings = _settings;
18500 this._reader = new async_1.default(this._root, this._settings);
18501 this._stream = new stream_1.Readable({
18502 objectMode: true,
18503 read: () => { },
18504 destroy: this._reader.destroy.bind(this._reader)
18505 });
18506 }
18507 read() {
18508 this._reader.onError((error) => {
18509 this._stream.emit('error', error);
18510 });
18511 this._reader.onEntry((entry) => {
18512 this._stream.push(entry);
18513 });
18514 this._reader.onEnd(() => {
18515 this._stream.push(null);
18516 });
18517 this._reader.read();
18518 return this._stream;
18519 }
18520}
18521exports.default = StreamProvider;
18522
18523
18524/***/ }),
18525/* 108 */
18526/***/ (function(module, exports, __webpack_require__) {
18527
18528"use strict";
18529
18530Object.defineProperty(exports, "__esModule", { value: true });
18531const sync_1 = __webpack_require__(109);
18532class SyncProvider {
18533 constructor(_root, _settings) {
18534 this._root = _root;
18535 this._settings = _settings;
18536 this._reader = new sync_1.default(this._root, this._settings);
18537 }
18538 read() {
18539 return this._reader.read();
18540 }
18541}
18542exports.default = SyncProvider;
18543
18544
18545/***/ }),
18546/* 109 */
18547/***/ (function(module, exports, __webpack_require__) {
18548
18549"use strict";
18550
18551Object.defineProperty(exports, "__esModule", { value: true });
18552const fsScandir = __webpack_require__(94);
18553const common = __webpack_require__(105);
18554const reader_1 = __webpack_require__(106);
18555class SyncReader extends reader_1.default {
18556 constructor() {
18557 super(...arguments);
18558 this._scandir = fsScandir.scandirSync;
18559 this._storage = new Set();
18560 this._queue = new Set();
18561 }
18562 read() {
18563 this._pushToQueue(this._root, this._settings.basePath);
18564 this._handleQueue();
18565 return Array.from(this._storage);
18566 }
18567 _pushToQueue(dir, base) {
18568 this._queue.add({ dir, base });
18569 }
18570 _handleQueue() {
18571 for (const item of this._queue.values()) {
18572 this._handleDirectory(item.dir, item.base);
18573 }
18574 }
18575 _handleDirectory(dir, base) {
18576 try {
18577 const entries = this._scandir(dir, this._settings.fsScandirSettings);
18578 for (const entry of entries) {
18579 this._handleEntry(entry, base);
18580 }
18581 }
18582 catch (error) {
18583 this._handleError(error);
18584 }
18585 }
18586 _handleError(error) {
18587 if (!common.isFatalError(this._settings, error)) {
18588 return;
18589 }
18590 throw error;
18591 }
18592 _handleEntry(entry, base) {
18593 const fullpath = entry.path;
18594 if (base !== undefined) {
18595 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
18596 }
18597 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
18598 this._pushToStorage(entry);
18599 }
18600 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
18601 this._pushToQueue(fullpath, entry.path);
18602 }
18603 }
18604 _pushToStorage(entry) {
18605 this._storage.add(entry);
18606 }
18607}
18608exports.default = SyncReader;
18609
18610
18611/***/ }),
18612/* 110 */
18613/***/ (function(module, exports, __webpack_require__) {
18614
18615"use strict";
18616
18617Object.defineProperty(exports, "__esModule", { value: true });
18618const path = __webpack_require__(15);
18619const fsScandir = __webpack_require__(94);
18620class Settings {
18621 constructor(_options = {}) {
18622 this._options = _options;
18623 this.basePath = this._getValue(this._options.basePath, undefined);
18624 this.concurrency = this._getValue(this._options.concurrency, Infinity);
18625 this.deepFilter = this._getValue(this._options.deepFilter, null);
18626 this.entryFilter = this._getValue(this._options.entryFilter, null);
18627 this.errorFilter = this._getValue(this._options.errorFilter, null);
18628 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
18629 this.fsScandirSettings = new fsScandir.Settings({
18630 followSymbolicLinks: this._options.followSymbolicLinks,
18631 fs: this._options.fs,
18632 pathSegmentSeparator: this._options.pathSegmentSeparator,
18633 stats: this._options.stats,
18634 throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
18635 });
18636 }
18637 _getValue(option, value) {
18638 return option === undefined ? value : option;
18639 }
18640}
18641exports.default = Settings;
18642
18643
18644/***/ }),
18645/* 111 */
18646/***/ (function(module, exports, __webpack_require__) {
18647
18648"use strict";
18649
18650Object.defineProperty(exports, "__esModule", { value: true });
18651const path = __webpack_require__(15);
18652const fsStat = __webpack_require__(86);
18653const utils = __webpack_require__(55);
18654class Reader {
18655 constructor(_settings) {
18656 this._settings = _settings;
18657 this._fsStatSettings = new fsStat.Settings({
18658 followSymbolicLink: this._settings.followSymbolicLinks,
18659 fs: this._settings.fs,
18660 throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
18661 });
18662 }
18663 _getFullEntryPath(filepath) {
18664 return path.resolve(this._settings.cwd, filepath);
18665 }
18666 _makeEntry(stats, pattern) {
18667 const entry = {
18668 name: pattern,
18669 path: pattern,
18670 dirent: utils.fs.createDirentFromStats(pattern, stats)
18671 };
18672 if (this._settings.stats) {
18673 entry.stats = stats;
18674 }
18675 return entry;
18676 }
18677 _isFatalError(error) {
18678 return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
18679 }
18680}
18681exports.default = Reader;
18682
18683
18684/***/ }),
18685/* 112 */
18686/***/ (function(module, exports, __webpack_require__) {
18687
18688"use strict";
18689
18690Object.defineProperty(exports, "__esModule", { value: true });
18691const path = __webpack_require__(15);
18692const deep_1 = __webpack_require__(113);
18693const entry_1 = __webpack_require__(114);
18694const error_1 = __webpack_require__(115);
18695const entry_2 = __webpack_require__(116);
18696class Provider {
18697 constructor(_settings) {
18698 this._settings = _settings;
18699 this.errorFilter = new error_1.default(this._settings);
18700 this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
18701 this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
18702 this.entryTransformer = new entry_2.default(this._settings);
18703 }
18704 _getRootDirectory(task) {
18705 return path.resolve(this._settings.cwd, task.base);
18706 }
18707 _getReaderOptions(task) {
18708 const basePath = task.base === '.' ? '' : task.base;
18709 return {
18710 basePath,
18711 pathSegmentSeparator: '/',
18712 concurrency: this._settings.concurrency,
18713 deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
18714 entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
18715 errorFilter: this.errorFilter.getFilter(),
18716 followSymbolicLinks: this._settings.followSymbolicLinks,
18717 fs: this._settings.fs,
18718 stats: this._settings.stats,
18719 throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
18720 transform: this.entryTransformer.getTransformer()
18721 };
18722 }
18723 _getMicromatchOptions() {
18724 return {
18725 dot: this._settings.dot,
18726 matchBase: this._settings.baseNameMatch,
18727 nobrace: !this._settings.braceExpansion,
18728 nocase: !this._settings.caseSensitiveMatch,
18729 noext: !this._settings.extglob,
18730 noglobstar: !this._settings.globstar,
18731 posix: true,
18732 strictSlashes: false
18733 };
18734 }
18735}
18736exports.default = Provider;
18737
18738
18739/***/ }),
18740/* 113 */
18741/***/ (function(module, exports, __webpack_require__) {
18742
18743"use strict";
18744
18745Object.defineProperty(exports, "__esModule", { value: true });
18746const utils = __webpack_require__(55);
18747class DeepFilter {
18748 constructor(_settings, _micromatchOptions) {
18749 this._settings = _settings;
18750 this._micromatchOptions = _micromatchOptions;
18751 }
18752 getFilter(basePath, positive, negative) {
18753 const maxPatternDepth = this._getMaxPatternDepth(positive);
18754 const negativeRe = this._getNegativePatternsRe(negative);
18755 return (entry) => this._filter(basePath, entry, negativeRe, maxPatternDepth);
18756 }
18757 _getMaxPatternDepth(patterns) {
18758 const globstar = patterns.some(utils.pattern.hasGlobStar);
18759 return globstar ? Infinity : utils.pattern.getMaxNaivePatternsDepth(patterns);
18760 }
18761 _getNegativePatternsRe(patterns) {
18762 const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
18763 return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
18764 }
18765 _filter(basePath, entry, negativeRe, maxPatternDepth) {
18766 const depth = this._getEntryDepth(basePath, entry.path);
18767 if (this._isSkippedByDeep(depth)) {
18768 return false;
18769 }
18770 if (this._isSkippedByMaxPatternDepth(depth, maxPatternDepth)) {
18771 return false;
18772 }
18773 if (this._isSkippedSymbolicLink(entry)) {
18774 return false;
18775 }
18776 if (this._isSkippedDotDirectory(entry)) {
18777 return false;
18778 }
18779 return this._isSkippedByNegativePatterns(entry, negativeRe);
18780 }
18781 _getEntryDepth(basePath, entryPath) {
18782 const basePathDepth = basePath.split('/').length;
18783 const entryPathDepth = entryPath.split('/').length;
18784 return entryPathDepth - (basePath === '' ? 0 : basePathDepth);
18785 }
18786 _isSkippedByDeep(entryDepth) {
18787 return entryDepth >= this._settings.deep;
18788 }
18789 _isSkippedByMaxPatternDepth(entryDepth, maxPatternDepth) {
18790 return !this._settings.baseNameMatch && maxPatternDepth !== Infinity && entryDepth > maxPatternDepth;
18791 }
18792 _isSkippedSymbolicLink(entry) {
18793 return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
18794 }
18795 _isSkippedDotDirectory(entry) {
18796 return !this._settings.dot && entry.name.startsWith('.');
18797 }
18798 _isSkippedByNegativePatterns(entry, negativeRe) {
18799 return !utils.pattern.matchAny(entry.path, negativeRe);
18800 }
18801}
18802exports.default = DeepFilter;
18803
18804
18805/***/ }),
18806/* 114 */
18807/***/ (function(module, exports, __webpack_require__) {
18808
18809"use strict";
18810
18811Object.defineProperty(exports, "__esModule", { value: true });
18812const utils = __webpack_require__(55);
18813class EntryFilter {
18814 constructor(_settings, _micromatchOptions) {
18815 this._settings = _settings;
18816 this._micromatchOptions = _micromatchOptions;
18817 this.index = new Map();
18818 }
18819 getFilter(positive, negative) {
18820 const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
18821 const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
18822 return (entry) => this._filter(entry, positiveRe, negativeRe);
18823 }
18824 _filter(entry, positiveRe, negativeRe) {
18825 if (this._settings.unique) {
18826 if (this._isDuplicateEntry(entry)) {
18827 return false;
18828 }
18829 this._createIndexRecord(entry);
18830 }
18831 if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
18832 return false;
18833 }
18834 if (this._isSkippedByAbsoluteNegativePatterns(entry, negativeRe)) {
18835 return false;
18836 }
18837 const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
18838 return this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
18839 }
18840 _isDuplicateEntry(entry) {
18841 return this.index.has(entry.path);
18842 }
18843 _createIndexRecord(entry) {
18844 this.index.set(entry.path, undefined);
18845 }
18846 _onlyFileFilter(entry) {
18847 return this._settings.onlyFiles && !entry.dirent.isFile();
18848 }
18849 _onlyDirectoryFilter(entry) {
18850 return this._settings.onlyDirectories && !entry.dirent.isDirectory();
18851 }
18852 _isSkippedByAbsoluteNegativePatterns(entry, negativeRe) {
18853 if (!this._settings.absolute) {
18854 return false;
18855 }
18856 const fullpath = utils.path.makeAbsolute(this._settings.cwd, entry.path);
18857 return this._isMatchToPatterns(fullpath, negativeRe);
18858 }
18859 _isMatchToPatterns(filepath, patternsRe) {
18860 return utils.pattern.matchAny(filepath, patternsRe);
18861 }
18862}
18863exports.default = EntryFilter;
18864
18865
18866/***/ }),
18867/* 115 */
18868/***/ (function(module, exports, __webpack_require__) {
18869
18870"use strict";
18871
18872Object.defineProperty(exports, "__esModule", { value: true });
18873const utils = __webpack_require__(55);
18874class ErrorFilter {
18875 constructor(_settings) {
18876 this._settings = _settings;
18877 }
18878 getFilter() {
18879 return (error) => this._isNonFatalError(error);
18880 }
18881 _isNonFatalError(error) {
18882 return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
18883 }
18884}
18885exports.default = ErrorFilter;
18886
18887
18888/***/ }),
18889/* 116 */
18890/***/ (function(module, exports, __webpack_require__) {
18891
18892"use strict";
18893
18894Object.defineProperty(exports, "__esModule", { value: true });
18895const utils = __webpack_require__(55);
18896class EntryTransformer {
18897 constructor(_settings) {
18898 this._settings = _settings;
18899 }
18900 getTransformer() {
18901 return (entry) => this._transform(entry);
18902 }
18903 _transform(entry) {
18904 let filepath = entry.path;
18905 if (this._settings.absolute) {
18906 filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
18907 filepath = utils.path.unixify(filepath);
18908 }
18909 if (this._settings.markDirectories && entry.dirent.isDirectory()) {
18910 filepath += '/';
18911 }
18912 if (!this._settings.objectMode) {
18913 return filepath;
18914 }
18915 return Object.assign({}, entry, { path: filepath });
18916 }
18917}
18918exports.default = EntryTransformer;
18919
18920
18921/***/ }),
18922/* 117 */
18923/***/ (function(module, exports, __webpack_require__) {
18924
18925"use strict";
18926
18927Object.defineProperty(exports, "__esModule", { value: true });
18928const stream_1 = __webpack_require__(83);
18929const stream_2 = __webpack_require__(85);
18930const provider_1 = __webpack_require__(112);
18931class ProviderStream extends provider_1.default {
18932 constructor() {
18933 super(...arguments);
18934 this._reader = new stream_2.default(this._settings);
18935 }
18936 read(task) {
18937 const root = this._getRootDirectory(task);
18938 const options = this._getReaderOptions(task);
18939 const source = this.api(root, task, options);
18940 const dest = new stream_1.Readable({ objectMode: true, read: () => { } });
18941 source
18942 .once('error', (error) => dest.emit('error', error))
18943 .on('data', (entry) => dest.emit('data', options.transform(entry)))
18944 .once('end', () => dest.emit('end'));
18945 return dest;
18946 }
18947 api(root, task, options) {
18948 if (task.dynamic) {
18949 return this._reader.dynamic(root, options);
18950 }
18951 return this._reader.static(task.patterns, options);
18952 }
18953}
18954exports.default = ProviderStream;
18955
18956
18957/***/ }),
18958/* 118 */
18959/***/ (function(module, exports, __webpack_require__) {
18960
18961"use strict";
18962
18963Object.defineProperty(exports, "__esModule", { value: true });
18964const sync_1 = __webpack_require__(119);
18965const provider_1 = __webpack_require__(112);
18966class ProviderSync extends provider_1.default {
18967 constructor() {
18968 super(...arguments);
18969 this._reader = new sync_1.default(this._settings);
18970 }
18971 read(task) {
18972 const root = this._getRootDirectory(task);
18973 const options = this._getReaderOptions(task);
18974 const entries = this.api(root, task, options);
18975 return entries.map(options.transform);
18976 }
18977 api(root, task, options) {
18978 if (task.dynamic) {
18979 return this._reader.dynamic(root, options);
18980 }
18981 return this._reader.static(task.patterns, options);
18982 }
18983}
18984exports.default = ProviderSync;
18985
18986
18987/***/ }),
18988/* 119 */
18989/***/ (function(module, exports, __webpack_require__) {
18990
18991"use strict";
18992
18993Object.defineProperty(exports, "__esModule", { value: true });
18994const fsStat = __webpack_require__(86);
18995const fsWalk = __webpack_require__(91);
18996const reader_1 = __webpack_require__(111);
18997class ReaderSync extends reader_1.default {
18998 constructor() {
18999 super(...arguments);
19000 this._walkSync = fsWalk.walkSync;
19001 this._statSync = fsStat.statSync;
19002 }
19003 dynamic(root, options) {
19004 return this._walkSync(root, options);
19005 }
19006 static(patterns, options) {
19007 const entries = [];
19008 for (const pattern of patterns) {
19009 const filepath = this._getFullEntryPath(pattern);
19010 const entry = this._getEntry(filepath, pattern, options);
19011 if (entry === null || !options.entryFilter(entry)) {
19012 continue;
19013 }
19014 entries.push(entry);
19015 }
19016 return entries;
19017 }
19018 _getEntry(filepath, pattern, options) {
19019 try {
19020 const stats = this._getStat(filepath);
19021 return this._makeEntry(stats, pattern);
19022 }
19023 catch (error) {
19024 if (options.errorFilter(error)) {
19025 return null;
19026 }
19027 throw error;
19028 }
19029 }
19030 _getStat(filepath) {
19031 return this._statSync(filepath, this._fsStatSettings);
19032 }
19033}
19034exports.default = ReaderSync;
19035
19036
19037/***/ }),
19038/* 120 */
19039/***/ (function(module, exports, __webpack_require__) {
19040
19041"use strict";
19042
19043Object.defineProperty(exports, "__esModule", { value: true });
19044const fs = __webpack_require__(36);
19045const os = __webpack_require__(16);
19046const CPU_COUNT = os.cpus().length;
19047exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
19048 lstat: fs.lstat,
19049 lstatSync: fs.lstatSync,
19050 stat: fs.stat,
19051 statSync: fs.statSync,
19052 readdir: fs.readdir,
19053 readdirSync: fs.readdirSync
19054};
19055// tslint:enable no-redundant-jsdoc
19056class Settings {
19057 constructor(_options = {}) {
19058 this._options = _options;
19059 this.absolute = this._getValue(this._options.absolute, false);
19060 this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
19061 this.braceExpansion = this._getValue(this._options.braceExpansion, true);
19062 this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
19063 this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
19064 this.cwd = this._getValue(this._options.cwd, process.cwd());
19065 this.deep = this._getValue(this._options.deep, Infinity);
19066 this.dot = this._getValue(this._options.dot, false);
19067 this.extglob = this._getValue(this._options.extglob, true);
19068 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
19069 this.fs = this._getFileSystemMethods(this._options.fs);
19070 this.globstar = this._getValue(this._options.globstar, true);
19071 this.ignore = this._getValue(this._options.ignore, []);
19072 this.markDirectories = this._getValue(this._options.markDirectories, false);
19073 this.objectMode = this._getValue(this._options.objectMode, false);
19074 this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
19075 this.onlyFiles = this._getValue(this._options.onlyFiles, true);
19076 this.stats = this._getValue(this._options.stats, false);
19077 this.suppressErrors = this._getValue(this._options.suppressErrors, false);
19078 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
19079 this.unique = this._getValue(this._options.unique, true);
19080 if (this.onlyDirectories) {
19081 this.onlyFiles = false;
19082 }
19083 if (this.stats) {
19084 this.objectMode = true;
19085 }
19086 }
19087 _getValue(option, value) {
19088 return option === undefined ? value : option;
19089 }
19090 _getFileSystemMethods(methods = {}) {
19091 return Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER, methods);
19092 }
19093}
19094exports.default = Settings;
19095
19096
19097/***/ }),
19098/* 121 */,
19099/* 122 */,
19100/* 123 */,
19101/* 124 */,
19102/* 125 */,
19103/* 126 */,
19104/* 127 */,
19105/* 128 */,
19106/* 129 */,
19107/* 130 */,
19108/* 131 */,
19109/* 132 */
19110/***/ (function(module, __webpack_exports__, __webpack_require__) {
19111
19112"use strict";
19113__webpack_require__.r(__webpack_exports__);
19114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUriThrowOnMissingScheme", function() { return setUriThrowOnMissingScheme; });
19115/*---------------------------------------------------------------------------------------------
19116 * Copyright (c) Microsoft Corporation. All rights reserved.
19117 * Licensed under the MIT License. See License.txt in the project root for license information.
19118 *--------------------------------------------------------------------------------------------*/
19119
19120var __extends = (undefined && undefined.__extends) || (function () {
19121 var extendStatics = Object.setPrototypeOf ||
19122 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19123 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19124 return function (d, b) {
19125 extendStatics(d, b);
19126 function __() { this.constructor = d; }
19127 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19128 };
19129})();
19130var isWindows;
19131if (typeof process === 'object') {
19132 isWindows = process.platform === 'win32';
19133}
19134else if (typeof navigator === 'object') {
19135 var userAgent = navigator.userAgent;
19136 isWindows = userAgent.indexOf('Windows') >= 0;
19137}
19138//#endregion
19139var _schemePattern = /^\w[\w\d+.-]*$/;
19140var _singleSlashStart = /^\//;
19141var _doubleSlashStart = /^\/\//;
19142var _throwOnMissingSchema = true;
19143/**
19144 * @internal
19145 */
19146function setUriThrowOnMissingScheme(value) {
19147 var old = _throwOnMissingSchema;
19148 _throwOnMissingSchema = value;
19149 return old;
19150}
19151function _validateUri(ret, _strict) {
19152 // scheme, must be set
19153 if (!ret.scheme) {
19154 if (_strict || _throwOnMissingSchema) {
19155 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
19156 // } else {
19157 // console.warn(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`);
19158 }
19159 }
19160 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
19161 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
19162 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
19163 throw new Error('[UriError]: Scheme contains illegal characters.');
19164 }
19165 // path, http://tools.ietf.org/html/rfc3986#section-3.3
19166 // If a URI contains an authority component, then the path component
19167 // must either be empty or begin with a slash ("/") character. If a URI
19168 // does not contain an authority component, then the path cannot begin
19169 // with two slash characters ("//").
19170 if (ret.path) {
19171 if (ret.authority) {
19172 if (!_singleSlashStart.test(ret.path)) {
19173 throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
19174 }
19175 }
19176 else {
19177 if (_doubleSlashStart.test(ret.path)) {
19178 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
19179 }
19180 }
19181 }
19182}
19183// for a while we allowed uris *without* schemes and this is the migration
19184// for them, e.g. an uri without scheme and without strict-mode warns and falls
19185// back to the file-scheme. that should cause the least carnage and still be a
19186// clear warning
19187function _schemeFix(scheme, _strict) {
19188 if (_strict || _throwOnMissingSchema) {
19189 return scheme || _empty;
19190 }
19191 if (!scheme) {
19192 // console.trace('BAD uri lacks scheme, falling back to file-scheme.');
19193 scheme = 'file';
19194 }
19195 return scheme;
19196}
19197// implements a bit of https://tools.ietf.org/html/rfc3986#section-5
19198function _referenceResolution(scheme, path) {
19199 // the slash-character is our 'default base' as we don't
19200 // support constructing URIs relative to other URIs. This
19201 // also means that we alter and potentially break paths.
19202 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
19203 switch (scheme) {
19204 case 'https':
19205 case 'http':
19206 case 'file':
19207 if (!path) {
19208 path = _slash;
19209 }
19210 else if (path[0] !== _slash) {
19211 path = _slash + path;
19212 }
19213 break;
19214 }
19215 return path;
19216}
19217var _empty = '';
19218var _slash = '/';
19219var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
19220/**
19221 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
19222 * This class is a simple parser which creates the basic component parts
19223 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
19224 * and encoding.
19225 *
19226 * foo://example.com:8042/over/there?name=ferret#nose
19227 * \_/ \______________/\_________/ \_________/ \__/
19228 * | | | | |
19229 * scheme authority path query fragment
19230 * | _____________________|__
19231 * / \ / \
19232 * urn:example:animal:ferret:nose
19233 */
19234var URI = (function () {
19235 /**
19236 * @internal
19237 */
19238 function URI(schemeOrData, authority, path, query, fragment, _strict) {
19239 if (_strict === void 0) { _strict = false; }
19240 if (typeof schemeOrData === 'object') {
19241 this.scheme = schemeOrData.scheme || _empty;
19242 this.authority = schemeOrData.authority || _empty;
19243 this.path = schemeOrData.path || _empty;
19244 this.query = schemeOrData.query || _empty;
19245 this.fragment = schemeOrData.fragment || _empty;
19246 // no validation because it's this URI
19247 // that creates uri components.
19248 // _validateUri(this);
19249 }
19250 else {
19251 this.scheme = _schemeFix(schemeOrData, _strict);
19252 this.authority = authority || _empty;
19253 this.path = _referenceResolution(this.scheme, path || _empty);
19254 this.query = query || _empty;
19255 this.fragment = fragment || _empty;
19256 _validateUri(this, _strict);
19257 }
19258 }
19259 URI.isUri = function (thing) {
19260 if (thing instanceof URI) {
19261 return true;
19262 }
19263 if (!thing) {
19264 return false;
19265 }
19266 return typeof thing.authority === 'string'
19267 && typeof thing.fragment === 'string'
19268 && typeof thing.path === 'string'
19269 && typeof thing.query === 'string'
19270 && typeof thing.scheme === 'string'
19271 && typeof thing.fsPath === 'function'
19272 && typeof thing.with === 'function'
19273 && typeof thing.toString === 'function';
19274 };
19275 Object.defineProperty(URI.prototype, "fsPath", {
19276 // ---- filesystem path -----------------------
19277 /**
19278 * Returns a string representing the corresponding file system path of this URI.
19279 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
19280 * platform specific path separator.
19281 *
19282 * * Will *not* validate the path for invalid characters and semantics.
19283 * * Will *not* look at the scheme of this URI.
19284 * * The result shall *not* be used for display purposes but for accessing a file on disk.
19285 *
19286 *
19287 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
19288 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
19289 *
19290 * ```ts
19291 const u = URI.parse('file://server/c$/folder/file.txt')
19292 u.authority === 'server'
19293 u.path === '/shares/c$/file.txt'
19294 u.fsPath === '\\server\c$\folder\file.txt'
19295 ```
19296 *
19297 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
19298 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
19299 * with URIs that represent files on disk (`file` scheme).
19300 */
19301 get: function () {
19302 // if (this.scheme !== 'file') {
19303 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
19304 // }
19305 return _makeFsPath(this);
19306 },
19307 enumerable: true,
19308 configurable: true
19309 });
19310 // ---- modify to new -------------------------
19311 URI.prototype.with = function (change) {
19312 if (!change) {
19313 return this;
19314 }
19315 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
19316 if (scheme === undefined) {
19317 scheme = this.scheme;
19318 }
19319 else if (scheme === null) {
19320 scheme = _empty;
19321 }
19322 if (authority === undefined) {
19323 authority = this.authority;
19324 }
19325 else if (authority === null) {
19326 authority = _empty;
19327 }
19328 if (path === undefined) {
19329 path = this.path;
19330 }
19331 else if (path === null) {
19332 path = _empty;
19333 }
19334 if (query === undefined) {
19335 query = this.query;
19336 }
19337 else if (query === null) {
19338 query = _empty;
19339 }
19340 if (fragment === undefined) {
19341 fragment = this.fragment;
19342 }
19343 else if (fragment === null) {
19344 fragment = _empty;
19345 }
19346 if (scheme === this.scheme
19347 && authority === this.authority
19348 && path === this.path
19349 && query === this.query
19350 && fragment === this.fragment) {
19351 return this;
19352 }
19353 return new _URI(scheme, authority, path, query, fragment);
19354 };
19355 // ---- parse & validate ------------------------
19356 /**
19357 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
19358 * `file:///usr/home`, or `scheme:with/path`.
19359 *
19360 * @param value A string which represents an URI (see `URI#toString`).
19361 */
19362 URI.parse = function (value, _strict) {
19363 if (_strict === void 0) { _strict = false; }
19364 var match = _regexp.exec(value);
19365 if (!match) {
19366 return new _URI(_empty, _empty, _empty, _empty, _empty);
19367 }
19368 return new _URI(match[2] || _empty, decodeURIComponent(match[4] || _empty), decodeURIComponent(match[5] || _empty), decodeURIComponent(match[7] || _empty), decodeURIComponent(match[9] || _empty), _strict);
19369 };
19370 /**
19371 * Creates a new URI from a file system path, e.g. `c:\my\files`,
19372 * `/usr/home`, or `\\server\share\some\path`.
19373 *
19374 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
19375 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
19376 * `URI.parse('file://' + path)` because the path might contain characters that are
19377 * interpreted (# and ?). See the following sample:
19378 * ```ts
19379 const good = URI.file('/coding/c#/project1');
19380 good.scheme === 'file';
19381 good.path === '/coding/c#/project1';
19382 good.fragment === '';
19383 const bad = URI.parse('file://' + '/coding/c#/project1');
19384 bad.scheme === 'file';
19385 bad.path === '/coding/c'; // path is now broken
19386 bad.fragment === '/project1';
19387 ```
19388 *
19389 * @param path A file system path (see `URI#fsPath`)
19390 */
19391 URI.file = function (path) {
19392 var authority = _empty;
19393 // normalize to fwd-slashes on windows,
19394 // on other systems bwd-slashes are valid
19395 // filename character, eg /f\oo/ba\r.txt
19396 if (isWindows) {
19397 path = path.replace(/\\/g, _slash);
19398 }
19399 // check for authority as used in UNC shares
19400 // or use the path as given
19401 if (path[0] === _slash && path[1] === _slash) {
19402 var idx = path.indexOf(_slash, 2);
19403 if (idx === -1) {
19404 authority = path.substring(2);
19405 path = _slash;
19406 }
19407 else {
19408 authority = path.substring(2, idx);
19409 path = path.substring(idx) || _slash;
19410 }
19411 }
19412 return new _URI('file', authority, path, _empty, _empty);
19413 };
19414 URI.from = function (components) {
19415 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
19416 };
19417 // ---- printing/externalize ---------------------------
19418 /**
19419 * Creates a string representation for this URI. It's guaranteed that calling
19420 * `URI.parse` with the result of this function creates an URI which is equal
19421 * to this URI.
19422 *
19423 * * The result shall *not* be used for display purposes but for externalization or transport.
19424 * * The result will be encoded using the percentage encoding and encoding happens mostly
19425 * ignore the scheme-specific encoding rules.
19426 *
19427 * @param skipEncoding Do not encode the result, default is `false`
19428 */
19429 URI.prototype.toString = function (skipEncoding) {
19430 if (skipEncoding === void 0) { skipEncoding = false; }
19431 return _asFormatted(this, skipEncoding);
19432 };
19433 URI.prototype.toJSON = function () {
19434 return this;
19435 };
19436 URI.revive = function (data) {
19437 if (!data) {
19438 return data;
19439 }
19440 else if (data instanceof URI) {
19441 return data;
19442 }
19443 else {
19444 var result = new _URI(data);
19445 result._formatted = data.external;
19446 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
19447 return result;
19448 }
19449 };
19450 return URI;
19451}());
19452/* harmony default export */ __webpack_exports__["default"] = (URI);
19453var _pathSepMarker = isWindows ? 1 : undefined;
19454// tslint:disable-next-line:class-name
19455var _URI = (function (_super) {
19456 __extends(_URI, _super);
19457 function _URI() {
19458 var _this = _super !== null && _super.apply(this, arguments) || this;
19459 _this._formatted = null;
19460 _this._fsPath = null;
19461 return _this;
19462 }
19463 Object.defineProperty(_URI.prototype, "fsPath", {
19464 get: function () {
19465 if (!this._fsPath) {
19466 this._fsPath = _makeFsPath(this);
19467 }
19468 return this._fsPath;
19469 },
19470 enumerable: true,
19471 configurable: true
19472 });
19473 _URI.prototype.toString = function (skipEncoding) {
19474 if (skipEncoding === void 0) { skipEncoding = false; }
19475 if (!skipEncoding) {
19476 if (!this._formatted) {
19477 this._formatted = _asFormatted(this, false);
19478 }
19479 return this._formatted;
19480 }
19481 else {
19482 // we don't cache that
19483 return _asFormatted(this, true);
19484 }
19485 };
19486 _URI.prototype.toJSON = function () {
19487 var res = {
19488 $mid: 1
19489 };
19490 // cached state
19491 if (this._fsPath) {
19492 res.fsPath = this._fsPath;
19493 res._sep = _pathSepMarker;
19494 }
19495 if (this._formatted) {
19496 res.external = this._formatted;
19497 }
19498 // uri components
19499 if (this.path) {
19500 res.path = this.path;
19501 }
19502 if (this.scheme) {
19503 res.scheme = this.scheme;
19504 }
19505 if (this.authority) {
19506 res.authority = this.authority;
19507 }
19508 if (this.query) {
19509 res.query = this.query;
19510 }
19511 if (this.fragment) {
19512 res.fragment = this.fragment;
19513 }
19514 return res;
19515 };
19516 return _URI;
19517}(URI));
19518// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
19519var encodeTable = (_a = {},
19520 _a[58 /* Colon */] = '%3A',
19521 _a[47 /* Slash */] = '%2F',
19522 _a[63 /* QuestionMark */] = '%3F',
19523 _a[35 /* Hash */] = '%23',
19524 _a[91 /* OpenSquareBracket */] = '%5B',
19525 _a[93 /* CloseSquareBracket */] = '%5D',
19526 _a[64 /* AtSign */] = '%40',
19527 _a[33 /* ExclamationMark */] = '%21',
19528 _a[36 /* DollarSign */] = '%24',
19529 _a[38 /* Ampersand */] = '%26',
19530 _a[39 /* SingleQuote */] = '%27',
19531 _a[40 /* OpenParen */] = '%28',
19532 _a[41 /* CloseParen */] = '%29',
19533 _a[42 /* Asterisk */] = '%2A',
19534 _a[43 /* Plus */] = '%2B',
19535 _a[44 /* Comma */] = '%2C',
19536 _a[59 /* Semicolon */] = '%3B',
19537 _a[61 /* Equals */] = '%3D',
19538 _a[32 /* Space */] = '%20',
19539 _a);
19540function encodeURIComponentFast(uriComponent, allowSlash) {
19541 var res = undefined;
19542 var nativeEncodePos = -1;
19543 for (var pos = 0; pos < uriComponent.length; pos++) {
19544 var code = uriComponent.charCodeAt(pos);
19545 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
19546 if ((code >= 97 /* a */ && code <= 122 /* z */)
19547 || (code >= 65 /* A */ && code <= 90 /* Z */)
19548 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
19549 || code === 45 /* Dash */
19550 || code === 46 /* Period */
19551 || code === 95 /* Underline */
19552 || code === 126 /* Tilde */
19553 || (allowSlash && code === 47 /* Slash */)) {
19554 // check if we are delaying native encode
19555 if (nativeEncodePos !== -1) {
19556 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
19557 nativeEncodePos = -1;
19558 }
19559 // check if we write into a new string (by default we try to return the param)
19560 if (res !== undefined) {
19561 res += uriComponent.charAt(pos);
19562 }
19563 }
19564 else {
19565 // encoding needed, we need to allocate a new string
19566 if (res === undefined) {
19567 res = uriComponent.substr(0, pos);
19568 }
19569 // check with default table first
19570 var escaped = encodeTable[code];
19571 if (escaped !== undefined) {
19572 // check if we are delaying native encode
19573 if (nativeEncodePos !== -1) {
19574 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
19575 nativeEncodePos = -1;
19576 }
19577 // append escaped variant to result
19578 res += escaped;
19579 }
19580 else if (nativeEncodePos === -1) {
19581 // use native encode only when needed
19582 nativeEncodePos = pos;
19583 }
19584 }
19585 }
19586 if (nativeEncodePos !== -1) {
19587 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
19588 }
19589 return res !== undefined ? res : uriComponent;
19590}
19591function encodeURIComponentMinimal(path) {
19592 var res = undefined;
19593 for (var pos = 0; pos < path.length; pos++) {
19594 var code = path.charCodeAt(pos);
19595 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
19596 if (res === undefined) {
19597 res = path.substr(0, pos);
19598 }
19599 res += encodeTable[code];
19600 }
19601 else {
19602 if (res !== undefined) {
19603 res += path[pos];
19604 }
19605 }
19606 }
19607 return res !== undefined ? res : path;
19608}
19609/**
19610 * Compute `fsPath` for the given uri
19611 */
19612function _makeFsPath(uri) {
19613 var value;
19614 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
19615 // unc path: file://shares/c$/far/boo
19616 value = "//" + uri.authority + uri.path;
19617 }
19618 else if (uri.path.charCodeAt(0) === 47 /* Slash */
19619 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
19620 && uri.path.charCodeAt(2) === 58 /* Colon */) {
19621 // windows drive letter: file:///c:/far/boo
19622 value = uri.path[1].toLowerCase() + uri.path.substr(2);
19623 }
19624 else {
19625 // other path
19626 value = uri.path;
19627 }
19628 if (isWindows) {
19629 value = value.replace(/\//g, '\\');
19630 }
19631 return value;
19632}
19633/**
19634 * Create the external version of a uri
19635 */
19636function _asFormatted(uri, skipEncoding) {
19637 var encoder = !skipEncoding
19638 ? encodeURIComponentFast
19639 : encodeURIComponentMinimal;
19640 var res = '';
19641 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
19642 if (scheme) {
19643 res += scheme;
19644 res += ':';
19645 }
19646 if (authority || scheme === 'file') {
19647 res += _slash;
19648 res += _slash;
19649 }
19650 if (authority) {
19651 var idx = authority.indexOf('@');
19652 if (idx !== -1) {
19653 // <user>@<auth>
19654 var userinfo = authority.substr(0, idx);
19655 authority = authority.substr(idx + 1);
19656 idx = userinfo.indexOf(':');
19657 if (idx === -1) {
19658 res += encoder(userinfo, false);
19659 }
19660 else {
19661 // <user>:<pass>@<auth>
19662 res += encoder(userinfo.substr(0, idx), false);
19663 res += ':';
19664 res += encoder(userinfo.substr(idx + 1), false);
19665 }
19666 res += '@';
19667 }
19668 authority = authority.toLowerCase();
19669 idx = authority.indexOf(':');
19670 if (idx === -1) {
19671 res += encoder(authority, false);
19672 }
19673 else {
19674 // <auth>:<port>
19675 res += encoder(authority.substr(0, idx), false);
19676 res += authority.substr(idx);
19677 }
19678 }
19679 if (path) {
19680 // lower-case windows drive letters in /C:/fff or C:/fff
19681 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
19682 var code = path.charCodeAt(1);
19683 if (code >= 65 /* A */ && code <= 90 /* Z */) {
19684 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
19685 }
19686 }
19687 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
19688 var code = path.charCodeAt(0);
19689 if (code >= 65 /* A */ && code <= 90 /* Z */) {
19690 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
19691 }
19692 }
19693 // encode the rest of the path
19694 res += encoder(path, true);
19695 }
19696 if (query) {
19697 res += '?';
19698 res += encoder(query, false);
19699 }
19700 if (fragment) {
19701 res += '#';
19702 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
19703 }
19704 return res;
19705}
19706var _a;
19707
19708
19709/***/ }),
19710/* 133 */,
19711/* 134 */,
19712/* 135 */,
19713/* 136 */,
19714/* 137 */,
19715/* 138 */,
19716/* 139 */,
19717/* 140 */,
19718/* 141 */,
19719/* 142 */,
19720/* 143 */,
19721/* 144 */,
19722/* 145 */,
19723/* 146 */,
19724/* 147 */,
19725/* 148 */
19726/***/ (function(module, __webpack_exports__, __webpack_require__) {
19727
19728"use strict";
19729__webpack_require__.r(__webpack_exports__);
19730/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
19731/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; });
19732
19733/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
19734/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; });
19735
19736/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
19737/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; });
19738
19739/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(163);
19740/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; });
19741
19742/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(167);
19743/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; });
19744
19745/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(172);
19746/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; });
19747
19748/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(173);
19749/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; });
19750
19751/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(190);
19752/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; });
19753
19754/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(191);
19755/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; });
19756
19757/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(195);
19758/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; });
19759
19760/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(174);
19761/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; });
19762
19763/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(196);
19764/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; });
19765
19766/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(199);
19767/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; });
19768
19769/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; });
19770
19771/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(180);
19772/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; });
19773
19774/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(157);
19775/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; });
19776
19777/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(151);
19778/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; });
19779
19780/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(182);
19781/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; });
19782
19783/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"]; });
19784
19785/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(164);
19786/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; });
19787
19788/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(165);
19789/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; });
19790
19791/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(200);
19792/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; });
19793
19794/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(201);
19795/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; });
19796
19797/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(202);
19798/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; });
19799
19800/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(203);
19801/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; });
19802
19803/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(168);
19804/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; });
19805
19806/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(160);
19807/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; });
19808
19809/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(204);
19810/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; });
19811
19812/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(205);
19813/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; });
19814
19815/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(207);
19816/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; });
19817
19818/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(208);
19819/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; });
19820
19821/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(219);
19822/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; });
19823
19824/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(230);
19825/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; });
19826
19827/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(183);
19828/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; });
19829
19830/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(231);
19831/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; });
19832
19833/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(223);
19834/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; });
19835
19836/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(232);
19837/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; });
19838
19839/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(233);
19840/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; });
19841
19842/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(234);
19843/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; });
19844
19845/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(235);
19846/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; });
19847
19848/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(236);
19849/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; });
19850
19851/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(238);
19852/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; });
19853
19854/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(239);
19855/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; });
19856
19857/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(184);
19858/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; });
19859
19860/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(240);
19861/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; });
19862
19863/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(241);
19864/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; });
19865
19866/* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(242);
19867/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"]; });
19868
19869/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(245);
19870/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"]; });
19871
19872/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(246);
19873/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"]; });
19874
19875/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(189);
19876/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"]; });
19877
19878/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(247);
19879/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"]; });
19880
19881/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(248);
19882/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"]; });
19883
19884/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(249);
19885/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"]; });
19886
19887/* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(224);
19888/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"]; });
19889
19890/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; });
19891
19892/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; });
19893
19894/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(155);
19895/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"]; });
19896
19897/** PURE_IMPORTS_START PURE_IMPORTS_END */
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953//# sourceMappingURL=index.js.map
19954
19955
19956/***/ }),
19957/* 149 */
19958/***/ (function(module, __webpack_exports__, __webpack_require__) {
19959
19960"use strict";
19961__webpack_require__.r(__webpack_exports__);
19962/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
19963/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(150);
19964/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(162);
19965/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(163);
19966/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(164);
19967/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(155);
19968/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
19969
19970
19971
19972
19973
19974var Observable = /*@__PURE__*/ (function () {
19975 function Observable(subscribe) {
19976 this._isScalar = false;
19977 if (subscribe) {
19978 this._subscribe = subscribe;
19979 }
19980 }
19981 Observable.prototype.lift = function (operator) {
19982 var observable = new Observable();
19983 observable.source = this;
19984 observable.operator = operator;
19985 return observable;
19986 };
19987 Observable.prototype.subscribe = function (observerOrNext, error, complete) {
19988 var operator = this.operator;
19989 var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete);
19990 if (operator) {
19991 sink.add(operator.call(sink, this.source));
19992 }
19993 else {
19994 sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
19995 this._subscribe(sink) :
19996 this._trySubscribe(sink));
19997 }
19998 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
19999 if (sink.syncErrorThrowable) {
20000 sink.syncErrorThrowable = false;
20001 if (sink.syncErrorThrown) {
20002 throw sink.syncErrorValue;
20003 }
20004 }
20005 }
20006 return sink;
20007 };
20008 Observable.prototype._trySubscribe = function (sink) {
20009 try {
20010 return this._subscribe(sink);
20011 }
20012 catch (err) {
20013 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
20014 sink.syncErrorThrown = true;
20015 sink.syncErrorValue = err;
20016 }
20017 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) {
20018 sink.error(err);
20019 }
20020 else {
20021 console.warn(err);
20022 }
20023 }
20024 };
20025 Observable.prototype.forEach = function (next, promiseCtor) {
20026 var _this = this;
20027 promiseCtor = getPromiseCtor(promiseCtor);
20028 return new promiseCtor(function (resolve, reject) {
20029 var subscription;
20030 subscription = _this.subscribe(function (value) {
20031 try {
20032 next(value);
20033 }
20034 catch (err) {
20035 reject(err);
20036 if (subscription) {
20037 subscription.unsubscribe();
20038 }
20039 }
20040 }, reject, resolve);
20041 });
20042 };
20043 Observable.prototype._subscribe = function (subscriber) {
20044 var source = this.source;
20045 return source && source.subscribe(subscriber);
20046 };
20047 Observable.prototype[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]] = function () {
20048 return this;
20049 };
20050 Observable.prototype.pipe = function () {
20051 var operations = [];
20052 for (var _i = 0; _i < arguments.length; _i++) {
20053 operations[_i] = arguments[_i];
20054 }
20055 if (operations.length === 0) {
20056 return this;
20057 }
20058 return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
20059 };
20060 Observable.prototype.toPromise = function (promiseCtor) {
20061 var _this = this;
20062 promiseCtor = getPromiseCtor(promiseCtor);
20063 return new promiseCtor(function (resolve, reject) {
20064 var value;
20065 _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
20066 });
20067 };
20068 Observable.create = function (subscribe) {
20069 return new Observable(subscribe);
20070 };
20071 return Observable;
20072}());
20073
20074function getPromiseCtor(promiseCtor) {
20075 if (!promiseCtor) {
20076 promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise;
20077 }
20078 if (!promiseCtor) {
20079 throw new Error('no Promise impl found');
20080 }
20081 return promiseCtor;
20082}
20083//# sourceMappingURL=Observable.js.map
20084
20085
20086/***/ }),
20087/* 150 */
20088/***/ (function(module, __webpack_exports__, __webpack_require__) {
20089
20090"use strict";
20091__webpack_require__.r(__webpack_exports__);
20092/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; });
20093/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
20094/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */
20095
20096function canReportError(observer) {
20097 while (observer) {
20098 var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
20099 if (closed_1 || isStopped) {
20100 return false;
20101 }
20102 else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
20103 observer = destination;
20104 }
20105 else {
20106 observer = null;
20107 }
20108 }
20109 return true;
20110}
20111//# sourceMappingURL=canReportError.js.map
20112
20113
20114/***/ }),
20115/* 151 */
20116/***/ (function(module, __webpack_exports__, __webpack_require__) {
20117
20118"use strict";
20119__webpack_require__.r(__webpack_exports__);
20120/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; });
20121/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafeSubscriber", function() { return SafeSubscriber; });
20122/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
20123/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(153);
20124/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(154);
20125/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(157);
20126/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(161);
20127/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(155);
20128/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(156);
20129/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
20130
20131
20132
20133
20134
20135
20136
20137var Subscriber = /*@__PURE__*/ (function (_super) {
20138 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subscriber, _super);
20139 function Subscriber(destinationOrNext, error, complete) {
20140 var _this = _super.call(this) || this;
20141 _this.syncErrorValue = null;
20142 _this.syncErrorThrown = false;
20143 _this.syncErrorThrowable = false;
20144 _this.isStopped = false;
20145 switch (arguments.length) {
20146 case 0:
20147 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
20148 break;
20149 case 1:
20150 if (!destinationOrNext) {
20151 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
20152 break;
20153 }
20154 if (typeof destinationOrNext === 'object') {
20155 if (destinationOrNext instanceof Subscriber) {
20156 _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
20157 _this.destination = destinationOrNext;
20158 destinationOrNext.add(_this);
20159 }
20160 else {
20161 _this.syncErrorThrowable = true;
20162 _this.destination = new SafeSubscriber(_this, destinationOrNext);
20163 }
20164 break;
20165 }
20166 default:
20167 _this.syncErrorThrowable = true;
20168 _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
20169 break;
20170 }
20171 return _this;
20172 }
20173 Subscriber.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__["rxSubscriber"]] = function () { return this; };
20174 Subscriber.create = function (next, error, complete) {
20175 var subscriber = new Subscriber(next, error, complete);
20176 subscriber.syncErrorThrowable = false;
20177 return subscriber;
20178 };
20179 Subscriber.prototype.next = function (value) {
20180 if (!this.isStopped) {
20181 this._next(value);
20182 }
20183 };
20184 Subscriber.prototype.error = function (err) {
20185 if (!this.isStopped) {
20186 this.isStopped = true;
20187 this._error(err);
20188 }
20189 };
20190 Subscriber.prototype.complete = function () {
20191 if (!this.isStopped) {
20192 this.isStopped = true;
20193 this._complete();
20194 }
20195 };
20196 Subscriber.prototype.unsubscribe = function () {
20197 if (this.closed) {
20198 return;
20199 }
20200 this.isStopped = true;
20201 _super.prototype.unsubscribe.call(this);
20202 };
20203 Subscriber.prototype._next = function (value) {
20204 this.destination.next(value);
20205 };
20206 Subscriber.prototype._error = function (err) {
20207 this.destination.error(err);
20208 this.unsubscribe();
20209 };
20210 Subscriber.prototype._complete = function () {
20211 this.destination.complete();
20212 this.unsubscribe();
20213 };
20214 Subscriber.prototype._unsubscribeAndRecycle = function () {
20215 var _parentOrParents = this._parentOrParents;
20216 this._parentOrParents = null;
20217 this.unsubscribe();
20218 this.closed = false;
20219 this.isStopped = false;
20220 this._parentOrParents = _parentOrParents;
20221 return this;
20222 };
20223 return Subscriber;
20224}(_Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"]));
20225
20226var SafeSubscriber = /*@__PURE__*/ (function (_super) {
20227 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SafeSubscriber, _super);
20228 function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
20229 var _this = _super.call(this) || this;
20230 _this._parentSubscriber = _parentSubscriber;
20231 var next;
20232 var context = _this;
20233 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(observerOrNext)) {
20234 next = observerOrNext;
20235 }
20236 else if (observerOrNext) {
20237 next = observerOrNext.next;
20238 error = observerOrNext.error;
20239 complete = observerOrNext.complete;
20240 if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]) {
20241 context = Object.create(observerOrNext);
20242 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(context.unsubscribe)) {
20243 _this.add(context.unsubscribe.bind(context));
20244 }
20245 context.unsubscribe = _this.unsubscribe.bind(_this);
20246 }
20247 }
20248 _this._context = context;
20249 _this._next = next;
20250 _this._error = error;
20251 _this._complete = complete;
20252 return _this;
20253 }
20254 SafeSubscriber.prototype.next = function (value) {
20255 if (!this.isStopped && this._next) {
20256 var _parentSubscriber = this._parentSubscriber;
20257 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
20258 this.__tryOrUnsub(this._next, value);
20259 }
20260 else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
20261 this.unsubscribe();
20262 }
20263 }
20264 };
20265 SafeSubscriber.prototype.error = function (err) {
20266 if (!this.isStopped) {
20267 var _parentSubscriber = this._parentSubscriber;
20268 var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling;
20269 if (this._error) {
20270 if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
20271 this.__tryOrUnsub(this._error, err);
20272 this.unsubscribe();
20273 }
20274 else {
20275 this.__tryOrSetError(_parentSubscriber, this._error, err);
20276 this.unsubscribe();
20277 }
20278 }
20279 else if (!_parentSubscriber.syncErrorThrowable) {
20280 this.unsubscribe();
20281 if (useDeprecatedSynchronousErrorHandling) {
20282 throw err;
20283 }
20284 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
20285 }
20286 else {
20287 if (useDeprecatedSynchronousErrorHandling) {
20288 _parentSubscriber.syncErrorValue = err;
20289 _parentSubscriber.syncErrorThrown = true;
20290 }
20291 else {
20292 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
20293 }
20294 this.unsubscribe();
20295 }
20296 }
20297 };
20298 SafeSubscriber.prototype.complete = function () {
20299 var _this = this;
20300 if (!this.isStopped) {
20301 var _parentSubscriber = this._parentSubscriber;
20302 if (this._complete) {
20303 var wrappedComplete = function () { return _this._complete.call(_this._context); };
20304 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
20305 this.__tryOrUnsub(wrappedComplete);
20306 this.unsubscribe();
20307 }
20308 else {
20309 this.__tryOrSetError(_parentSubscriber, wrappedComplete);
20310 this.unsubscribe();
20311 }
20312 }
20313 else {
20314 this.unsubscribe();
20315 }
20316 }
20317 };
20318 SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
20319 try {
20320 fn.call(this._context, value);
20321 }
20322 catch (err) {
20323 this.unsubscribe();
20324 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
20325 throw err;
20326 }
20327 else {
20328 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
20329 }
20330 }
20331 };
20332 SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
20333 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
20334 throw new Error('bad call');
20335 }
20336 try {
20337 fn.call(this._context, value);
20338 }
20339 catch (err) {
20340 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
20341 parent.syncErrorValue = err;
20342 parent.syncErrorThrown = true;
20343 return true;
20344 }
20345 else {
20346 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
20347 return true;
20348 }
20349 }
20350 return false;
20351 };
20352 SafeSubscriber.prototype._unsubscribe = function () {
20353 var _parentSubscriber = this._parentSubscriber;
20354 this._context = null;
20355 this._parentSubscriber = null;
20356 _parentSubscriber.unsubscribe();
20357 };
20358 return SafeSubscriber;
20359}(Subscriber));
20360
20361//# sourceMappingURL=Subscriber.js.map
20362
20363
20364/***/ }),
20365/* 152 */
20366/***/ (function(module, __webpack_exports__, __webpack_require__) {
20367
20368"use strict";
20369__webpack_require__.r(__webpack_exports__);
20370/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
20371/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
20372/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
20373/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
20374/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
20375/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
20376/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
20377/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
20378/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
20379/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
20380/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
20381/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
20382/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
20383/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
20384/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
20385/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
20386/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
20387/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
20388/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
20389/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
20390/*! *****************************************************************************
20391Copyright (c) Microsoft Corporation. All rights reserved.
20392Licensed under the Apache License, Version 2.0 (the "License"); you may not use
20393this file except in compliance with the License. You may obtain a copy of the
20394License at http://www.apache.org/licenses/LICENSE-2.0
20395
20396THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20397KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
20398WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
20399MERCHANTABLITY OR NON-INFRINGEMENT.
20400
20401See the Apache Version 2.0 License for specific language governing permissions
20402and limitations under the License.
20403***************************************************************************** */
20404/* global Reflect, Promise */
20405
20406var extendStatics = function(d, b) {
20407 extendStatics = Object.setPrototypeOf ||
20408 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20409 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20410 return extendStatics(d, b);
20411};
20412
20413function __extends(d, b) {
20414 extendStatics(d, b);
20415 function __() { this.constructor = d; }
20416 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20417}
20418
20419var __assign = function() {
20420 __assign = Object.assign || function __assign(t) {
20421 for (var s, i = 1, n = arguments.length; i < n; i++) {
20422 s = arguments[i];
20423 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
20424 }
20425 return t;
20426 }
20427 return __assign.apply(this, arguments);
20428}
20429
20430function __rest(s, e) {
20431 var t = {};
20432 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
20433 t[p] = s[p];
20434 if (s != null && typeof Object.getOwnPropertySymbols === "function")
20435 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
20436 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20437 t[p[i]] = s[p[i]];
20438 }
20439 return t;
20440}
20441
20442function __decorate(decorators, target, key, desc) {
20443 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20444 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20445 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;
20446 return c > 3 && r && Object.defineProperty(target, key, r), r;
20447}
20448
20449function __param(paramIndex, decorator) {
20450 return function (target, key) { decorator(target, key, paramIndex); }
20451}
20452
20453function __metadata(metadataKey, metadataValue) {
20454 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
20455}
20456
20457function __awaiter(thisArg, _arguments, P, generator) {
20458 return new (P || (P = Promise))(function (resolve, reject) {
20459 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20460 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20461 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
20462 step((generator = generator.apply(thisArg, _arguments || [])).next());
20463 });
20464}
20465
20466function __generator(thisArg, body) {
20467 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
20468 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
20469 function verb(n) { return function (v) { return step([n, v]); }; }
20470 function step(op) {
20471 if (f) throw new TypeError("Generator is already executing.");
20472 while (_) try {
20473 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;
20474 if (y = 0, t) op = [op[0] & 2, t.value];
20475 switch (op[0]) {
20476 case 0: case 1: t = op; break;
20477 case 4: _.label++; return { value: op[1], done: false };
20478 case 5: _.label++; y = op[1]; op = [0]; continue;
20479 case 7: op = _.ops.pop(); _.trys.pop(); continue;
20480 default:
20481 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
20482 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
20483 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
20484 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
20485 if (t[2]) _.ops.pop();
20486 _.trys.pop(); continue;
20487 }
20488 op = body.call(thisArg, _);
20489 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
20490 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
20491 }
20492}
20493
20494function __exportStar(m, exports) {
20495 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
20496}
20497
20498function __values(o) {
20499 var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
20500 if (m) return m.call(o);
20501 return {
20502 next: function () {
20503 if (o && i >= o.length) o = void 0;
20504 return { value: o && o[i++], done: !o };
20505 }
20506 };
20507}
20508
20509function __read(o, n) {
20510 var m = typeof Symbol === "function" && o[Symbol.iterator];
20511 if (!m) return o;
20512 var i = m.call(o), r, ar = [], e;
20513 try {
20514 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
20515 }
20516 catch (error) { e = { error: error }; }
20517 finally {
20518 try {
20519 if (r && !r.done && (m = i["return"])) m.call(i);
20520 }
20521 finally { if (e) throw e.error; }
20522 }
20523 return ar;
20524}
20525
20526function __spread() {
20527 for (var ar = [], i = 0; i < arguments.length; i++)
20528 ar = ar.concat(__read(arguments[i]));
20529 return ar;
20530}
20531
20532function __spreadArrays() {
20533 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
20534 for (var r = Array(s), k = 0, i = 0; i < il; i++)
20535 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
20536 r[k] = a[j];
20537 return r;
20538};
20539
20540function __await(v) {
20541 return this instanceof __await ? (this.v = v, this) : new __await(v);
20542}
20543
20544function __asyncGenerator(thisArg, _arguments, generator) {
20545 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
20546 var g = generator.apply(thisArg, _arguments || []), i, q = [];
20547 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
20548 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); }); }; }
20549 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
20550 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
20551 function fulfill(value) { resume("next", value); }
20552 function reject(value) { resume("throw", value); }
20553 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
20554}
20555
20556function __asyncDelegator(o) {
20557 var i, p;
20558 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
20559 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; }
20560}
20561
20562function __asyncValues(o) {
20563 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
20564 var m = o[Symbol.asyncIterator], i;
20565 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);
20566 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); }); }; }
20567 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
20568}
20569
20570function __makeTemplateObject(cooked, raw) {
20571 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
20572 return cooked;
20573};
20574
20575function __importStar(mod) {
20576 if (mod && mod.__esModule) return mod;
20577 var result = {};
20578 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
20579 result.default = mod;
20580 return result;
20581}
20582
20583function __importDefault(mod) {
20584 return (mod && mod.__esModule) ? mod : { default: mod };
20585}
20586
20587
20588/***/ }),
20589/* 153 */
20590/***/ (function(module, __webpack_exports__, __webpack_require__) {
20591
20592"use strict";
20593__webpack_require__.r(__webpack_exports__);
20594/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; });
20595/** PURE_IMPORTS_START PURE_IMPORTS_END */
20596function isFunction(x) {
20597 return typeof x === 'function';
20598}
20599//# sourceMappingURL=isFunction.js.map
20600
20601
20602/***/ }),
20603/* 154 */
20604/***/ (function(module, __webpack_exports__, __webpack_require__) {
20605
20606"use strict";
20607__webpack_require__.r(__webpack_exports__);
20608/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
20609/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(155);
20610/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
20611/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
20612
20613
20614var empty = {
20615 closed: true,
20616 next: function (value) { },
20617 error: function (err) {
20618 if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) {
20619 throw err;
20620 }
20621 else {
20622 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err);
20623 }
20624 },
20625 complete: function () { }
20626};
20627//# sourceMappingURL=Observer.js.map
20628
20629
20630/***/ }),
20631/* 155 */
20632/***/ (function(module, __webpack_exports__, __webpack_require__) {
20633
20634"use strict";
20635__webpack_require__.r(__webpack_exports__);
20636/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; });
20637/** PURE_IMPORTS_START PURE_IMPORTS_END */
20638var _enable_super_gross_mode_that_will_cause_bad_things = false;
20639var config = {
20640 Promise: undefined,
20641 set useDeprecatedSynchronousErrorHandling(value) {
20642 if (value) {
20643 var error = /*@__PURE__*/ new Error();
20644 /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
20645 }
20646 else if (_enable_super_gross_mode_that_will_cause_bad_things) {
20647 /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
20648 }
20649 _enable_super_gross_mode_that_will_cause_bad_things = value;
20650 },
20651 get useDeprecatedSynchronousErrorHandling() {
20652 return _enable_super_gross_mode_that_will_cause_bad_things;
20653 },
20654};
20655//# sourceMappingURL=config.js.map
20656
20657
20658/***/ }),
20659/* 156 */
20660/***/ (function(module, __webpack_exports__, __webpack_require__) {
20661
20662"use strict";
20663__webpack_require__.r(__webpack_exports__);
20664/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; });
20665/** PURE_IMPORTS_START PURE_IMPORTS_END */
20666function hostReportError(err) {
20667 setTimeout(function () { throw err; }, 0);
20668}
20669//# sourceMappingURL=hostReportError.js.map
20670
20671
20672/***/ }),
20673/* 157 */
20674/***/ (function(module, __webpack_exports__, __webpack_require__) {
20675
20676"use strict";
20677__webpack_require__.r(__webpack_exports__);
20678/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription; });
20679/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(158);
20680/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(159);
20681/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(153);
20682/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(160);
20683/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
20684
20685
20686
20687
20688var Subscription = /*@__PURE__*/ (function () {
20689 function Subscription(unsubscribe) {
20690 this.closed = false;
20691 this._parentOrParents = null;
20692 this._subscriptions = null;
20693 if (unsubscribe) {
20694 this._unsubscribe = unsubscribe;
20695 }
20696 }
20697 Subscription.prototype.unsubscribe = function () {
20698 var errors;
20699 if (this.closed) {
20700 return;
20701 }
20702 var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
20703 this.closed = true;
20704 this._parentOrParents = null;
20705 this._subscriptions = null;
20706 if (_parentOrParents instanceof Subscription) {
20707 _parentOrParents.remove(this);
20708 }
20709 else if (_parentOrParents !== null) {
20710 for (var index = 0; index < _parentOrParents.length; ++index) {
20711 var parent_1 = _parentOrParents[index];
20712 parent_1.remove(this);
20713 }
20714 }
20715 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) {
20716 try {
20717 _unsubscribe.call(this);
20718 }
20719 catch (e) {
20720 errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? flattenUnsubscriptionErrors(e.errors) : [e];
20721 }
20722 }
20723 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) {
20724 var index = -1;
20725 var len = _subscriptions.length;
20726 while (++index < len) {
20727 var sub = _subscriptions[index];
20728 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) {
20729 try {
20730 sub.unsubscribe();
20731 }
20732 catch (e) {
20733 errors = errors || [];
20734 if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) {
20735 errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
20736 }
20737 else {
20738 errors.push(e);
20739 }
20740 }
20741 }
20742 }
20743 }
20744 if (errors) {
20745 throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"](errors);
20746 }
20747 };
20748 Subscription.prototype.add = function (teardown) {
20749 var subscription = teardown;
20750 if (!teardown) {
20751 return Subscription.EMPTY;
20752 }
20753 switch (typeof teardown) {
20754 case 'function':
20755 subscription = new Subscription(teardown);
20756 case 'object':
20757 if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
20758 return subscription;
20759 }
20760 else if (this.closed) {
20761 subscription.unsubscribe();
20762 return subscription;
20763 }
20764 else if (!(subscription instanceof Subscription)) {
20765 var tmp = subscription;
20766 subscription = new Subscription();
20767 subscription._subscriptions = [tmp];
20768 }
20769 break;
20770 default: {
20771 throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
20772 }
20773 }
20774 var _parentOrParents = subscription._parentOrParents;
20775 if (_parentOrParents === null) {
20776 subscription._parentOrParents = this;
20777 }
20778 else if (_parentOrParents instanceof Subscription) {
20779 if (_parentOrParents === this) {
20780 return subscription;
20781 }
20782 subscription._parentOrParents = [_parentOrParents, this];
20783 }
20784 else if (_parentOrParents.indexOf(this) === -1) {
20785 _parentOrParents.push(this);
20786 }
20787 else {
20788 return subscription;
20789 }
20790 var subscriptions = this._subscriptions;
20791 if (subscriptions === null) {
20792 this._subscriptions = [subscription];
20793 }
20794 else {
20795 subscriptions.push(subscription);
20796 }
20797 return subscription;
20798 };
20799 Subscription.prototype.remove = function (subscription) {
20800 var subscriptions = this._subscriptions;
20801 if (subscriptions) {
20802 var subscriptionIndex = subscriptions.indexOf(subscription);
20803 if (subscriptionIndex !== -1) {
20804 subscriptions.splice(subscriptionIndex, 1);
20805 }
20806 }
20807 };
20808 Subscription.EMPTY = (function (empty) {
20809 empty.closed = true;
20810 return empty;
20811 }(new Subscription()));
20812 return Subscription;
20813}());
20814
20815function flattenUnsubscriptionErrors(errors) {
20816 return errors.reduce(function (errs, err) { return errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) ? err.errors : err); }, []);
20817}
20818//# sourceMappingURL=Subscription.js.map
20819
20820
20821/***/ }),
20822/* 158 */
20823/***/ (function(module, __webpack_exports__, __webpack_require__) {
20824
20825"use strict";
20826__webpack_require__.r(__webpack_exports__);
20827/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; });
20828/** PURE_IMPORTS_START PURE_IMPORTS_END */
20829var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
20830//# sourceMappingURL=isArray.js.map
20831
20832
20833/***/ }),
20834/* 159 */
20835/***/ (function(module, __webpack_exports__, __webpack_require__) {
20836
20837"use strict";
20838__webpack_require__.r(__webpack_exports__);
20839/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
20840/** PURE_IMPORTS_START PURE_IMPORTS_END */
20841function isObject(x) {
20842 return x !== null && typeof x === 'object';
20843}
20844//# sourceMappingURL=isObject.js.map
20845
20846
20847/***/ }),
20848/* 160 */
20849/***/ (function(module, __webpack_exports__, __webpack_require__) {
20850
20851"use strict";
20852__webpack_require__.r(__webpack_exports__);
20853/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; });
20854/** PURE_IMPORTS_START PURE_IMPORTS_END */
20855function UnsubscriptionErrorImpl(errors) {
20856 Error.call(this);
20857 this.message = errors ?
20858 errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
20859 this.name = 'UnsubscriptionError';
20860 this.errors = errors;
20861 return this;
20862}
20863UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
20864var UnsubscriptionError = UnsubscriptionErrorImpl;
20865//# sourceMappingURL=UnsubscriptionError.js.map
20866
20867
20868/***/ }),
20869/* 161 */
20870/***/ (function(module, __webpack_exports__, __webpack_require__) {
20871
20872"use strict";
20873__webpack_require__.r(__webpack_exports__);
20874/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rxSubscriber", function() { return rxSubscriber; });
20875/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function() { return $$rxSubscriber; });
20876/** PURE_IMPORTS_START PURE_IMPORTS_END */
20877var rxSubscriber = typeof Symbol === 'function'
20878 ? /*@__PURE__*/ Symbol('rxSubscriber')
20879 : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();
20880var $$rxSubscriber = rxSubscriber;
20881//# sourceMappingURL=rxSubscriber.js.map
20882
20883
20884/***/ }),
20885/* 162 */
20886/***/ (function(module, __webpack_exports__, __webpack_require__) {
20887
20888"use strict";
20889__webpack_require__.r(__webpack_exports__);
20890/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; });
20891/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
20892/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(161);
20893/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(154);
20894/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
20895
20896
20897
20898function toSubscriber(nextOrObserver, error, complete) {
20899 if (nextOrObserver) {
20900 if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
20901 return nextOrObserver;
20902 }
20903 if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) {
20904 return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]();
20905 }
20906 }
20907 if (!nextOrObserver && !error && !complete) {
20908 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]);
20909 }
20910 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete);
20911}
20912//# sourceMappingURL=toSubscriber.js.map
20913
20914
20915/***/ }),
20916/* 163 */
20917/***/ (function(module, __webpack_exports__, __webpack_require__) {
20918
20919"use strict";
20920__webpack_require__.r(__webpack_exports__);
20921/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; });
20922/** PURE_IMPORTS_START PURE_IMPORTS_END */
20923var observable = typeof Symbol === 'function' && Symbol.observable || '@@observable';
20924//# sourceMappingURL=observable.js.map
20925
20926
20927/***/ }),
20928/* 164 */
20929/***/ (function(module, __webpack_exports__, __webpack_require__) {
20930
20931"use strict";
20932__webpack_require__.r(__webpack_exports__);
20933/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
20934/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; });
20935/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(165);
20936/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */
20937
20938function pipe() {
20939 var fns = [];
20940 for (var _i = 0; _i < arguments.length; _i++) {
20941 fns[_i] = arguments[_i];
20942 }
20943 return pipeFromArray(fns);
20944}
20945function pipeFromArray(fns) {
20946 if (!fns) {
20947 return _noop__WEBPACK_IMPORTED_MODULE_0__["noop"];
20948 }
20949 if (fns.length === 1) {
20950 return fns[0];
20951 }
20952 return function piped(input) {
20953 return fns.reduce(function (prev, fn) { return fn(prev); }, input);
20954 };
20955}
20956//# sourceMappingURL=pipe.js.map
20957
20958
20959/***/ }),
20960/* 165 */
20961/***/ (function(module, __webpack_exports__, __webpack_require__) {
20962
20963"use strict";
20964__webpack_require__.r(__webpack_exports__);
20965/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
20966/** PURE_IMPORTS_START PURE_IMPORTS_END */
20967function noop() { }
20968//# sourceMappingURL=noop.js.map
20969
20970
20971/***/ }),
20972/* 166 */
20973/***/ (function(module, __webpack_exports__, __webpack_require__) {
20974
20975"use strict";
20976__webpack_require__.r(__webpack_exports__);
20977/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; });
20978/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; });
20979/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
20980/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
20981/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(149);
20982/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(151);
20983/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(157);
20984/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(170);
20985/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
20986
20987
20988
20989
20990
20991
20992var ConnectableObservable = /*@__PURE__*/ (function (_super) {
20993 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableObservable, _super);
20994 function ConnectableObservable(source, subjectFactory) {
20995 var _this = _super.call(this) || this;
20996 _this.source = source;
20997 _this.subjectFactory = subjectFactory;
20998 _this._refCount = 0;
20999 _this._isComplete = false;
21000 return _this;
21001 }
21002 ConnectableObservable.prototype._subscribe = function (subscriber) {
21003 return this.getSubject().subscribe(subscriber);
21004 };
21005 ConnectableObservable.prototype.getSubject = function () {
21006 var subject = this._subject;
21007 if (!subject || subject.isStopped) {
21008 this._subject = this.subjectFactory();
21009 }
21010 return this._subject;
21011 };
21012 ConnectableObservable.prototype.connect = function () {
21013 var connection = this._connection;
21014 if (!connection) {
21015 this._isComplete = false;
21016 connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"]();
21017 connection.add(this.source
21018 .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
21019 if (connection.closed) {
21020 this._connection = null;
21021 connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
21022 }
21023 }
21024 return connection;
21025 };
21026 ConnectableObservable.prototype.refCount = function () {
21027 return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__["refCount"])()(this);
21028 };
21029 return ConnectableObservable;
21030}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
21031
21032var connectableProto = ConnectableObservable.prototype;
21033var connectableObservableDescriptor = {
21034 operator: { value: null },
21035 _refCount: { value: 0, writable: true },
21036 _subject: { value: null, writable: true },
21037 _connection: { value: null, writable: true },
21038 _subscribe: { value: connectableProto._subscribe },
21039 _isComplete: { value: connectableProto._isComplete, writable: true },
21040 getSubject: { value: connectableProto.getSubject },
21041 connect: { value: connectableProto.connect },
21042 refCount: { value: connectableProto.refCount }
21043};
21044var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
21045 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableSubscriber, _super);
21046 function ConnectableSubscriber(destination, connectable) {
21047 var _this = _super.call(this, destination) || this;
21048 _this.connectable = connectable;
21049 return _this;
21050 }
21051 ConnectableSubscriber.prototype._error = function (err) {
21052 this._unsubscribe();
21053 _super.prototype._error.call(this, err);
21054 };
21055 ConnectableSubscriber.prototype._complete = function () {
21056 this.connectable._isComplete = true;
21057 this._unsubscribe();
21058 _super.prototype._complete.call(this);
21059 };
21060 ConnectableSubscriber.prototype._unsubscribe = function () {
21061 var connectable = this.connectable;
21062 if (connectable) {
21063 this.connectable = null;
21064 var connection = connectable._connection;
21065 connectable._refCount = 0;
21066 connectable._subject = null;
21067 connectable._connection = null;
21068 if (connection) {
21069 connection.unsubscribe();
21070 }
21071 }
21072 };
21073 return ConnectableSubscriber;
21074}(_Subject__WEBPACK_IMPORTED_MODULE_1__["SubjectSubscriber"]));
21075var RefCountOperator = /*@__PURE__*/ (function () {
21076 function RefCountOperator(connectable) {
21077 this.connectable = connectable;
21078 }
21079 RefCountOperator.prototype.call = function (subscriber, source) {
21080 var connectable = this.connectable;
21081 connectable._refCount++;
21082 var refCounter = new RefCountSubscriber(subscriber, connectable);
21083 var subscription = source.subscribe(refCounter);
21084 if (!refCounter.closed) {
21085 refCounter.connection = connectable.connect();
21086 }
21087 return subscription;
21088 };
21089 return RefCountOperator;
21090}());
21091var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
21092 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
21093 function RefCountSubscriber(destination, connectable) {
21094 var _this = _super.call(this, destination) || this;
21095 _this.connectable = connectable;
21096 return _this;
21097 }
21098 RefCountSubscriber.prototype._unsubscribe = function () {
21099 var connectable = this.connectable;
21100 if (!connectable) {
21101 this.connection = null;
21102 return;
21103 }
21104 this.connectable = null;
21105 var refCount = connectable._refCount;
21106 if (refCount <= 0) {
21107 this.connection = null;
21108 return;
21109 }
21110 connectable._refCount = refCount - 1;
21111 if (refCount > 1) {
21112 this.connection = null;
21113 return;
21114 }
21115 var connection = this.connection;
21116 var sharedConnection = connectable._connection;
21117 this.connection = null;
21118 if (sharedConnection && (!connection || sharedConnection === connection)) {
21119 sharedConnection.unsubscribe();
21120 }
21121 };
21122 return RefCountSubscriber;
21123}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
21124//# sourceMappingURL=ConnectableObservable.js.map
21125
21126
21127/***/ }),
21128/* 167 */
21129/***/ (function(module, __webpack_exports__, __webpack_require__) {
21130
21131"use strict";
21132__webpack_require__.r(__webpack_exports__);
21133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; });
21134/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; });
21135/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; });
21136/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
21137/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(149);
21138/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(151);
21139/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(157);
21140/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(168);
21141/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(169);
21142/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(161);
21143/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
21144
21145
21146
21147
21148
21149
21150
21151var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
21152 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscriber, _super);
21153 function SubjectSubscriber(destination) {
21154 var _this = _super.call(this, destination) || this;
21155 _this.destination = destination;
21156 return _this;
21157 }
21158 return SubjectSubscriber;
21159}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
21160
21161var Subject = /*@__PURE__*/ (function (_super) {
21162 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subject, _super);
21163 function Subject() {
21164 var _this = _super.call(this) || this;
21165 _this.observers = [];
21166 _this.closed = false;
21167 _this.isStopped = false;
21168 _this.hasError = false;
21169 _this.thrownError = null;
21170 return _this;
21171 }
21172 Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__["rxSubscriber"]] = function () {
21173 return new SubjectSubscriber(this);
21174 };
21175 Subject.prototype.lift = function (operator) {
21176 var subject = new AnonymousSubject(this, this);
21177 subject.operator = operator;
21178 return subject;
21179 };
21180 Subject.prototype.next = function (value) {
21181 if (this.closed) {
21182 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21183 }
21184 if (!this.isStopped) {
21185 var observers = this.observers;
21186 var len = observers.length;
21187 var copy = observers.slice();
21188 for (var i = 0; i < len; i++) {
21189 copy[i].next(value);
21190 }
21191 }
21192 };
21193 Subject.prototype.error = function (err) {
21194 if (this.closed) {
21195 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21196 }
21197 this.hasError = true;
21198 this.thrownError = err;
21199 this.isStopped = true;
21200 var observers = this.observers;
21201 var len = observers.length;
21202 var copy = observers.slice();
21203 for (var i = 0; i < len; i++) {
21204 copy[i].error(err);
21205 }
21206 this.observers.length = 0;
21207 };
21208 Subject.prototype.complete = function () {
21209 if (this.closed) {
21210 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21211 }
21212 this.isStopped = true;
21213 var observers = this.observers;
21214 var len = observers.length;
21215 var copy = observers.slice();
21216 for (var i = 0; i < len; i++) {
21217 copy[i].complete();
21218 }
21219 this.observers.length = 0;
21220 };
21221 Subject.prototype.unsubscribe = function () {
21222 this.isStopped = true;
21223 this.closed = true;
21224 this.observers = null;
21225 };
21226 Subject.prototype._trySubscribe = function (subscriber) {
21227 if (this.closed) {
21228 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21229 }
21230 else {
21231 return _super.prototype._trySubscribe.call(this, subscriber);
21232 }
21233 };
21234 Subject.prototype._subscribe = function (subscriber) {
21235 if (this.closed) {
21236 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21237 }
21238 else if (this.hasError) {
21239 subscriber.error(this.thrownError);
21240 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
21241 }
21242 else if (this.isStopped) {
21243 subscriber.complete();
21244 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
21245 }
21246 else {
21247 this.observers.push(subscriber);
21248 return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
21249 }
21250 };
21251 Subject.prototype.asObservable = function () {
21252 var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
21253 observable.source = this;
21254 return observable;
21255 };
21256 Subject.create = function (destination, source) {
21257 return new AnonymousSubject(destination, source);
21258 };
21259 return Subject;
21260}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
21261
21262var AnonymousSubject = /*@__PURE__*/ (function (_super) {
21263 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnonymousSubject, _super);
21264 function AnonymousSubject(destination, source) {
21265 var _this = _super.call(this) || this;
21266 _this.destination = destination;
21267 _this.source = source;
21268 return _this;
21269 }
21270 AnonymousSubject.prototype.next = function (value) {
21271 var destination = this.destination;
21272 if (destination && destination.next) {
21273 destination.next(value);
21274 }
21275 };
21276 AnonymousSubject.prototype.error = function (err) {
21277 var destination = this.destination;
21278 if (destination && destination.error) {
21279 this.destination.error(err);
21280 }
21281 };
21282 AnonymousSubject.prototype.complete = function () {
21283 var destination = this.destination;
21284 if (destination && destination.complete) {
21285 this.destination.complete();
21286 }
21287 };
21288 AnonymousSubject.prototype._subscribe = function (subscriber) {
21289 var source = this.source;
21290 if (source) {
21291 return this.source.subscribe(subscriber);
21292 }
21293 else {
21294 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
21295 }
21296 };
21297 return AnonymousSubject;
21298}(Subject));
21299
21300//# sourceMappingURL=Subject.js.map
21301
21302
21303/***/ }),
21304/* 168 */
21305/***/ (function(module, __webpack_exports__, __webpack_require__) {
21306
21307"use strict";
21308__webpack_require__.r(__webpack_exports__);
21309/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
21310/** PURE_IMPORTS_START PURE_IMPORTS_END */
21311function ObjectUnsubscribedErrorImpl() {
21312 Error.call(this);
21313 this.message = 'object unsubscribed';
21314 this.name = 'ObjectUnsubscribedError';
21315 return this;
21316}
21317ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
21318var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
21319//# sourceMappingURL=ObjectUnsubscribedError.js.map
21320
21321
21322/***/ }),
21323/* 169 */
21324/***/ (function(module, __webpack_exports__, __webpack_require__) {
21325
21326"use strict";
21327__webpack_require__.r(__webpack_exports__);
21328/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; });
21329/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
21330/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
21331/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
21332
21333
21334var SubjectSubscription = /*@__PURE__*/ (function (_super) {
21335 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscription, _super);
21336 function SubjectSubscription(subject, subscriber) {
21337 var _this = _super.call(this) || this;
21338 _this.subject = subject;
21339 _this.subscriber = subscriber;
21340 _this.closed = false;
21341 return _this;
21342 }
21343 SubjectSubscription.prototype.unsubscribe = function () {
21344 if (this.closed) {
21345 return;
21346 }
21347 this.closed = true;
21348 var subject = this.subject;
21349 var observers = subject.observers;
21350 this.subject = null;
21351 if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
21352 return;
21353 }
21354 var subscriberIndex = observers.indexOf(this.subscriber);
21355 if (subscriberIndex !== -1) {
21356 observers.splice(subscriberIndex, 1);
21357 }
21358 };
21359 return SubjectSubscription;
21360}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
21361
21362//# sourceMappingURL=SubjectSubscription.js.map
21363
21364
21365/***/ }),
21366/* 170 */
21367/***/ (function(module, __webpack_exports__, __webpack_require__) {
21368
21369"use strict";
21370__webpack_require__.r(__webpack_exports__);
21371/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; });
21372/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
21373/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
21374/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
21375
21376
21377function refCount() {
21378 return function refCountOperatorFunction(source) {
21379 return source.lift(new RefCountOperator(source));
21380 };
21381}
21382var RefCountOperator = /*@__PURE__*/ (function () {
21383 function RefCountOperator(connectable) {
21384 this.connectable = connectable;
21385 }
21386 RefCountOperator.prototype.call = function (subscriber, source) {
21387 var connectable = this.connectable;
21388 connectable._refCount++;
21389 var refCounter = new RefCountSubscriber(subscriber, connectable);
21390 var subscription = source.subscribe(refCounter);
21391 if (!refCounter.closed) {
21392 refCounter.connection = connectable.connect();
21393 }
21394 return subscription;
21395 };
21396 return RefCountOperator;
21397}());
21398var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
21399 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
21400 function RefCountSubscriber(destination, connectable) {
21401 var _this = _super.call(this, destination) || this;
21402 _this.connectable = connectable;
21403 return _this;
21404 }
21405 RefCountSubscriber.prototype._unsubscribe = function () {
21406 var connectable = this.connectable;
21407 if (!connectable) {
21408 this.connection = null;
21409 return;
21410 }
21411 this.connectable = null;
21412 var refCount = connectable._refCount;
21413 if (refCount <= 0) {
21414 this.connection = null;
21415 return;
21416 }
21417 connectable._refCount = refCount - 1;
21418 if (refCount > 1) {
21419 this.connection = null;
21420 return;
21421 }
21422 var connection = this.connection;
21423 var sharedConnection = connectable._connection;
21424 this.connection = null;
21425 if (sharedConnection && (!connection || sharedConnection === connection)) {
21426 sharedConnection.unsubscribe();
21427 }
21428 };
21429 return RefCountSubscriber;
21430}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
21431//# sourceMappingURL=refCount.js.map
21432
21433
21434/***/ }),
21435/* 171 */
21436/***/ (function(module, __webpack_exports__, __webpack_require__) {
21437
21438"use strict";
21439__webpack_require__.r(__webpack_exports__);
21440/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
21441/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; });
21442/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
21443/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
21444/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(157);
21445/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(149);
21446/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(167);
21447/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
21448
21449
21450
21451
21452
21453function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
21454 return function (source) {
21455 return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
21456 };
21457}
21458var GroupByOperator = /*@__PURE__*/ (function () {
21459 function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
21460 this.keySelector = keySelector;
21461 this.elementSelector = elementSelector;
21462 this.durationSelector = durationSelector;
21463 this.subjectSelector = subjectSelector;
21464 }
21465 GroupByOperator.prototype.call = function (subscriber, source) {
21466 return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
21467 };
21468 return GroupByOperator;
21469}());
21470var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
21471 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupBySubscriber, _super);
21472 function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
21473 var _this = _super.call(this, destination) || this;
21474 _this.keySelector = keySelector;
21475 _this.elementSelector = elementSelector;
21476 _this.durationSelector = durationSelector;
21477 _this.subjectSelector = subjectSelector;
21478 _this.groups = null;
21479 _this.attemptedToUnsubscribe = false;
21480 _this.count = 0;
21481 return _this;
21482 }
21483 GroupBySubscriber.prototype._next = function (value) {
21484 var key;
21485 try {
21486 key = this.keySelector(value);
21487 }
21488 catch (err) {
21489 this.error(err);
21490 return;
21491 }
21492 this._group(value, key);
21493 };
21494 GroupBySubscriber.prototype._group = function (value, key) {
21495 var groups = this.groups;
21496 if (!groups) {
21497 groups = this.groups = new Map();
21498 }
21499 var group = groups.get(key);
21500 var element;
21501 if (this.elementSelector) {
21502 try {
21503 element = this.elementSelector(value);
21504 }
21505 catch (err) {
21506 this.error(err);
21507 }
21508 }
21509 else {
21510 element = value;
21511 }
21512 if (!group) {
21513 group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]());
21514 groups.set(key, group);
21515 var groupedObservable = new GroupedObservable(key, group, this);
21516 this.destination.next(groupedObservable);
21517 if (this.durationSelector) {
21518 var duration = void 0;
21519 try {
21520 duration = this.durationSelector(new GroupedObservable(key, group));
21521 }
21522 catch (err) {
21523 this.error(err);
21524 return;
21525 }
21526 this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
21527 }
21528 }
21529 if (!group.closed) {
21530 group.next(element);
21531 }
21532 };
21533 GroupBySubscriber.prototype._error = function (err) {
21534 var groups = this.groups;
21535 if (groups) {
21536 groups.forEach(function (group, key) {
21537 group.error(err);
21538 });
21539 groups.clear();
21540 }
21541 this.destination.error(err);
21542 };
21543 GroupBySubscriber.prototype._complete = function () {
21544 var groups = this.groups;
21545 if (groups) {
21546 groups.forEach(function (group, key) {
21547 group.complete();
21548 });
21549 groups.clear();
21550 }
21551 this.destination.complete();
21552 };
21553 GroupBySubscriber.prototype.removeGroup = function (key) {
21554 this.groups.delete(key);
21555 };
21556 GroupBySubscriber.prototype.unsubscribe = function () {
21557 if (!this.closed) {
21558 this.attemptedToUnsubscribe = true;
21559 if (this.count === 0) {
21560 _super.prototype.unsubscribe.call(this);
21561 }
21562 }
21563 };
21564 return GroupBySubscriber;
21565}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
21566var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
21567 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupDurationSubscriber, _super);
21568 function GroupDurationSubscriber(key, group, parent) {
21569 var _this = _super.call(this, group) || this;
21570 _this.key = key;
21571 _this.group = group;
21572 _this.parent = parent;
21573 return _this;
21574 }
21575 GroupDurationSubscriber.prototype._next = function (value) {
21576 this.complete();
21577 };
21578 GroupDurationSubscriber.prototype._unsubscribe = function () {
21579 var _a = this, parent = _a.parent, key = _a.key;
21580 this.key = this.parent = null;
21581 if (parent) {
21582 parent.removeGroup(key);
21583 }
21584 };
21585 return GroupDurationSubscriber;
21586}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
21587var GroupedObservable = /*@__PURE__*/ (function (_super) {
21588 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupedObservable, _super);
21589 function GroupedObservable(key, groupSubject, refCountSubscription) {
21590 var _this = _super.call(this) || this;
21591 _this.key = key;
21592 _this.groupSubject = groupSubject;
21593 _this.refCountSubscription = refCountSubscription;
21594 return _this;
21595 }
21596 GroupedObservable.prototype._subscribe = function (subscriber) {
21597 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
21598 var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
21599 if (refCountSubscription && !refCountSubscription.closed) {
21600 subscription.add(new InnerRefCountSubscription(refCountSubscription));
21601 }
21602 subscription.add(groupSubject.subscribe(subscriber));
21603 return subscription;
21604 };
21605 return GroupedObservable;
21606}(_Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]));
21607
21608var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
21609 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerRefCountSubscription, _super);
21610 function InnerRefCountSubscription(parent) {
21611 var _this = _super.call(this) || this;
21612 _this.parent = parent;
21613 parent.count++;
21614 return _this;
21615 }
21616 InnerRefCountSubscription.prototype.unsubscribe = function () {
21617 var parent = this.parent;
21618 if (!parent.closed && !this.closed) {
21619 _super.prototype.unsubscribe.call(this);
21620 parent.count -= 1;
21621 if (parent.count === 0 && parent.attemptedToUnsubscribe) {
21622 parent.unsubscribe();
21623 }
21624 }
21625 };
21626 return InnerRefCountSubscription;
21627}(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]));
21628//# sourceMappingURL=groupBy.js.map
21629
21630
21631/***/ }),
21632/* 172 */
21633/***/ (function(module, __webpack_exports__, __webpack_require__) {
21634
21635"use strict";
21636__webpack_require__.r(__webpack_exports__);
21637/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; });
21638/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
21639/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
21640/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
21641/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
21642
21643
21644
21645var BehaviorSubject = /*@__PURE__*/ (function (_super) {
21646 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BehaviorSubject, _super);
21647 function BehaviorSubject(_value) {
21648 var _this = _super.call(this) || this;
21649 _this._value = _value;
21650 return _this;
21651 }
21652 Object.defineProperty(BehaviorSubject.prototype, "value", {
21653 get: function () {
21654 return this.getValue();
21655 },
21656 enumerable: true,
21657 configurable: true
21658 });
21659 BehaviorSubject.prototype._subscribe = function (subscriber) {
21660 var subscription = _super.prototype._subscribe.call(this, subscriber);
21661 if (subscription && !subscription.closed) {
21662 subscriber.next(this._value);
21663 }
21664 return subscription;
21665 };
21666 BehaviorSubject.prototype.getValue = function () {
21667 if (this.hasError) {
21668 throw this.thrownError;
21669 }
21670 else if (this.closed) {
21671 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__["ObjectUnsubscribedError"]();
21672 }
21673 else {
21674 return this._value;
21675 }
21676 };
21677 BehaviorSubject.prototype.next = function (value) {
21678 _super.prototype.next.call(this, this._value = value);
21679 };
21680 return BehaviorSubject;
21681}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
21682
21683//# sourceMappingURL=BehaviorSubject.js.map
21684
21685
21686/***/ }),
21687/* 173 */
21688/***/ (function(module, __webpack_exports__, __webpack_require__) {
21689
21690"use strict";
21691__webpack_require__.r(__webpack_exports__);
21692/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; });
21693/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
21694/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
21695/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(174);
21696/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(157);
21697/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(181);
21698/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(168);
21699/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(169);
21700/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
21701
21702
21703
21704
21705
21706
21707
21708var ReplaySubject = /*@__PURE__*/ (function (_super) {
21709 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ReplaySubject, _super);
21710 function ReplaySubject(bufferSize, windowTime, scheduler) {
21711 if (bufferSize === void 0) {
21712 bufferSize = Number.POSITIVE_INFINITY;
21713 }
21714 if (windowTime === void 0) {
21715 windowTime = Number.POSITIVE_INFINITY;
21716 }
21717 var _this = _super.call(this) || this;
21718 _this.scheduler = scheduler;
21719 _this._events = [];
21720 _this._infiniteTimeWindow = false;
21721 _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
21722 _this._windowTime = windowTime < 1 ? 1 : windowTime;
21723 if (windowTime === Number.POSITIVE_INFINITY) {
21724 _this._infiniteTimeWindow = true;
21725 _this.next = _this.nextInfiniteTimeWindow;
21726 }
21727 else {
21728 _this.next = _this.nextTimeWindow;
21729 }
21730 return _this;
21731 }
21732 ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
21733 var _events = this._events;
21734 _events.push(value);
21735 if (_events.length > this._bufferSize) {
21736 _events.shift();
21737 }
21738 _super.prototype.next.call(this, value);
21739 };
21740 ReplaySubject.prototype.nextTimeWindow = function (value) {
21741 this._events.push(new ReplayEvent(this._getNow(), value));
21742 this._trimBufferThenGetEvents();
21743 _super.prototype.next.call(this, value);
21744 };
21745 ReplaySubject.prototype._subscribe = function (subscriber) {
21746 var _infiniteTimeWindow = this._infiniteTimeWindow;
21747 var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
21748 var scheduler = this.scheduler;
21749 var len = _events.length;
21750 var subscription;
21751 if (this.closed) {
21752 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__["ObjectUnsubscribedError"]();
21753 }
21754 else if (this.isStopped || this.hasError) {
21755 subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
21756 }
21757 else {
21758 this.observers.push(subscriber);
21759 subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__["SubjectSubscription"](this, subscriber);
21760 }
21761 if (scheduler) {
21762 subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__["ObserveOnSubscriber"](subscriber, scheduler));
21763 }
21764 if (_infiniteTimeWindow) {
21765 for (var i = 0; i < len && !subscriber.closed; i++) {
21766 subscriber.next(_events[i]);
21767 }
21768 }
21769 else {
21770 for (var i = 0; i < len && !subscriber.closed; i++) {
21771 subscriber.next(_events[i].value);
21772 }
21773 }
21774 if (this.hasError) {
21775 subscriber.error(this.thrownError);
21776 }
21777 else if (this.isStopped) {
21778 subscriber.complete();
21779 }
21780 return subscription;
21781 };
21782 ReplaySubject.prototype._getNow = function () {
21783 return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__["queue"]).now();
21784 };
21785 ReplaySubject.prototype._trimBufferThenGetEvents = function () {
21786 var now = this._getNow();
21787 var _bufferSize = this._bufferSize;
21788 var _windowTime = this._windowTime;
21789 var _events = this._events;
21790 var eventsCount = _events.length;
21791 var spliceCount = 0;
21792 while (spliceCount < eventsCount) {
21793 if ((now - _events[spliceCount].time) < _windowTime) {
21794 break;
21795 }
21796 spliceCount++;
21797 }
21798 if (eventsCount > _bufferSize) {
21799 spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
21800 }
21801 if (spliceCount > 0) {
21802 _events.splice(0, spliceCount);
21803 }
21804 return _events;
21805 };
21806 return ReplaySubject;
21807}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
21808
21809var ReplayEvent = /*@__PURE__*/ (function () {
21810 function ReplayEvent(time, value) {
21811 this.time = time;
21812 this.value = value;
21813 }
21814 return ReplayEvent;
21815}());
21816//# sourceMappingURL=ReplaySubject.js.map
21817
21818
21819/***/ }),
21820/* 174 */
21821/***/ (function(module, __webpack_exports__, __webpack_require__) {
21822
21823"use strict";
21824__webpack_require__.r(__webpack_exports__);
21825/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; });
21826/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(175);
21827/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
21828/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
21829
21830
21831var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
21832//# sourceMappingURL=queue.js.map
21833
21834
21835/***/ }),
21836/* 175 */
21837/***/ (function(module, __webpack_exports__, __webpack_require__) {
21838
21839"use strict";
21840__webpack_require__.r(__webpack_exports__);
21841/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; });
21842/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
21843/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
21844/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
21845
21846
21847var QueueAction = /*@__PURE__*/ (function (_super) {
21848 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueAction, _super);
21849 function QueueAction(scheduler, work) {
21850 var _this = _super.call(this, scheduler, work) || this;
21851 _this.scheduler = scheduler;
21852 _this.work = work;
21853 return _this;
21854 }
21855 QueueAction.prototype.schedule = function (state, delay) {
21856 if (delay === void 0) {
21857 delay = 0;
21858 }
21859 if (delay > 0) {
21860 return _super.prototype.schedule.call(this, state, delay);
21861 }
21862 this.delay = delay;
21863 this.state = state;
21864 this.scheduler.flush(this);
21865 return this;
21866 };
21867 QueueAction.prototype.execute = function (state, delay) {
21868 return (delay > 0 || this.closed) ?
21869 _super.prototype.execute.call(this, state, delay) :
21870 this._execute(state, delay);
21871 };
21872 QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
21873 if (delay === void 0) {
21874 delay = 0;
21875 }
21876 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
21877 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
21878 }
21879 return scheduler.flush(this);
21880 };
21881 return QueueAction;
21882}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
21883
21884//# sourceMappingURL=QueueAction.js.map
21885
21886
21887/***/ }),
21888/* 176 */
21889/***/ (function(module, __webpack_exports__, __webpack_require__) {
21890
21891"use strict";
21892__webpack_require__.r(__webpack_exports__);
21893/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; });
21894/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
21895/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
21896/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
21897
21898
21899var AsyncAction = /*@__PURE__*/ (function (_super) {
21900 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncAction, _super);
21901 function AsyncAction(scheduler, work) {
21902 var _this = _super.call(this, scheduler, work) || this;
21903 _this.scheduler = scheduler;
21904 _this.work = work;
21905 _this.pending = false;
21906 return _this;
21907 }
21908 AsyncAction.prototype.schedule = function (state, delay) {
21909 if (delay === void 0) {
21910 delay = 0;
21911 }
21912 if (this.closed) {
21913 return this;
21914 }
21915 this.state = state;
21916 var id = this.id;
21917 var scheduler = this.scheduler;
21918 if (id != null) {
21919 this.id = this.recycleAsyncId(scheduler, id, delay);
21920 }
21921 this.pending = true;
21922 this.delay = delay;
21923 this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
21924 return this;
21925 };
21926 AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
21927 if (delay === void 0) {
21928 delay = 0;
21929 }
21930 return setInterval(scheduler.flush.bind(scheduler, this), delay);
21931 };
21932 AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
21933 if (delay === void 0) {
21934 delay = 0;
21935 }
21936 if (delay !== null && this.delay === delay && this.pending === false) {
21937 return id;
21938 }
21939 clearInterval(id);
21940 return undefined;
21941 };
21942 AsyncAction.prototype.execute = function (state, delay) {
21943 if (this.closed) {
21944 return new Error('executing a cancelled action');
21945 }
21946 this.pending = false;
21947 var error = this._execute(state, delay);
21948 if (error) {
21949 return error;
21950 }
21951 else if (this.pending === false && this.id != null) {
21952 this.id = this.recycleAsyncId(this.scheduler, this.id, null);
21953 }
21954 };
21955 AsyncAction.prototype._execute = function (state, delay) {
21956 var errored = false;
21957 var errorValue = undefined;
21958 try {
21959 this.work(state);
21960 }
21961 catch (e) {
21962 errored = true;
21963 errorValue = !!e && e || new Error(e);
21964 }
21965 if (errored) {
21966 this.unsubscribe();
21967 return errorValue;
21968 }
21969 };
21970 AsyncAction.prototype._unsubscribe = function () {
21971 var id = this.id;
21972 var scheduler = this.scheduler;
21973 var actions = scheduler.actions;
21974 var index = actions.indexOf(this);
21975 this.work = null;
21976 this.state = null;
21977 this.pending = false;
21978 this.scheduler = null;
21979 if (index !== -1) {
21980 actions.splice(index, 1);
21981 }
21982 if (id != null) {
21983 this.id = this.recycleAsyncId(scheduler, id, null);
21984 }
21985 this.delay = null;
21986 };
21987 return AsyncAction;
21988}(_Action__WEBPACK_IMPORTED_MODULE_1__["Action"]));
21989
21990//# sourceMappingURL=AsyncAction.js.map
21991
21992
21993/***/ }),
21994/* 177 */
21995/***/ (function(module, __webpack_exports__, __webpack_require__) {
21996
21997"use strict";
21998__webpack_require__.r(__webpack_exports__);
21999/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
22000/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22001/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
22002/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
22003
22004
22005var Action = /*@__PURE__*/ (function (_super) {
22006 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Action, _super);
22007 function Action(scheduler, work) {
22008 return _super.call(this) || this;
22009 }
22010 Action.prototype.schedule = function (state, delay) {
22011 if (delay === void 0) {
22012 delay = 0;
22013 }
22014 return this;
22015 };
22016 return Action;
22017}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
22018
22019//# sourceMappingURL=Action.js.map
22020
22021
22022/***/ }),
22023/* 178 */
22024/***/ (function(module, __webpack_exports__, __webpack_require__) {
22025
22026"use strict";
22027__webpack_require__.r(__webpack_exports__);
22028/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; });
22029/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22030/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
22031/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
22032
22033
22034var QueueScheduler = /*@__PURE__*/ (function (_super) {
22035 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueScheduler, _super);
22036 function QueueScheduler() {
22037 return _super !== null && _super.apply(this, arguments) || this;
22038 }
22039 return QueueScheduler;
22040}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
22041
22042//# sourceMappingURL=QueueScheduler.js.map
22043
22044
22045/***/ }),
22046/* 179 */
22047/***/ (function(module, __webpack_exports__, __webpack_require__) {
22048
22049"use strict";
22050__webpack_require__.r(__webpack_exports__);
22051/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; });
22052/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22053/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(180);
22054/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
22055
22056
22057var AsyncScheduler = /*@__PURE__*/ (function (_super) {
22058 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncScheduler, _super);
22059 function AsyncScheduler(SchedulerAction, now) {
22060 if (now === void 0) {
22061 now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"].now;
22062 }
22063 var _this = _super.call(this, SchedulerAction, function () {
22064 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
22065 return AsyncScheduler.delegate.now();
22066 }
22067 else {
22068 return now();
22069 }
22070 }) || this;
22071 _this.actions = [];
22072 _this.active = false;
22073 _this.scheduled = undefined;
22074 return _this;
22075 }
22076 AsyncScheduler.prototype.schedule = function (work, delay, state) {
22077 if (delay === void 0) {
22078 delay = 0;
22079 }
22080 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
22081 return AsyncScheduler.delegate.schedule(work, delay, state);
22082 }
22083 else {
22084 return _super.prototype.schedule.call(this, work, delay, state);
22085 }
22086 };
22087 AsyncScheduler.prototype.flush = function (action) {
22088 var actions = this.actions;
22089 if (this.active) {
22090 actions.push(action);
22091 return;
22092 }
22093 var error;
22094 this.active = true;
22095 do {
22096 if (error = action.execute(action.state, action.delay)) {
22097 break;
22098 }
22099 } while (action = actions.shift());
22100 this.active = false;
22101 if (error) {
22102 while (action = actions.shift()) {
22103 action.unsubscribe();
22104 }
22105 throw error;
22106 }
22107 };
22108 return AsyncScheduler;
22109}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"]));
22110
22111//# sourceMappingURL=AsyncScheduler.js.map
22112
22113
22114/***/ }),
22115/* 180 */
22116/***/ (function(module, __webpack_exports__, __webpack_require__) {
22117
22118"use strict";
22119__webpack_require__.r(__webpack_exports__);
22120/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; });
22121var Scheduler = /*@__PURE__*/ (function () {
22122 function Scheduler(SchedulerAction, now) {
22123 if (now === void 0) {
22124 now = Scheduler.now;
22125 }
22126 this.SchedulerAction = SchedulerAction;
22127 this.now = now;
22128 }
22129 Scheduler.prototype.schedule = function (work, delay, state) {
22130 if (delay === void 0) {
22131 delay = 0;
22132 }
22133 return new this.SchedulerAction(this, work).schedule(state, delay);
22134 };
22135 Scheduler.now = function () { return Date.now(); };
22136 return Scheduler;
22137}());
22138
22139//# sourceMappingURL=Scheduler.js.map
22140
22141
22142/***/ }),
22143/* 181 */
22144/***/ (function(module, __webpack_exports__, __webpack_require__) {
22145
22146"use strict";
22147__webpack_require__.r(__webpack_exports__);
22148/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; });
22149/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; });
22150/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; });
22151/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; });
22152/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22153/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
22154/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
22155/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
22156
22157
22158
22159function observeOn(scheduler, delay) {
22160 if (delay === void 0) {
22161 delay = 0;
22162 }
22163 return function observeOnOperatorFunction(source) {
22164 return source.lift(new ObserveOnOperator(scheduler, delay));
22165 };
22166}
22167var ObserveOnOperator = /*@__PURE__*/ (function () {
22168 function ObserveOnOperator(scheduler, delay) {
22169 if (delay === void 0) {
22170 delay = 0;
22171 }
22172 this.scheduler = scheduler;
22173 this.delay = delay;
22174 }
22175 ObserveOnOperator.prototype.call = function (subscriber, source) {
22176 return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
22177 };
22178 return ObserveOnOperator;
22179}());
22180
22181var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
22182 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObserveOnSubscriber, _super);
22183 function ObserveOnSubscriber(destination, scheduler, delay) {
22184 if (delay === void 0) {
22185 delay = 0;
22186 }
22187 var _this = _super.call(this, destination) || this;
22188 _this.scheduler = scheduler;
22189 _this.delay = delay;
22190 return _this;
22191 }
22192 ObserveOnSubscriber.dispatch = function (arg) {
22193 var notification = arg.notification, destination = arg.destination;
22194 notification.observe(destination);
22195 this.unsubscribe();
22196 };
22197 ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
22198 var destination = this.destination;
22199 destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
22200 };
22201 ObserveOnSubscriber.prototype._next = function (value) {
22202 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
22203 };
22204 ObserveOnSubscriber.prototype._error = function (err) {
22205 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
22206 this.unsubscribe();
22207 };
22208 ObserveOnSubscriber.prototype._complete = function () {
22209 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
22210 this.unsubscribe();
22211 };
22212 return ObserveOnSubscriber;
22213}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
22214
22215var ObserveOnMessage = /*@__PURE__*/ (function () {
22216 function ObserveOnMessage(notification, destination) {
22217 this.notification = notification;
22218 this.destination = destination;
22219 }
22220 return ObserveOnMessage;
22221}());
22222
22223//# sourceMappingURL=observeOn.js.map
22224
22225
22226/***/ }),
22227/* 182 */
22228/***/ (function(module, __webpack_exports__, __webpack_require__) {
22229
22230"use strict";
22231__webpack_require__.r(__webpack_exports__);
22232/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; });
22233/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
22234/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
22235/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
22236/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(189);
22237/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
22238
22239
22240
22241var NotificationKind;
22242/*@__PURE__*/ (function (NotificationKind) {
22243 NotificationKind["NEXT"] = "N";
22244 NotificationKind["ERROR"] = "E";
22245 NotificationKind["COMPLETE"] = "C";
22246})(NotificationKind || (NotificationKind = {}));
22247var Notification = /*@__PURE__*/ (function () {
22248 function Notification(kind, value, error) {
22249 this.kind = kind;
22250 this.value = value;
22251 this.error = error;
22252 this.hasValue = kind === 'N';
22253 }
22254 Notification.prototype.observe = function (observer) {
22255 switch (this.kind) {
22256 case 'N':
22257 return observer.next && observer.next(this.value);
22258 case 'E':
22259 return observer.error && observer.error(this.error);
22260 case 'C':
22261 return observer.complete && observer.complete();
22262 }
22263 };
22264 Notification.prototype.do = function (next, error, complete) {
22265 var kind = this.kind;
22266 switch (kind) {
22267 case 'N':
22268 return next && next(this.value);
22269 case 'E':
22270 return error && error(this.error);
22271 case 'C':
22272 return complete && complete();
22273 }
22274 };
22275 Notification.prototype.accept = function (nextOrObserver, error, complete) {
22276 if (nextOrObserver && typeof nextOrObserver.next === 'function') {
22277 return this.observe(nextOrObserver);
22278 }
22279 else {
22280 return this.do(nextOrObserver, error, complete);
22281 }
22282 };
22283 Notification.prototype.toObservable = function () {
22284 var kind = this.kind;
22285 switch (kind) {
22286 case 'N':
22287 return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value);
22288 case 'E':
22289 return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error);
22290 case 'C':
22291 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])();
22292 }
22293 throw new Error('unexpected notification kind value');
22294 };
22295 Notification.createNext = function (value) {
22296 if (typeof value !== 'undefined') {
22297 return new Notification('N', value);
22298 }
22299 return Notification.undefinedValueNotification;
22300 };
22301 Notification.createError = function (err) {
22302 return new Notification('E', undefined, err);
22303 };
22304 Notification.createComplete = function () {
22305 return Notification.completeNotification;
22306 };
22307 Notification.completeNotification = new Notification('C');
22308 Notification.undefinedValueNotification = new Notification('N', undefined);
22309 return Notification;
22310}());
22311
22312//# sourceMappingURL=Notification.js.map
22313
22314
22315/***/ }),
22316/* 183 */
22317/***/ (function(module, __webpack_exports__, __webpack_require__) {
22318
22319"use strict";
22320__webpack_require__.r(__webpack_exports__);
22321/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; });
22322/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
22323/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
22324/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
22325
22326var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.complete(); });
22327function empty(scheduler) {
22328 return scheduler ? emptyScheduled(scheduler) : EMPTY;
22329}
22330function emptyScheduled(scheduler) {
22331 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
22332}
22333//# sourceMappingURL=empty.js.map
22334
22335
22336/***/ }),
22337/* 184 */
22338/***/ (function(module, __webpack_exports__, __webpack_require__) {
22339
22340"use strict";
22341__webpack_require__.r(__webpack_exports__);
22342/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; });
22343/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(185);
22344/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(186);
22345/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
22346/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */
22347
22348
22349
22350function of() {
22351 var args = [];
22352 for (var _i = 0; _i < arguments.length; _i++) {
22353 args[_i] = arguments[_i];
22354 }
22355 var scheduler = args[args.length - 1];
22356 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
22357 args.pop();
22358 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler);
22359 }
22360 else {
22361 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args);
22362 }
22363}
22364//# sourceMappingURL=of.js.map
22365
22366
22367/***/ }),
22368/* 185 */
22369/***/ (function(module, __webpack_exports__, __webpack_require__) {
22370
22371"use strict";
22372__webpack_require__.r(__webpack_exports__);
22373/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; });
22374/** PURE_IMPORTS_START PURE_IMPORTS_END */
22375function isScheduler(value) {
22376 return value && typeof value.schedule === 'function';
22377}
22378//# sourceMappingURL=isScheduler.js.map
22379
22380
22381/***/ }),
22382/* 186 */
22383/***/ (function(module, __webpack_exports__, __webpack_require__) {
22384
22385"use strict";
22386__webpack_require__.r(__webpack_exports__);
22387/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; });
22388/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
22389/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187);
22390/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
22391/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */
22392
22393
22394
22395function fromArray(input, scheduler) {
22396 if (!scheduler) {
22397 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input));
22398 }
22399 else {
22400 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
22401 }
22402}
22403//# sourceMappingURL=fromArray.js.map
22404
22405
22406/***/ }),
22407/* 187 */
22408/***/ (function(module, __webpack_exports__, __webpack_require__) {
22409
22410"use strict";
22411__webpack_require__.r(__webpack_exports__);
22412/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; });
22413/** PURE_IMPORTS_START PURE_IMPORTS_END */
22414var subscribeToArray = function (array) {
22415 return function (subscriber) {
22416 for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
22417 subscriber.next(array[i]);
22418 }
22419 subscriber.complete();
22420 };
22421};
22422//# sourceMappingURL=subscribeToArray.js.map
22423
22424
22425/***/ }),
22426/* 188 */
22427/***/ (function(module, __webpack_exports__, __webpack_require__) {
22428
22429"use strict";
22430__webpack_require__.r(__webpack_exports__);
22431/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleArray", function() { return scheduleArray; });
22432/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
22433/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
22434/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
22435
22436
22437function scheduleArray(input, scheduler) {
22438 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
22439 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
22440 var i = 0;
22441 sub.add(scheduler.schedule(function () {
22442 if (i === input.length) {
22443 subscriber.complete();
22444 return;
22445 }
22446 subscriber.next(input[i++]);
22447 if (!subscriber.closed) {
22448 sub.add(this.schedule());
22449 }
22450 }));
22451 return sub;
22452 });
22453}
22454//# sourceMappingURL=scheduleArray.js.map
22455
22456
22457/***/ }),
22458/* 189 */
22459/***/ (function(module, __webpack_exports__, __webpack_require__) {
22460
22461"use strict";
22462__webpack_require__.r(__webpack_exports__);
22463/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; });
22464/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
22465/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
22466
22467function throwError(error, scheduler) {
22468 if (!scheduler) {
22469 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.error(error); });
22470 }
22471 else {
22472 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
22473 }
22474}
22475function dispatch(_a) {
22476 var error = _a.error, subscriber = _a.subscriber;
22477 subscriber.error(error);
22478}
22479//# sourceMappingURL=throwError.js.map
22480
22481
22482/***/ }),
22483/* 190 */
22484/***/ (function(module, __webpack_exports__, __webpack_require__) {
22485
22486"use strict";
22487__webpack_require__.r(__webpack_exports__);
22488/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; });
22489/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22490/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
22491/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(157);
22492/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
22493
22494
22495
22496var AsyncSubject = /*@__PURE__*/ (function (_super) {
22497 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncSubject, _super);
22498 function AsyncSubject() {
22499 var _this = _super !== null && _super.apply(this, arguments) || this;
22500 _this.value = null;
22501 _this.hasNext = false;
22502 _this.hasCompleted = false;
22503 return _this;
22504 }
22505 AsyncSubject.prototype._subscribe = function (subscriber) {
22506 if (this.hasError) {
22507 subscriber.error(this.thrownError);
22508 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
22509 }
22510 else if (this.hasCompleted && this.hasNext) {
22511 subscriber.next(this.value);
22512 subscriber.complete();
22513 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
22514 }
22515 return _super.prototype._subscribe.call(this, subscriber);
22516 };
22517 AsyncSubject.prototype.next = function (value) {
22518 if (!this.hasCompleted) {
22519 this.value = value;
22520 this.hasNext = true;
22521 }
22522 };
22523 AsyncSubject.prototype.error = function (error) {
22524 if (!this.hasCompleted) {
22525 _super.prototype.error.call(this, error);
22526 }
22527 };
22528 AsyncSubject.prototype.complete = function () {
22529 this.hasCompleted = true;
22530 if (this.hasNext) {
22531 _super.prototype.next.call(this, this.value);
22532 }
22533 _super.prototype.complete.call(this);
22534 };
22535 return AsyncSubject;
22536}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
22537
22538//# sourceMappingURL=AsyncSubject.js.map
22539
22540
22541/***/ }),
22542/* 191 */
22543/***/ (function(module, __webpack_exports__, __webpack_require__) {
22544
22545"use strict";
22546__webpack_require__.r(__webpack_exports__);
22547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; });
22548/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(192);
22549/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
22550/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
22551
22552
22553var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
22554//# sourceMappingURL=asap.js.map
22555
22556
22557/***/ }),
22558/* 192 */
22559/***/ (function(module, __webpack_exports__, __webpack_require__) {
22560
22561"use strict";
22562__webpack_require__.r(__webpack_exports__);
22563/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; });
22564/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22565/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(193);
22566/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
22567/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
22568
22569
22570
22571var AsapAction = /*@__PURE__*/ (function (_super) {
22572 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapAction, _super);
22573 function AsapAction(scheduler, work) {
22574 var _this = _super.call(this, scheduler, work) || this;
22575 _this.scheduler = scheduler;
22576 _this.work = work;
22577 return _this;
22578 }
22579 AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
22580 if (delay === void 0) {
22581 delay = 0;
22582 }
22583 if (delay !== null && delay > 0) {
22584 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
22585 }
22586 scheduler.actions.push(this);
22587 return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
22588 };
22589 AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
22590 if (delay === void 0) {
22591 delay = 0;
22592 }
22593 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
22594 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
22595 }
22596 if (scheduler.actions.length === 0) {
22597 _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].clearImmediate(id);
22598 scheduler.scheduled = undefined;
22599 }
22600 return undefined;
22601 };
22602 return AsapAction;
22603}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__["AsyncAction"]));
22604
22605//# sourceMappingURL=AsapAction.js.map
22606
22607
22608/***/ }),
22609/* 193 */
22610/***/ (function(module, __webpack_exports__, __webpack_require__) {
22611
22612"use strict";
22613__webpack_require__.r(__webpack_exports__);
22614/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; });
22615/** PURE_IMPORTS_START PURE_IMPORTS_END */
22616var nextHandle = 1;
22617var tasksByHandle = {};
22618function runIfPresent(handle) {
22619 var cb = tasksByHandle[handle];
22620 if (cb) {
22621 cb();
22622 }
22623}
22624var Immediate = {
22625 setImmediate: function (cb) {
22626 var handle = nextHandle++;
22627 tasksByHandle[handle] = cb;
22628 Promise.resolve().then(function () { return runIfPresent(handle); });
22629 return handle;
22630 },
22631 clearImmediate: function (handle) {
22632 delete tasksByHandle[handle];
22633 },
22634};
22635//# sourceMappingURL=Immediate.js.map
22636
22637
22638/***/ }),
22639/* 194 */
22640/***/ (function(module, __webpack_exports__, __webpack_require__) {
22641
22642"use strict";
22643__webpack_require__.r(__webpack_exports__);
22644/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; });
22645/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22646/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
22647/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
22648
22649
22650var AsapScheduler = /*@__PURE__*/ (function (_super) {
22651 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapScheduler, _super);
22652 function AsapScheduler() {
22653 return _super !== null && _super.apply(this, arguments) || this;
22654 }
22655 AsapScheduler.prototype.flush = function (action) {
22656 this.active = true;
22657 this.scheduled = undefined;
22658 var actions = this.actions;
22659 var error;
22660 var index = -1;
22661 var count = actions.length;
22662 action = action || actions.shift();
22663 do {
22664 if (error = action.execute(action.state, action.delay)) {
22665 break;
22666 }
22667 } while (++index < count && (action = actions.shift()));
22668 this.active = false;
22669 if (error) {
22670 while (++index < count && (action = actions.shift())) {
22671 action.unsubscribe();
22672 }
22673 throw error;
22674 }
22675 };
22676 return AsapScheduler;
22677}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
22678
22679//# sourceMappingURL=AsapScheduler.js.map
22680
22681
22682/***/ }),
22683/* 195 */
22684/***/ (function(module, __webpack_exports__, __webpack_require__) {
22685
22686"use strict";
22687__webpack_require__.r(__webpack_exports__);
22688/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; });
22689/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
22690/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
22691/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
22692
22693
22694var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
22695//# sourceMappingURL=async.js.map
22696
22697
22698/***/ }),
22699/* 196 */
22700/***/ (function(module, __webpack_exports__, __webpack_require__) {
22701
22702"use strict";
22703__webpack_require__.r(__webpack_exports__);
22704/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; });
22705/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(197);
22706/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
22707/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
22708
22709
22710var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
22711//# sourceMappingURL=animationFrame.js.map
22712
22713
22714/***/ }),
22715/* 197 */
22716/***/ (function(module, __webpack_exports__, __webpack_require__) {
22717
22718"use strict";
22719__webpack_require__.r(__webpack_exports__);
22720/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; });
22721/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22722/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
22723/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
22724
22725
22726var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
22727 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameAction, _super);
22728 function AnimationFrameAction(scheduler, work) {
22729 var _this = _super.call(this, scheduler, work) || this;
22730 _this.scheduler = scheduler;
22731 _this.work = work;
22732 return _this;
22733 }
22734 AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
22735 if (delay === void 0) {
22736 delay = 0;
22737 }
22738 if (delay !== null && delay > 0) {
22739 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
22740 }
22741 scheduler.actions.push(this);
22742 return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
22743 };
22744 AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
22745 if (delay === void 0) {
22746 delay = 0;
22747 }
22748 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
22749 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
22750 }
22751 if (scheduler.actions.length === 0) {
22752 cancelAnimationFrame(id);
22753 scheduler.scheduled = undefined;
22754 }
22755 return undefined;
22756 };
22757 return AnimationFrameAction;
22758}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
22759
22760//# sourceMappingURL=AnimationFrameAction.js.map
22761
22762
22763/***/ }),
22764/* 198 */
22765/***/ (function(module, __webpack_exports__, __webpack_require__) {
22766
22767"use strict";
22768__webpack_require__.r(__webpack_exports__);
22769/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; });
22770/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22771/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
22772/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
22773
22774
22775var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
22776 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameScheduler, _super);
22777 function AnimationFrameScheduler() {
22778 return _super !== null && _super.apply(this, arguments) || this;
22779 }
22780 AnimationFrameScheduler.prototype.flush = function (action) {
22781 this.active = true;
22782 this.scheduled = undefined;
22783 var actions = this.actions;
22784 var error;
22785 var index = -1;
22786 var count = actions.length;
22787 action = action || actions.shift();
22788 do {
22789 if (error = action.execute(action.state, action.delay)) {
22790 break;
22791 }
22792 } while (++index < count && (action = actions.shift()));
22793 this.active = false;
22794 if (error) {
22795 while (++index < count && (action = actions.shift())) {
22796 action.unsubscribe();
22797 }
22798 throw error;
22799 }
22800 };
22801 return AnimationFrameScheduler;
22802}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
22803
22804//# sourceMappingURL=AnimationFrameScheduler.js.map
22805
22806
22807/***/ }),
22808/* 199 */
22809/***/ (function(module, __webpack_exports__, __webpack_require__) {
22810
22811"use strict";
22812__webpack_require__.r(__webpack_exports__);
22813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; });
22814/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; });
22815/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
22816/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
22817/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(179);
22818/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
22819
22820
22821
22822var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
22823 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualTimeScheduler, _super);
22824 function VirtualTimeScheduler(SchedulerAction, maxFrames) {
22825 if (SchedulerAction === void 0) {
22826 SchedulerAction = VirtualAction;
22827 }
22828 if (maxFrames === void 0) {
22829 maxFrames = Number.POSITIVE_INFINITY;
22830 }
22831 var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
22832 _this.maxFrames = maxFrames;
22833 _this.frame = 0;
22834 _this.index = -1;
22835 return _this;
22836 }
22837 VirtualTimeScheduler.prototype.flush = function () {
22838 var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
22839 var error, action;
22840 while ((action = actions[0]) && action.delay <= maxFrames) {
22841 actions.shift();
22842 this.frame = action.delay;
22843 if (error = action.execute(action.state, action.delay)) {
22844 break;
22845 }
22846 }
22847 if (error) {
22848 while (action = actions.shift()) {
22849 action.unsubscribe();
22850 }
22851 throw error;
22852 }
22853 };
22854 VirtualTimeScheduler.frameTimeFactor = 10;
22855 return VirtualTimeScheduler;
22856}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__["AsyncScheduler"]));
22857
22858var VirtualAction = /*@__PURE__*/ (function (_super) {
22859 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualAction, _super);
22860 function VirtualAction(scheduler, work, index) {
22861 if (index === void 0) {
22862 index = scheduler.index += 1;
22863 }
22864 var _this = _super.call(this, scheduler, work) || this;
22865 _this.scheduler = scheduler;
22866 _this.work = work;
22867 _this.index = index;
22868 _this.active = true;
22869 _this.index = scheduler.index = index;
22870 return _this;
22871 }
22872 VirtualAction.prototype.schedule = function (state, delay) {
22873 if (delay === void 0) {
22874 delay = 0;
22875 }
22876 if (!this.id) {
22877 return _super.prototype.schedule.call(this, state, delay);
22878 }
22879 this.active = false;
22880 var action = new VirtualAction(this.scheduler, this.work);
22881 this.add(action);
22882 return action.schedule(state, delay);
22883 };
22884 VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
22885 if (delay === void 0) {
22886 delay = 0;
22887 }
22888 this.delay = scheduler.frame + delay;
22889 var actions = scheduler.actions;
22890 actions.push(this);
22891 actions.sort(VirtualAction.sortActions);
22892 return true;
22893 };
22894 VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
22895 if (delay === void 0) {
22896 delay = 0;
22897 }
22898 return undefined;
22899 };
22900 VirtualAction.prototype._execute = function (state, delay) {
22901 if (this.active === true) {
22902 return _super.prototype._execute.call(this, state, delay);
22903 }
22904 };
22905 VirtualAction.sortActions = function (a, b) {
22906 if (a.delay === b.delay) {
22907 if (a.index === b.index) {
22908 return 0;
22909 }
22910 else if (a.index > b.index) {
22911 return 1;
22912 }
22913 else {
22914 return -1;
22915 }
22916 }
22917 else if (a.delay > b.delay) {
22918 return 1;
22919 }
22920 else {
22921 return -1;
22922 }
22923 };
22924 return VirtualAction;
22925}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
22926
22927//# sourceMappingURL=VirtualTimeScheduler.js.map
22928
22929
22930/***/ }),
22931/* 200 */
22932/***/ (function(module, __webpack_exports__, __webpack_require__) {
22933
22934"use strict";
22935__webpack_require__.r(__webpack_exports__);
22936/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
22937/** PURE_IMPORTS_START PURE_IMPORTS_END */
22938function identity(x) {
22939 return x;
22940}
22941//# sourceMappingURL=identity.js.map
22942
22943
22944/***/ }),
22945/* 201 */
22946/***/ (function(module, __webpack_exports__, __webpack_require__) {
22947
22948"use strict";
22949__webpack_require__.r(__webpack_exports__);
22950/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
22951/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
22952/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
22953
22954function isObservable(obj) {
22955 return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
22956}
22957//# sourceMappingURL=isObservable.js.map
22958
22959
22960/***/ }),
22961/* 202 */
22962/***/ (function(module, __webpack_exports__, __webpack_require__) {
22963
22964"use strict";
22965__webpack_require__.r(__webpack_exports__);
22966/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
22967/** PURE_IMPORTS_START PURE_IMPORTS_END */
22968function ArgumentOutOfRangeErrorImpl() {
22969 Error.call(this);
22970 this.message = 'argument out of range';
22971 this.name = 'ArgumentOutOfRangeError';
22972 return this;
22973}
22974ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
22975var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
22976//# sourceMappingURL=ArgumentOutOfRangeError.js.map
22977
22978
22979/***/ }),
22980/* 203 */
22981/***/ (function(module, __webpack_exports__, __webpack_require__) {
22982
22983"use strict";
22984__webpack_require__.r(__webpack_exports__);
22985/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
22986/** PURE_IMPORTS_START PURE_IMPORTS_END */
22987function EmptyErrorImpl() {
22988 Error.call(this);
22989 this.message = 'no elements in sequence';
22990 this.name = 'EmptyError';
22991 return this;
22992}
22993EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
22994var EmptyError = EmptyErrorImpl;
22995//# sourceMappingURL=EmptyError.js.map
22996
22997
22998/***/ }),
22999/* 204 */
23000/***/ (function(module, __webpack_exports__, __webpack_require__) {
23001
23002"use strict";
23003__webpack_require__.r(__webpack_exports__);
23004/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
23005/** PURE_IMPORTS_START PURE_IMPORTS_END */
23006function TimeoutErrorImpl() {
23007 Error.call(this);
23008 this.message = 'Timeout has occurred';
23009 this.name = 'TimeoutError';
23010 return this;
23011}
23012TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
23013var TimeoutError = TimeoutErrorImpl;
23014//# sourceMappingURL=TimeoutError.js.map
23015
23016
23017/***/ }),
23018/* 205 */
23019/***/ (function(module, __webpack_exports__, __webpack_require__) {
23020
23021"use strict";
23022__webpack_require__.r(__webpack_exports__);
23023/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
23024/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
23025/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(190);
23026/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
23027/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(150);
23028/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(158);
23029/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(185);
23030/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
23031
23032
23033
23034
23035
23036
23037function bindCallback(callbackFunc, resultSelector, scheduler) {
23038 if (resultSelector) {
23039 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) {
23040 scheduler = resultSelector;
23041 }
23042 else {
23043 return function () {
23044 var args = [];
23045 for (var _i = 0; _i < arguments.length; _i++) {
23046 args[_i] = arguments[_i];
23047 }
23048 return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_4__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
23049 };
23050 }
23051 }
23052 return function () {
23053 var args = [];
23054 for (var _i = 0; _i < arguments.length; _i++) {
23055 args[_i] = arguments[_i];
23056 }
23057 var context = this;
23058 var subject;
23059 var params = {
23060 context: context,
23061 subject: subject,
23062 callbackFunc: callbackFunc,
23063 scheduler: scheduler,
23064 };
23065 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
23066 if (!scheduler) {
23067 if (!subject) {
23068 subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
23069 var handler = function () {
23070 var innerArgs = [];
23071 for (var _i = 0; _i < arguments.length; _i++) {
23072 innerArgs[_i] = arguments[_i];
23073 }
23074 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
23075 subject.complete();
23076 };
23077 try {
23078 callbackFunc.apply(context, args.concat([handler]));
23079 }
23080 catch (err) {
23081 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
23082 subject.error(err);
23083 }
23084 else {
23085 console.warn(err);
23086 }
23087 }
23088 }
23089 return subject.subscribe(subscriber);
23090 }
23091 else {
23092 var state = {
23093 args: args, subscriber: subscriber, params: params,
23094 };
23095 return scheduler.schedule(dispatch, 0, state);
23096 }
23097 });
23098 };
23099}
23100function dispatch(state) {
23101 var _this = this;
23102 var self = this;
23103 var args = state.args, subscriber = state.subscriber, params = state.params;
23104 var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
23105 var subject = params.subject;
23106 if (!subject) {
23107 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
23108 var handler = function () {
23109 var innerArgs = [];
23110 for (var _i = 0; _i < arguments.length; _i++) {
23111 innerArgs[_i] = arguments[_i];
23112 }
23113 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
23114 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
23115 };
23116 try {
23117 callbackFunc.apply(context, args.concat([handler]));
23118 }
23119 catch (err) {
23120 subject.error(err);
23121 }
23122 }
23123 this.add(subject.subscribe(subscriber));
23124}
23125function dispatchNext(state) {
23126 var value = state.value, subject = state.subject;
23127 subject.next(value);
23128 subject.complete();
23129}
23130function dispatchError(state) {
23131 var err = state.err, subject = state.subject;
23132 subject.error(err);
23133}
23134//# sourceMappingURL=bindCallback.js.map
23135
23136
23137/***/ }),
23138/* 206 */
23139/***/ (function(module, __webpack_exports__, __webpack_require__) {
23140
23141"use strict";
23142__webpack_require__.r(__webpack_exports__);
23143/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
23144/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; });
23145/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
23146/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
23147/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
23148
23149
23150function map(project, thisArg) {
23151 return function mapOperation(source) {
23152 if (typeof project !== 'function') {
23153 throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
23154 }
23155 return source.lift(new MapOperator(project, thisArg));
23156 };
23157}
23158var MapOperator = /*@__PURE__*/ (function () {
23159 function MapOperator(project, thisArg) {
23160 this.project = project;
23161 this.thisArg = thisArg;
23162 }
23163 MapOperator.prototype.call = function (subscriber, source) {
23164 return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
23165 };
23166 return MapOperator;
23167}());
23168
23169var MapSubscriber = /*@__PURE__*/ (function (_super) {
23170 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapSubscriber, _super);
23171 function MapSubscriber(destination, project, thisArg) {
23172 var _this = _super.call(this, destination) || this;
23173 _this.project = project;
23174 _this.count = 0;
23175 _this.thisArg = thisArg || _this;
23176 return _this;
23177 }
23178 MapSubscriber.prototype._next = function (value) {
23179 var result;
23180 try {
23181 result = this.project.call(this.thisArg, value, this.count++);
23182 }
23183 catch (err) {
23184 this.destination.error(err);
23185 return;
23186 }
23187 this.destination.next(result);
23188 };
23189 return MapSubscriber;
23190}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
23191//# sourceMappingURL=map.js.map
23192
23193
23194/***/ }),
23195/* 207 */
23196/***/ (function(module, __webpack_exports__, __webpack_require__) {
23197
23198"use strict";
23199__webpack_require__.r(__webpack_exports__);
23200/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
23201/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
23202/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(190);
23203/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
23204/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(150);
23205/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
23206/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(158);
23207/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
23208
23209
23210
23211
23212
23213
23214function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
23215 if (resultSelector) {
23216 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
23217 scheduler = resultSelector;
23218 }
23219 else {
23220 return function () {
23221 var args = [];
23222 for (var _i = 0; _i < arguments.length; _i++) {
23223 args[_i] = arguments[_i];
23224 }
23225 return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_5__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
23226 };
23227 }
23228 }
23229 return function () {
23230 var args = [];
23231 for (var _i = 0; _i < arguments.length; _i++) {
23232 args[_i] = arguments[_i];
23233 }
23234 var params = {
23235 subject: undefined,
23236 args: args,
23237 callbackFunc: callbackFunc,
23238 scheduler: scheduler,
23239 context: this,
23240 };
23241 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
23242 var context = params.context;
23243 var subject = params.subject;
23244 if (!scheduler) {
23245 if (!subject) {
23246 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
23247 var handler = function () {
23248 var innerArgs = [];
23249 for (var _i = 0; _i < arguments.length; _i++) {
23250 innerArgs[_i] = arguments[_i];
23251 }
23252 var err = innerArgs.shift();
23253 if (err) {
23254 subject.error(err);
23255 return;
23256 }
23257 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
23258 subject.complete();
23259 };
23260 try {
23261 callbackFunc.apply(context, args.concat([handler]));
23262 }
23263 catch (err) {
23264 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
23265 subject.error(err);
23266 }
23267 else {
23268 console.warn(err);
23269 }
23270 }
23271 }
23272 return subject.subscribe(subscriber);
23273 }
23274 else {
23275 return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
23276 }
23277 });
23278 };
23279}
23280function dispatch(state) {
23281 var _this = this;
23282 var params = state.params, subscriber = state.subscriber, context = state.context;
23283 var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
23284 var subject = params.subject;
23285 if (!subject) {
23286 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
23287 var handler = function () {
23288 var innerArgs = [];
23289 for (var _i = 0; _i < arguments.length; _i++) {
23290 innerArgs[_i] = arguments[_i];
23291 }
23292 var err = innerArgs.shift();
23293 if (err) {
23294 _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
23295 }
23296 else {
23297 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
23298 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
23299 }
23300 };
23301 try {
23302 callbackFunc.apply(context, args.concat([handler]));
23303 }
23304 catch (err) {
23305 this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
23306 }
23307 }
23308 this.add(subject.subscribe(subscriber));
23309}
23310function dispatchNext(arg) {
23311 var value = arg.value, subject = arg.subject;
23312 subject.next(value);
23313 subject.complete();
23314}
23315function dispatchError(arg) {
23316 var err = arg.err, subject = arg.subject;
23317 subject.error(err);
23318}
23319//# sourceMappingURL=bindNodeCallback.js.map
23320
23321
23322/***/ }),
23323/* 208 */
23324/***/ (function(module, __webpack_exports__, __webpack_require__) {
23325
23326"use strict";
23327__webpack_require__.r(__webpack_exports__);
23328/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
23329/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; });
23330/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; });
23331/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
23332/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
23333/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(158);
23334/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
23335/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(210);
23336/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(186);
23337/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
23338
23339
23340
23341
23342
23343
23344var NONE = {};
23345function combineLatest() {
23346 var observables = [];
23347 for (var _i = 0; _i < arguments.length; _i++) {
23348 observables[_i] = arguments[_i];
23349 }
23350 var resultSelector = null;
23351 var scheduler = null;
23352 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(observables[observables.length - 1])) {
23353 scheduler = observables.pop();
23354 }
23355 if (typeof observables[observables.length - 1] === 'function') {
23356 resultSelector = observables.pop();
23357 }
23358 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(observables[0])) {
23359 observables = observables[0];
23360 }
23361 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
23362}
23363var CombineLatestOperator = /*@__PURE__*/ (function () {
23364 function CombineLatestOperator(resultSelector) {
23365 this.resultSelector = resultSelector;
23366 }
23367 CombineLatestOperator.prototype.call = function (subscriber, source) {
23368 return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
23369 };
23370 return CombineLatestOperator;
23371}());
23372
23373var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
23374 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CombineLatestSubscriber, _super);
23375 function CombineLatestSubscriber(destination, resultSelector) {
23376 var _this = _super.call(this, destination) || this;
23377 _this.resultSelector = resultSelector;
23378 _this.active = 0;
23379 _this.values = [];
23380 _this.observables = [];
23381 return _this;
23382 }
23383 CombineLatestSubscriber.prototype._next = function (observable) {
23384 this.values.push(NONE);
23385 this.observables.push(observable);
23386 };
23387 CombineLatestSubscriber.prototype._complete = function () {
23388 var observables = this.observables;
23389 var len = observables.length;
23390 if (len === 0) {
23391 this.destination.complete();
23392 }
23393 else {
23394 this.active = len;
23395 this.toRespond = len;
23396 for (var i = 0; i < len; i++) {
23397 var observable = observables[i];
23398 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i));
23399 }
23400 }
23401 };
23402 CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
23403 if ((this.active -= 1) === 0) {
23404 this.destination.complete();
23405 }
23406 };
23407 CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
23408 var values = this.values;
23409 var oldVal = values[outerIndex];
23410 var toRespond = !this.toRespond
23411 ? 0
23412 : oldVal === NONE ? --this.toRespond : this.toRespond;
23413 values[outerIndex] = innerValue;
23414 if (toRespond === 0) {
23415 if (this.resultSelector) {
23416 this._tryResultSelector(values);
23417 }
23418 else {
23419 this.destination.next(values.slice());
23420 }
23421 }
23422 };
23423 CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
23424 var result;
23425 try {
23426 result = this.resultSelector.apply(this, values);
23427 }
23428 catch (err) {
23429 this.destination.error(err);
23430 return;
23431 }
23432 this.destination.next(result);
23433 };
23434 return CombineLatestSubscriber;
23435}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
23436
23437//# sourceMappingURL=combineLatest.js.map
23438
23439
23440/***/ }),
23441/* 209 */
23442/***/ (function(module, __webpack_exports__, __webpack_require__) {
23443
23444"use strict";
23445__webpack_require__.r(__webpack_exports__);
23446/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; });
23447/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
23448/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
23449/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
23450
23451
23452var OuterSubscriber = /*@__PURE__*/ (function (_super) {
23453 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OuterSubscriber, _super);
23454 function OuterSubscriber() {
23455 return _super !== null && _super.apply(this, arguments) || this;
23456 }
23457 OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
23458 this.destination.next(innerValue);
23459 };
23460 OuterSubscriber.prototype.notifyError = function (error, innerSub) {
23461 this.destination.error(error);
23462 };
23463 OuterSubscriber.prototype.notifyComplete = function (innerSub) {
23464 this.destination.complete();
23465 };
23466 return OuterSubscriber;
23467}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
23468
23469//# sourceMappingURL=OuterSubscriber.js.map
23470
23471
23472/***/ }),
23473/* 210 */
23474/***/ (function(module, __webpack_exports__, __webpack_require__) {
23475
23476"use strict";
23477__webpack_require__.r(__webpack_exports__);
23478/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; });
23479/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(211);
23480/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
23481/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(149);
23482/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */
23483
23484
23485
23486function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {
23487 if (destination === void 0) {
23488 destination = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);
23489 }
23490 if (destination.closed) {
23491 return undefined;
23492 }
23493 if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
23494 return result.subscribe(destination);
23495 }
23496 return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(destination);
23497}
23498//# sourceMappingURL=subscribeToResult.js.map
23499
23500
23501/***/ }),
23502/* 211 */
23503/***/ (function(module, __webpack_exports__, __webpack_require__) {
23504
23505"use strict";
23506__webpack_require__.r(__webpack_exports__);
23507/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; });
23508/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
23509/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
23510/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
23511
23512
23513var InnerSubscriber = /*@__PURE__*/ (function (_super) {
23514 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerSubscriber, _super);
23515 function InnerSubscriber(parent, outerValue, outerIndex) {
23516 var _this = _super.call(this) || this;
23517 _this.parent = parent;
23518 _this.outerValue = outerValue;
23519 _this.outerIndex = outerIndex;
23520 _this.index = 0;
23521 return _this;
23522 }
23523 InnerSubscriber.prototype._next = function (value) {
23524 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
23525 };
23526 InnerSubscriber.prototype._error = function (error) {
23527 this.parent.notifyError(error, this);
23528 this.unsubscribe();
23529 };
23530 InnerSubscriber.prototype._complete = function () {
23531 this.parent.notifyComplete(this);
23532 this.unsubscribe();
23533 };
23534 return InnerSubscriber;
23535}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
23536
23537//# sourceMappingURL=InnerSubscriber.js.map
23538
23539
23540/***/ }),
23541/* 212 */
23542/***/ (function(module, __webpack_exports__, __webpack_require__) {
23543
23544"use strict";
23545__webpack_require__.r(__webpack_exports__);
23546/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; });
23547/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(187);
23548/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
23549/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(214);
23550/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(216);
23551/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(217);
23552/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(218);
23553/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(159);
23554/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(215);
23555/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(163);
23556/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566var subscribeTo = function (result) {
23567 if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') {
23568 return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result);
23569 }
23570 else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) {
23571 return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result);
23572 }
23573 else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) {
23574 return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result);
23575 }
23576 else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') {
23577 return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result);
23578 }
23579 else {
23580 var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : "'" + result + "'";
23581 var msg = "You provided " + value + " where a stream was expected."
23582 + ' You can provide an Observable, Promise, Array, or Iterable.';
23583 throw new TypeError(msg);
23584 }
23585};
23586//# sourceMappingURL=subscribeTo.js.map
23587
23588
23589/***/ }),
23590/* 213 */
23591/***/ (function(module, __webpack_exports__, __webpack_require__) {
23592
23593"use strict";
23594__webpack_require__.r(__webpack_exports__);
23595/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; });
23596/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(156);
23597/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
23598
23599var subscribeToPromise = function (promise) {
23600 return function (subscriber) {
23601 promise.then(function (value) {
23602 if (!subscriber.closed) {
23603 subscriber.next(value);
23604 subscriber.complete();
23605 }
23606 }, function (err) { return subscriber.error(err); })
23607 .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]);
23608 return subscriber;
23609 };
23610};
23611//# sourceMappingURL=subscribeToPromise.js.map
23612
23613
23614/***/ }),
23615/* 214 */
23616/***/ (function(module, __webpack_exports__, __webpack_require__) {
23617
23618"use strict";
23619__webpack_require__.r(__webpack_exports__);
23620/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; });
23621/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(215);
23622/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
23623
23624var subscribeToIterable = function (iterable) {
23625 return function (subscriber) {
23626 var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();
23627 do {
23628 var item = iterator.next();
23629 if (item.done) {
23630 subscriber.complete();
23631 break;
23632 }
23633 subscriber.next(item.value);
23634 if (subscriber.closed) {
23635 break;
23636 }
23637 } while (true);
23638 if (typeof iterator.return === 'function') {
23639 subscriber.add(function () {
23640 if (iterator.return) {
23641 iterator.return();
23642 }
23643 });
23644 }
23645 return subscriber;
23646 };
23647};
23648//# sourceMappingURL=subscribeToIterable.js.map
23649
23650
23651/***/ }),
23652/* 215 */
23653/***/ (function(module, __webpack_exports__, __webpack_require__) {
23654
23655"use strict";
23656__webpack_require__.r(__webpack_exports__);
23657/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; });
23658/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; });
23659/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; });
23660/** PURE_IMPORTS_START PURE_IMPORTS_END */
23661function getSymbolIterator() {
23662 if (typeof Symbol !== 'function' || !Symbol.iterator) {
23663 return '@@iterator';
23664 }
23665 return Symbol.iterator;
23666}
23667var iterator = /*@__PURE__*/ getSymbolIterator();
23668var $$iterator = iterator;
23669//# sourceMappingURL=iterator.js.map
23670
23671
23672/***/ }),
23673/* 216 */
23674/***/ (function(module, __webpack_exports__, __webpack_require__) {
23675
23676"use strict";
23677__webpack_require__.r(__webpack_exports__);
23678/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; });
23679/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(163);
23680/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
23681
23682var subscribeToObservable = function (obj) {
23683 return function (subscriber) {
23684 var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]]();
23685 if (typeof obs.subscribe !== 'function') {
23686 throw new TypeError('Provided object does not correctly implement Symbol.observable');
23687 }
23688 else {
23689 return obs.subscribe(subscriber);
23690 }
23691 };
23692};
23693//# sourceMappingURL=subscribeToObservable.js.map
23694
23695
23696/***/ }),
23697/* 217 */
23698/***/ (function(module, __webpack_exports__, __webpack_require__) {
23699
23700"use strict";
23701__webpack_require__.r(__webpack_exports__);
23702/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; });
23703/** PURE_IMPORTS_START PURE_IMPORTS_END */
23704var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
23705//# sourceMappingURL=isArrayLike.js.map
23706
23707
23708/***/ }),
23709/* 218 */
23710/***/ (function(module, __webpack_exports__, __webpack_require__) {
23711
23712"use strict";
23713__webpack_require__.r(__webpack_exports__);
23714/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; });
23715/** PURE_IMPORTS_START PURE_IMPORTS_END */
23716function isPromise(value) {
23717 return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
23718}
23719//# sourceMappingURL=isPromise.js.map
23720
23721
23722/***/ }),
23723/* 219 */
23724/***/ (function(module, __webpack_exports__, __webpack_require__) {
23725
23726"use strict";
23727__webpack_require__.r(__webpack_exports__);
23728/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
23729/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(184);
23730/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(220);
23731/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */
23732
23733
23734function concat() {
23735 var observables = [];
23736 for (var _i = 0; _i < arguments.length; _i++) {
23737 observables[_i] = arguments[_i];
23738 }
23739 return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(_of__WEBPACK_IMPORTED_MODULE_0__["of"].apply(void 0, observables));
23740}
23741//# sourceMappingURL=concat.js.map
23742
23743
23744/***/ }),
23745/* 220 */
23746/***/ (function(module, __webpack_exports__, __webpack_require__) {
23747
23748"use strict";
23749__webpack_require__.r(__webpack_exports__);
23750/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; });
23751/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
23752/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
23753
23754function concatAll() {
23755 return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
23756}
23757//# sourceMappingURL=concatAll.js.map
23758
23759
23760/***/ }),
23761/* 221 */
23762/***/ (function(module, __webpack_exports__, __webpack_require__) {
23763
23764"use strict";
23765__webpack_require__.r(__webpack_exports__);
23766/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; });
23767/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(222);
23768/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(200);
23769/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
23770
23771
23772function mergeAll(concurrent) {
23773 if (concurrent === void 0) {
23774 concurrent = Number.POSITIVE_INFINITY;
23775 }
23776 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent);
23777}
23778//# sourceMappingURL=mergeAll.js.map
23779
23780
23781/***/ }),
23782/* 222 */
23783/***/ (function(module, __webpack_exports__, __webpack_require__) {
23784
23785"use strict";
23786__webpack_require__.r(__webpack_exports__);
23787/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; });
23788/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; });
23789/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; });
23790/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
23791/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(210);
23792/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
23793/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(211);
23794/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(206);
23795/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(223);
23796/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
23797
23798
23799
23800
23801
23802
23803function mergeMap(project, resultSelector, concurrent) {
23804 if (concurrent === void 0) {
23805 concurrent = Number.POSITIVE_INFINITY;
23806 }
23807 if (typeof resultSelector === 'function') {
23808 return function (source) { return source.pipe(mergeMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
23809 }
23810 else if (typeof resultSelector === 'number') {
23811 concurrent = resultSelector;
23812 }
23813 return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
23814}
23815var MergeMapOperator = /*@__PURE__*/ (function () {
23816 function MergeMapOperator(project, concurrent) {
23817 if (concurrent === void 0) {
23818 concurrent = Number.POSITIVE_INFINITY;
23819 }
23820 this.project = project;
23821 this.concurrent = concurrent;
23822 }
23823 MergeMapOperator.prototype.call = function (observer, source) {
23824 return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
23825 };
23826 return MergeMapOperator;
23827}());
23828
23829var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
23830 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeMapSubscriber, _super);
23831 function MergeMapSubscriber(destination, project, concurrent) {
23832 if (concurrent === void 0) {
23833 concurrent = Number.POSITIVE_INFINITY;
23834 }
23835 var _this = _super.call(this, destination) || this;
23836 _this.project = project;
23837 _this.concurrent = concurrent;
23838 _this.hasCompleted = false;
23839 _this.buffer = [];
23840 _this.active = 0;
23841 _this.index = 0;
23842 return _this;
23843 }
23844 MergeMapSubscriber.prototype._next = function (value) {
23845 if (this.active < this.concurrent) {
23846 this._tryNext(value);
23847 }
23848 else {
23849 this.buffer.push(value);
23850 }
23851 };
23852 MergeMapSubscriber.prototype._tryNext = function (value) {
23853 var result;
23854 var index = this.index++;
23855 try {
23856 result = this.project(value, index);
23857 }
23858 catch (err) {
23859 this.destination.error(err);
23860 return;
23861 }
23862 this.active++;
23863 this._innerSub(result, value, index);
23864 };
23865 MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
23866 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, undefined, undefined);
23867 var destination = this.destination;
23868 destination.add(innerSubscriber);
23869 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
23870 };
23871 MergeMapSubscriber.prototype._complete = function () {
23872 this.hasCompleted = true;
23873 if (this.active === 0 && this.buffer.length === 0) {
23874 this.destination.complete();
23875 }
23876 this.unsubscribe();
23877 };
23878 MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
23879 this.destination.next(innerValue);
23880 };
23881 MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
23882 var buffer = this.buffer;
23883 this.remove(innerSub);
23884 this.active--;
23885 if (buffer.length > 0) {
23886 this._next(buffer.shift());
23887 }
23888 else if (this.active === 0 && this.hasCompleted) {
23889 this.destination.complete();
23890 }
23891 };
23892 return MergeMapSubscriber;
23893}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
23894
23895//# sourceMappingURL=mergeMap.js.map
23896
23897
23898/***/ }),
23899/* 223 */
23900/***/ (function(module, __webpack_exports__, __webpack_require__) {
23901
23902"use strict";
23903__webpack_require__.r(__webpack_exports__);
23904/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; });
23905/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
23906/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
23907/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
23908/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */
23909
23910
23911
23912function from(input, scheduler) {
23913 if (!scheduler) {
23914 if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
23915 return input;
23916 }
23917 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input));
23918 }
23919 else {
23920 return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler);
23921 }
23922}
23923//# sourceMappingURL=from.js.map
23924
23925
23926/***/ }),
23927/* 224 */
23928/***/ (function(module, __webpack_exports__, __webpack_require__) {
23929
23930"use strict";
23931__webpack_require__.r(__webpack_exports__);
23932/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return scheduled; });
23933/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(225);
23934/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
23935/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
23936/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
23937/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
23938/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(218);
23939/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(217);
23940/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(229);
23941/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */
23942
23943
23944
23945
23946
23947
23948
23949
23950function scheduled(input, scheduler) {
23951 if (input != null) {
23952 if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) {
23953 return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler);
23954 }
23955 else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) {
23956 return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler);
23957 }
23958 else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) {
23959 return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
23960 }
23961 else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') {
23962 return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler);
23963 }
23964 }
23965 throw new TypeError((input !== null && typeof input || input) + ' is not observable');
23966}
23967//# sourceMappingURL=scheduled.js.map
23968
23969
23970/***/ }),
23971/* 225 */
23972/***/ (function(module, __webpack_exports__, __webpack_require__) {
23973
23974"use strict";
23975__webpack_require__.r(__webpack_exports__);
23976/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; });
23977/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
23978/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
23979/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(163);
23980/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
23981
23982
23983
23984function scheduleObservable(input, scheduler) {
23985 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
23986 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
23987 sub.add(scheduler.schedule(function () {
23988 var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]();
23989 sub.add(observable.subscribe({
23990 next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
23991 error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
23992 complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
23993 }));
23994 }));
23995 return sub;
23996 });
23997}
23998//# sourceMappingURL=scheduleObservable.js.map
23999
24000
24001/***/ }),
24002/* 226 */
24003/***/ (function(module, __webpack_exports__, __webpack_require__) {
24004
24005"use strict";
24006__webpack_require__.r(__webpack_exports__);
24007/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; });
24008/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24009/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
24010/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
24011
24012
24013function schedulePromise(input, scheduler) {
24014 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24015 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
24016 sub.add(scheduler.schedule(function () {
24017 return input.then(function (value) {
24018 sub.add(scheduler.schedule(function () {
24019 subscriber.next(value);
24020 sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
24021 }));
24022 }, function (err) {
24023 sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
24024 });
24025 }));
24026 return sub;
24027 });
24028}
24029//# sourceMappingURL=schedulePromise.js.map
24030
24031
24032/***/ }),
24033/* 227 */
24034/***/ (function(module, __webpack_exports__, __webpack_require__) {
24035
24036"use strict";
24037__webpack_require__.r(__webpack_exports__);
24038/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; });
24039/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24040/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
24041/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215);
24042/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */
24043
24044
24045
24046function scheduleIterable(input, scheduler) {
24047 if (!input) {
24048 throw new Error('Iterable cannot be null');
24049 }
24050 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24051 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
24052 var iterator;
24053 sub.add(function () {
24054 if (iterator && typeof iterator.return === 'function') {
24055 iterator.return();
24056 }
24057 });
24058 sub.add(scheduler.schedule(function () {
24059 iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]]();
24060 sub.add(scheduler.schedule(function () {
24061 if (subscriber.closed) {
24062 return;
24063 }
24064 var value;
24065 var done;
24066 try {
24067 var result = iterator.next();
24068 value = result.value;
24069 done = result.done;
24070 }
24071 catch (err) {
24072 subscriber.error(err);
24073 return;
24074 }
24075 if (done) {
24076 subscriber.complete();
24077 }
24078 else {
24079 subscriber.next(value);
24080 this.schedule();
24081 }
24082 }));
24083 }));
24084 return sub;
24085 });
24086}
24087//# sourceMappingURL=scheduleIterable.js.map
24088
24089
24090/***/ }),
24091/* 228 */
24092/***/ (function(module, __webpack_exports__, __webpack_require__) {
24093
24094"use strict";
24095__webpack_require__.r(__webpack_exports__);
24096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; });
24097/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(163);
24098/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
24099
24100function isInteropObservable(input) {
24101 return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
24102}
24103//# sourceMappingURL=isInteropObservable.js.map
24104
24105
24106/***/ }),
24107/* 229 */
24108/***/ (function(module, __webpack_exports__, __webpack_require__) {
24109
24110"use strict";
24111__webpack_require__.r(__webpack_exports__);
24112/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; });
24113/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(215);
24114/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
24115
24116function isIterable(input) {
24117 return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
24118}
24119//# sourceMappingURL=isIterable.js.map
24120
24121
24122/***/ }),
24123/* 230 */
24124/***/ (function(module, __webpack_exports__, __webpack_require__) {
24125
24126"use strict";
24127__webpack_require__.r(__webpack_exports__);
24128/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
24129/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24130/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
24131/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
24132/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
24133
24134
24135
24136function defer(observableFactory) {
24137 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24138 var input;
24139 try {
24140 input = observableFactory();
24141 }
24142 catch (err) {
24143 subscriber.error(err);
24144 return undefined;
24145 }
24146 var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
24147 return source.subscribe(subscriber);
24148 });
24149}
24150//# sourceMappingURL=defer.js.map
24151
24152
24153/***/ }),
24154/* 231 */
24155/***/ (function(module, __webpack_exports__, __webpack_require__) {
24156
24157"use strict";
24158__webpack_require__.r(__webpack_exports__);
24159/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
24160/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24161/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(158);
24162/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
24163/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(159);
24164/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(223);
24165/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */
24166
24167
24168
24169
24170
24171function forkJoin() {
24172 var sources = [];
24173 for (var _i = 0; _i < arguments.length; _i++) {
24174 sources[_i] = arguments[_i];
24175 }
24176 if (sources.length === 1) {
24177 var first_1 = sources[0];
24178 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first_1)) {
24179 return forkJoinInternal(first_1, null);
24180 }
24181 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
24182 var keys = Object.keys(first_1);
24183 return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
24184 }
24185 }
24186 if (typeof sources[sources.length - 1] === 'function') {
24187 var resultSelector_1 = sources.pop();
24188 sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources;
24189 return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return resultSelector_1.apply(void 0, args); }));
24190 }
24191 return forkJoinInternal(sources, null);
24192}
24193function forkJoinInternal(sources, keys) {
24194 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24195 var len = sources.length;
24196 if (len === 0) {
24197 subscriber.complete();
24198 return;
24199 }
24200 var values = new Array(len);
24201 var completed = 0;
24202 var emitted = 0;
24203 var _loop_1 = function (i) {
24204 var source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]);
24205 var hasValue = false;
24206 subscriber.add(source.subscribe({
24207 next: function (value) {
24208 if (!hasValue) {
24209 hasValue = true;
24210 emitted++;
24211 }
24212 values[i] = value;
24213 },
24214 error: function (err) { return subscriber.error(err); },
24215 complete: function () {
24216 completed++;
24217 if (completed === len || !hasValue) {
24218 if (emitted === len) {
24219 subscriber.next(keys ?
24220 keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
24221 values);
24222 }
24223 subscriber.complete();
24224 }
24225 }
24226 }));
24227 };
24228 for (var i = 0; i < len; i++) {
24229 _loop_1(i);
24230 }
24231 });
24232}
24233//# sourceMappingURL=forkJoin.js.map
24234
24235
24236/***/ }),
24237/* 232 */
24238/***/ (function(module, __webpack_exports__, __webpack_require__) {
24239
24240"use strict";
24241__webpack_require__.r(__webpack_exports__);
24242/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
24243/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24244/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(158);
24245/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(153);
24246/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
24247/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
24248
24249
24250
24251
24252var toString = Object.prototype.toString;
24253function fromEvent(target, eventName, options, resultSelector) {
24254 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) {
24255 resultSelector = options;
24256 options = undefined;
24257 }
24258 if (resultSelector) {
24259 return fromEvent(target, eventName, options).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
24260 }
24261 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24262 function handler(e) {
24263 if (arguments.length > 1) {
24264 subscriber.next(Array.prototype.slice.call(arguments));
24265 }
24266 else {
24267 subscriber.next(e);
24268 }
24269 }
24270 setupSubscription(target, eventName, handler, subscriber, options);
24271 });
24272}
24273function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
24274 var unsubscribe;
24275 if (isEventTarget(sourceObj)) {
24276 var source_1 = sourceObj;
24277 sourceObj.addEventListener(eventName, handler, options);
24278 unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
24279 }
24280 else if (isJQueryStyleEventEmitter(sourceObj)) {
24281 var source_2 = sourceObj;
24282 sourceObj.on(eventName, handler);
24283 unsubscribe = function () { return source_2.off(eventName, handler); };
24284 }
24285 else if (isNodeStyleEventEmitter(sourceObj)) {
24286 var source_3 = sourceObj;
24287 sourceObj.addListener(eventName, handler);
24288 unsubscribe = function () { return source_3.removeListener(eventName, handler); };
24289 }
24290 else if (sourceObj && sourceObj.length) {
24291 for (var i = 0, len = sourceObj.length; i < len; i++) {
24292 setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
24293 }
24294 }
24295 else {
24296 throw new TypeError('Invalid event target');
24297 }
24298 subscriber.add(unsubscribe);
24299}
24300function isNodeStyleEventEmitter(sourceObj) {
24301 return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
24302}
24303function isJQueryStyleEventEmitter(sourceObj) {
24304 return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
24305}
24306function isEventTarget(sourceObj) {
24307 return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
24308}
24309//# sourceMappingURL=fromEvent.js.map
24310
24311
24312/***/ }),
24313/* 233 */
24314/***/ (function(module, __webpack_exports__, __webpack_require__) {
24315
24316"use strict";
24317__webpack_require__.r(__webpack_exports__);
24318/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
24319/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24320/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(158);
24321/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(153);
24322/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
24323/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
24324
24325
24326
24327
24328function fromEventPattern(addHandler, removeHandler, resultSelector) {
24329 if (resultSelector) {
24330 return fromEventPattern(addHandler, removeHandler).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
24331 }
24332 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24333 var handler = function () {
24334 var e = [];
24335 for (var _i = 0; _i < arguments.length; _i++) {
24336 e[_i] = arguments[_i];
24337 }
24338 return subscriber.next(e.length === 1 ? e[0] : e);
24339 };
24340 var retValue;
24341 try {
24342 retValue = addHandler(handler);
24343 }
24344 catch (err) {
24345 subscriber.error(err);
24346 return undefined;
24347 }
24348 if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) {
24349 return undefined;
24350 }
24351 return function () { return removeHandler(handler, retValue); };
24352 });
24353}
24354//# sourceMappingURL=fromEventPattern.js.map
24355
24356
24357/***/ }),
24358/* 234 */
24359/***/ (function(module, __webpack_exports__, __webpack_require__) {
24360
24361"use strict";
24362__webpack_require__.r(__webpack_exports__);
24363/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
24364/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24365/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(200);
24366/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
24367/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
24368
24369
24370
24371function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
24372 var resultSelector;
24373 var initialState;
24374 if (arguments.length == 1) {
24375 var options = initialStateOrOptions;
24376 initialState = options.initialState;
24377 condition = options.condition;
24378 iterate = options.iterate;
24379 resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
24380 scheduler = options.scheduler;
24381 }
24382 else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) {
24383 initialState = initialStateOrOptions;
24384 resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
24385 scheduler = resultSelectorOrObservable;
24386 }
24387 else {
24388 initialState = initialStateOrOptions;
24389 resultSelector = resultSelectorOrObservable;
24390 }
24391 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24392 var state = initialState;
24393 if (scheduler) {
24394 return scheduler.schedule(dispatch, 0, {
24395 subscriber: subscriber,
24396 iterate: iterate,
24397 condition: condition,
24398 resultSelector: resultSelector,
24399 state: state
24400 });
24401 }
24402 do {
24403 if (condition) {
24404 var conditionResult = void 0;
24405 try {
24406 conditionResult = condition(state);
24407 }
24408 catch (err) {
24409 subscriber.error(err);
24410 return undefined;
24411 }
24412 if (!conditionResult) {
24413 subscriber.complete();
24414 break;
24415 }
24416 }
24417 var value = void 0;
24418 try {
24419 value = resultSelector(state);
24420 }
24421 catch (err) {
24422 subscriber.error(err);
24423 return undefined;
24424 }
24425 subscriber.next(value);
24426 if (subscriber.closed) {
24427 break;
24428 }
24429 try {
24430 state = iterate(state);
24431 }
24432 catch (err) {
24433 subscriber.error(err);
24434 return undefined;
24435 }
24436 } while (true);
24437 return undefined;
24438 });
24439}
24440function dispatch(state) {
24441 var subscriber = state.subscriber, condition = state.condition;
24442 if (subscriber.closed) {
24443 return undefined;
24444 }
24445 if (state.needIterate) {
24446 try {
24447 state.state = state.iterate(state.state);
24448 }
24449 catch (err) {
24450 subscriber.error(err);
24451 return undefined;
24452 }
24453 }
24454 else {
24455 state.needIterate = true;
24456 }
24457 if (condition) {
24458 var conditionResult = void 0;
24459 try {
24460 conditionResult = condition(state.state);
24461 }
24462 catch (err) {
24463 subscriber.error(err);
24464 return undefined;
24465 }
24466 if (!conditionResult) {
24467 subscriber.complete();
24468 return undefined;
24469 }
24470 if (subscriber.closed) {
24471 return undefined;
24472 }
24473 }
24474 var value;
24475 try {
24476 value = state.resultSelector(state.state);
24477 }
24478 catch (err) {
24479 subscriber.error(err);
24480 return undefined;
24481 }
24482 if (subscriber.closed) {
24483 return undefined;
24484 }
24485 subscriber.next(value);
24486 if (subscriber.closed) {
24487 return undefined;
24488 }
24489 return this.schedule(state);
24490}
24491//# sourceMappingURL=generate.js.map
24492
24493
24494/***/ }),
24495/* 235 */
24496/***/ (function(module, __webpack_exports__, __webpack_require__) {
24497
24498"use strict";
24499__webpack_require__.r(__webpack_exports__);
24500/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
24501/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(230);
24502/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
24503/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
24504
24505
24506function iif(condition, trueResult, falseResult) {
24507 if (trueResult === void 0) {
24508 trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
24509 }
24510 if (falseResult === void 0) {
24511 falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
24512 }
24513 return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(function () { return condition() ? trueResult : falseResult; });
24514}
24515//# sourceMappingURL=iif.js.map
24516
24517
24518/***/ }),
24519/* 236 */
24520/***/ (function(module, __webpack_exports__, __webpack_require__) {
24521
24522"use strict";
24523__webpack_require__.r(__webpack_exports__);
24524/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
24525/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24526/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
24527/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(237);
24528/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
24529
24530
24531
24532function interval(period, scheduler) {
24533 if (period === void 0) {
24534 period = 0;
24535 }
24536 if (scheduler === void 0) {
24537 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
24538 }
24539 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) {
24540 period = 0;
24541 }
24542 if (!scheduler || typeof scheduler.schedule !== 'function') {
24543 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
24544 }
24545 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24546 subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
24547 return subscriber;
24548 });
24549}
24550function dispatch(state) {
24551 var subscriber = state.subscriber, counter = state.counter, period = state.period;
24552 subscriber.next(counter);
24553 this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
24554}
24555//# sourceMappingURL=interval.js.map
24556
24557
24558/***/ }),
24559/* 237 */
24560/***/ (function(module, __webpack_exports__, __webpack_require__) {
24561
24562"use strict";
24563__webpack_require__.r(__webpack_exports__);
24564/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
24565/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(158);
24566/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
24567
24568function isNumeric(val) {
24569 return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0;
24570}
24571//# sourceMappingURL=isNumeric.js.map
24572
24573
24574/***/ }),
24575/* 238 */
24576/***/ (function(module, __webpack_exports__, __webpack_require__) {
24577
24578"use strict";
24579__webpack_require__.r(__webpack_exports__);
24580/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
24581/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24582/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24583/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(221);
24584/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(186);
24585/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
24586
24587
24588
24589
24590function merge() {
24591 var observables = [];
24592 for (var _i = 0; _i < arguments.length; _i++) {
24593 observables[_i] = arguments[_i];
24594 }
24595 var concurrent = Number.POSITIVE_INFINITY;
24596 var scheduler = null;
24597 var last = observables[observables.length - 1];
24598 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) {
24599 scheduler = observables.pop();
24600 if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
24601 concurrent = observables.pop();
24602 }
24603 }
24604 else if (typeof last === 'number') {
24605 concurrent = observables.pop();
24606 }
24607 if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
24608 return observables[0];
24609 }
24610 return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler));
24611}
24612//# sourceMappingURL=merge.js.map
24613
24614
24615/***/ }),
24616/* 239 */
24617/***/ (function(module, __webpack_exports__, __webpack_require__) {
24618
24619"use strict";
24620__webpack_require__.r(__webpack_exports__);
24621/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; });
24622/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; });
24623/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24624/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(165);
24625/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
24626
24627
24628var NEVER = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);
24629function never() {
24630 return NEVER;
24631}
24632//# sourceMappingURL=never.js.map
24633
24634
24635/***/ }),
24636/* 240 */
24637/***/ (function(module, __webpack_exports__, __webpack_require__) {
24638
24639"use strict";
24640__webpack_require__.r(__webpack_exports__);
24641/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
24642/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24643/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
24644/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(158);
24645/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(183);
24646/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
24647
24648
24649
24650
24651function onErrorResumeNext() {
24652 var sources = [];
24653 for (var _i = 0; _i < arguments.length; _i++) {
24654 sources[_i] = arguments[_i];
24655 }
24656 if (sources.length === 0) {
24657 return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
24658 }
24659 var first = sources[0], remainder = sources.slice(1);
24660 if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) {
24661 return onErrorResumeNext.apply(void 0, first);
24662 }
24663 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24664 var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
24665 return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
24666 next: function (value) { subscriber.next(value); },
24667 error: subNext,
24668 complete: subNext,
24669 });
24670 });
24671}
24672//# sourceMappingURL=onErrorResumeNext.js.map
24673
24674
24675/***/ }),
24676/* 241 */
24677/***/ (function(module, __webpack_exports__, __webpack_require__) {
24678
24679"use strict";
24680__webpack_require__.r(__webpack_exports__);
24681/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
24682/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
24683/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24684/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
24685/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
24686
24687
24688function pairs(obj, scheduler) {
24689 if (!scheduler) {
24690 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24691 var keys = Object.keys(obj);
24692 for (var i = 0; i < keys.length && !subscriber.closed; i++) {
24693 var key = keys[i];
24694 if (obj.hasOwnProperty(key)) {
24695 subscriber.next([key, obj[key]]);
24696 }
24697 }
24698 subscriber.complete();
24699 });
24700 }
24701 else {
24702 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24703 var keys = Object.keys(obj);
24704 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
24705 subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
24706 return subscription;
24707 });
24708 }
24709}
24710function dispatch(state) {
24711 var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
24712 if (!subscriber.closed) {
24713 if (index < keys.length) {
24714 var key = keys[index];
24715 subscriber.next([key, obj[key]]);
24716 subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
24717 }
24718 else {
24719 subscriber.complete();
24720 }
24721 }
24722}
24723//# sourceMappingURL=pairs.js.map
24724
24725
24726/***/ }),
24727/* 242 */
24728/***/ (function(module, __webpack_exports__, __webpack_require__) {
24729
24730"use strict";
24731__webpack_require__.r(__webpack_exports__);
24732/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
24733/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(243);
24734/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
24735/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(244);
24736/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(149);
24737/** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */
24738
24739
24740
24741
24742function partition(source, predicate, thisArg) {
24743 return [
24744 Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(predicate, thisArg)(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))),
24745 Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source)))
24746 ];
24747}
24748//# sourceMappingURL=partition.js.map
24749
24750
24751/***/ }),
24752/* 243 */
24753/***/ (function(module, __webpack_exports__, __webpack_require__) {
24754
24755"use strict";
24756__webpack_require__.r(__webpack_exports__);
24757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; });
24758/** PURE_IMPORTS_START PURE_IMPORTS_END */
24759function not(pred, thisArg) {
24760 function notPred() {
24761 return !(notPred.pred.apply(notPred.thisArg, arguments));
24762 }
24763 notPred.pred = pred;
24764 notPred.thisArg = thisArg;
24765 return notPred;
24766}
24767//# sourceMappingURL=not.js.map
24768
24769
24770/***/ }),
24771/* 244 */
24772/***/ (function(module, __webpack_exports__, __webpack_require__) {
24773
24774"use strict";
24775__webpack_require__.r(__webpack_exports__);
24776/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
24777/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
24778/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
24779/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
24780
24781
24782function filter(predicate, thisArg) {
24783 return function filterOperatorFunction(source) {
24784 return source.lift(new FilterOperator(predicate, thisArg));
24785 };
24786}
24787var FilterOperator = /*@__PURE__*/ (function () {
24788 function FilterOperator(predicate, thisArg) {
24789 this.predicate = predicate;
24790 this.thisArg = thisArg;
24791 }
24792 FilterOperator.prototype.call = function (subscriber, source) {
24793 return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
24794 };
24795 return FilterOperator;
24796}());
24797var FilterSubscriber = /*@__PURE__*/ (function (_super) {
24798 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FilterSubscriber, _super);
24799 function FilterSubscriber(destination, predicate, thisArg) {
24800 var _this = _super.call(this, destination) || this;
24801 _this.predicate = predicate;
24802 _this.thisArg = thisArg;
24803 _this.count = 0;
24804 return _this;
24805 }
24806 FilterSubscriber.prototype._next = function (value) {
24807 var result;
24808 try {
24809 result = this.predicate.call(this.thisArg, value, this.count++);
24810 }
24811 catch (err) {
24812 this.destination.error(err);
24813 return;
24814 }
24815 if (result) {
24816 this.destination.next(value);
24817 }
24818 };
24819 return FilterSubscriber;
24820}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24821//# sourceMappingURL=filter.js.map
24822
24823
24824/***/ }),
24825/* 245 */
24826/***/ (function(module, __webpack_exports__, __webpack_require__) {
24827
24828"use strict";
24829__webpack_require__.r(__webpack_exports__);
24830/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
24831/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; });
24832/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; });
24833/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
24834/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(158);
24835/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(186);
24836/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
24837/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(210);
24838/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
24839
24840
24841
24842
24843
24844function race() {
24845 var observables = [];
24846 for (var _i = 0; _i < arguments.length; _i++) {
24847 observables[_i] = arguments[_i];
24848 }
24849 if (observables.length === 1) {
24850 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
24851 observables = observables[0];
24852 }
24853 else {
24854 return observables[0];
24855 }
24856 }
24857 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__["fromArray"])(observables, undefined).lift(new RaceOperator());
24858}
24859var RaceOperator = /*@__PURE__*/ (function () {
24860 function RaceOperator() {
24861 }
24862 RaceOperator.prototype.call = function (subscriber, source) {
24863 return source.subscribe(new RaceSubscriber(subscriber));
24864 };
24865 return RaceOperator;
24866}());
24867
24868var RaceSubscriber = /*@__PURE__*/ (function (_super) {
24869 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RaceSubscriber, _super);
24870 function RaceSubscriber(destination) {
24871 var _this = _super.call(this, destination) || this;
24872 _this.hasFirst = false;
24873 _this.observables = [];
24874 _this.subscriptions = [];
24875 return _this;
24876 }
24877 RaceSubscriber.prototype._next = function (observable) {
24878 this.observables.push(observable);
24879 };
24880 RaceSubscriber.prototype._complete = function () {
24881 var observables = this.observables;
24882 var len = observables.length;
24883 if (len === 0) {
24884 this.destination.complete();
24885 }
24886 else {
24887 for (var i = 0; i < len && !this.hasFirst; i++) {
24888 var observable = observables[i];
24889 var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i);
24890 if (this.subscriptions) {
24891 this.subscriptions.push(subscription);
24892 }
24893 this.add(subscription);
24894 }
24895 this.observables = null;
24896 }
24897 };
24898 RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
24899 if (!this.hasFirst) {
24900 this.hasFirst = true;
24901 for (var i = 0; i < this.subscriptions.length; i++) {
24902 if (i !== outerIndex) {
24903 var subscription = this.subscriptions[i];
24904 subscription.unsubscribe();
24905 this.remove(subscription);
24906 }
24907 }
24908 this.subscriptions = null;
24909 }
24910 this.destination.next(innerValue);
24911 };
24912 return RaceSubscriber;
24913}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
24914
24915//# sourceMappingURL=race.js.map
24916
24917
24918/***/ }),
24919/* 246 */
24920/***/ (function(module, __webpack_exports__, __webpack_require__) {
24921
24922"use strict";
24923__webpack_require__.r(__webpack_exports__);
24924/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; });
24925/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
24926/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24927/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
24928
24929function range(start, count, scheduler) {
24930 if (start === void 0) {
24931 start = 0;
24932 }
24933 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24934 if (count === undefined) {
24935 count = start;
24936 start = 0;
24937 }
24938 var index = 0;
24939 var current = start;
24940 if (scheduler) {
24941 return scheduler.schedule(dispatch, 0, {
24942 index: index, count: count, start: start, subscriber: subscriber
24943 });
24944 }
24945 else {
24946 do {
24947 if (index++ >= count) {
24948 subscriber.complete();
24949 break;
24950 }
24951 subscriber.next(current++);
24952 if (subscriber.closed) {
24953 break;
24954 }
24955 } while (true);
24956 }
24957 return undefined;
24958 });
24959}
24960function dispatch(state) {
24961 var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
24962 if (index >= count) {
24963 subscriber.complete();
24964 return;
24965 }
24966 subscriber.next(start);
24967 if (subscriber.closed) {
24968 return;
24969 }
24970 state.index = index + 1;
24971 state.start = start + 1;
24972 this.schedule(state);
24973}
24974//# sourceMappingURL=range.js.map
24975
24976
24977/***/ }),
24978/* 247 */
24979/***/ (function(module, __webpack_exports__, __webpack_require__) {
24980
24981"use strict";
24982__webpack_require__.r(__webpack_exports__);
24983/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
24984/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
24985/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
24986/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(237);
24987/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(185);
24988/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
24989
24990
24991
24992
24993function timer(dueTime, periodOrScheduler, scheduler) {
24994 if (dueTime === void 0) {
24995 dueTime = 0;
24996 }
24997 var period = -1;
24998 if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) {
24999 period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
25000 }
25001 else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) {
25002 scheduler = periodOrScheduler;
25003 }
25004 if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) {
25005 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
25006 }
25007 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
25008 var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime)
25009 ? dueTime
25010 : (+dueTime - scheduler.now());
25011 return scheduler.schedule(dispatch, due, {
25012 index: 0, period: period, subscriber: subscriber
25013 });
25014 });
25015}
25016function dispatch(state) {
25017 var index = state.index, period = state.period, subscriber = state.subscriber;
25018 subscriber.next(index);
25019 if (subscriber.closed) {
25020 return;
25021 }
25022 else if (period === -1) {
25023 return subscriber.complete();
25024 }
25025 state.index = index + 1;
25026 this.schedule(state, period);
25027}
25028//# sourceMappingURL=timer.js.map
25029
25030
25031/***/ }),
25032/* 248 */
25033/***/ (function(module, __webpack_exports__, __webpack_require__) {
25034
25035"use strict";
25036__webpack_require__.r(__webpack_exports__);
25037/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; });
25038/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
25039/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
25040/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
25041/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
25042
25043
25044
25045function using(resourceFactory, observableFactory) {
25046 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
25047 var resource;
25048 try {
25049 resource = resourceFactory();
25050 }
25051 catch (err) {
25052 subscriber.error(err);
25053 return undefined;
25054 }
25055 var result;
25056 try {
25057 result = observableFactory(resource);
25058 }
25059 catch (err) {
25060 subscriber.error(err);
25061 return undefined;
25062 }
25063 var source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
25064 var subscription = source.subscribe(subscriber);
25065 return function () {
25066 subscription.unsubscribe();
25067 if (resource) {
25068 resource.unsubscribe();
25069 }
25070 };
25071 });
25072}
25073//# sourceMappingURL=using.js.map
25074
25075
25076/***/ }),
25077/* 249 */
25078/***/ (function(module, __webpack_exports__, __webpack_require__) {
25079
25080"use strict";
25081__webpack_require__.r(__webpack_exports__);
25082/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
25083/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; });
25084/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; });
25085/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
25086/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(186);
25087/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(158);
25088/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(151);
25089/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(209);
25090/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(210);
25091/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(215);
25092/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
25093
25094
25095
25096
25097
25098
25099
25100function zip() {
25101 var observables = [];
25102 for (var _i = 0; _i < arguments.length; _i++) {
25103 observables[_i] = arguments[_i];
25104 }
25105 var resultSelector = observables[observables.length - 1];
25106 if (typeof resultSelector === 'function') {
25107 observables.pop();
25108 }
25109 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
25110}
25111var ZipOperator = /*@__PURE__*/ (function () {
25112 function ZipOperator(resultSelector) {
25113 this.resultSelector = resultSelector;
25114 }
25115 ZipOperator.prototype.call = function (subscriber, source) {
25116 return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
25117 };
25118 return ZipOperator;
25119}());
25120
25121var ZipSubscriber = /*@__PURE__*/ (function (_super) {
25122 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipSubscriber, _super);
25123 function ZipSubscriber(destination, resultSelector, values) {
25124 if (values === void 0) {
25125 values = Object.create(null);
25126 }
25127 var _this = _super.call(this, destination) || this;
25128 _this.iterators = [];
25129 _this.active = 0;
25130 _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
25131 _this.values = values;
25132 return _this;
25133 }
25134 ZipSubscriber.prototype._next = function (value) {
25135 var iterators = this.iterators;
25136 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
25137 iterators.push(new StaticArrayIterator(value));
25138 }
25139 else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] === 'function') {
25140 iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]]()));
25141 }
25142 else {
25143 iterators.push(new ZipBufferIterator(this.destination, this, value));
25144 }
25145 };
25146 ZipSubscriber.prototype._complete = function () {
25147 var iterators = this.iterators;
25148 var len = iterators.length;
25149 this.unsubscribe();
25150 if (len === 0) {
25151 this.destination.complete();
25152 return;
25153 }
25154 this.active = len;
25155 for (var i = 0; i < len; i++) {
25156 var iterator = iterators[i];
25157 if (iterator.stillUnsubscribed) {
25158 var destination = this.destination;
25159 destination.add(iterator.subscribe(iterator, i));
25160 }
25161 else {
25162 this.active--;
25163 }
25164 }
25165 };
25166 ZipSubscriber.prototype.notifyInactive = function () {
25167 this.active--;
25168 if (this.active === 0) {
25169 this.destination.complete();
25170 }
25171 };
25172 ZipSubscriber.prototype.checkIterators = function () {
25173 var iterators = this.iterators;
25174 var len = iterators.length;
25175 var destination = this.destination;
25176 for (var i = 0; i < len; i++) {
25177 var iterator = iterators[i];
25178 if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
25179 return;
25180 }
25181 }
25182 var shouldComplete = false;
25183 var args = [];
25184 for (var i = 0; i < len; i++) {
25185 var iterator = iterators[i];
25186 var result = iterator.next();
25187 if (iterator.hasCompleted()) {
25188 shouldComplete = true;
25189 }
25190 if (result.done) {
25191 destination.complete();
25192 return;
25193 }
25194 args.push(result.value);
25195 }
25196 if (this.resultSelector) {
25197 this._tryresultSelector(args);
25198 }
25199 else {
25200 destination.next(args);
25201 }
25202 if (shouldComplete) {
25203 destination.complete();
25204 }
25205 };
25206 ZipSubscriber.prototype._tryresultSelector = function (args) {
25207 var result;
25208 try {
25209 result = this.resultSelector.apply(this, args);
25210 }
25211 catch (err) {
25212 this.destination.error(err);
25213 return;
25214 }
25215 this.destination.next(result);
25216 };
25217 return ZipSubscriber;
25218}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
25219
25220var StaticIterator = /*@__PURE__*/ (function () {
25221 function StaticIterator(iterator) {
25222 this.iterator = iterator;
25223 this.nextResult = iterator.next();
25224 }
25225 StaticIterator.prototype.hasValue = function () {
25226 return true;
25227 };
25228 StaticIterator.prototype.next = function () {
25229 var result = this.nextResult;
25230 this.nextResult = this.iterator.next();
25231 return result;
25232 };
25233 StaticIterator.prototype.hasCompleted = function () {
25234 var nextResult = this.nextResult;
25235 return nextResult && nextResult.done;
25236 };
25237 return StaticIterator;
25238}());
25239var StaticArrayIterator = /*@__PURE__*/ (function () {
25240 function StaticArrayIterator(array) {
25241 this.array = array;
25242 this.index = 0;
25243 this.length = 0;
25244 this.length = array.length;
25245 }
25246 StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
25247 return this;
25248 };
25249 StaticArrayIterator.prototype.next = function (value) {
25250 var i = this.index++;
25251 var array = this.array;
25252 return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
25253 };
25254 StaticArrayIterator.prototype.hasValue = function () {
25255 return this.array.length > this.index;
25256 };
25257 StaticArrayIterator.prototype.hasCompleted = function () {
25258 return this.array.length === this.index;
25259 };
25260 return StaticArrayIterator;
25261}());
25262var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
25263 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipBufferIterator, _super);
25264 function ZipBufferIterator(destination, parent, observable) {
25265 var _this = _super.call(this, destination) || this;
25266 _this.parent = parent;
25267 _this.observable = observable;
25268 _this.stillUnsubscribed = true;
25269 _this.buffer = [];
25270 _this.isComplete = false;
25271 return _this;
25272 }
25273 ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
25274 return this;
25275 };
25276 ZipBufferIterator.prototype.next = function () {
25277 var buffer = this.buffer;
25278 if (buffer.length === 0 && this.isComplete) {
25279 return { value: null, done: true };
25280 }
25281 else {
25282 return { value: buffer.shift(), done: false };
25283 }
25284 };
25285 ZipBufferIterator.prototype.hasValue = function () {
25286 return this.buffer.length > 0;
25287 };
25288 ZipBufferIterator.prototype.hasCompleted = function () {
25289 return this.buffer.length === 0 && this.isComplete;
25290 };
25291 ZipBufferIterator.prototype.notifyComplete = function () {
25292 if (this.buffer.length > 0) {
25293 this.isComplete = true;
25294 this.parent.notifyInactive();
25295 }
25296 else {
25297 this.destination.complete();
25298 }
25299 };
25300 ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
25301 this.buffer.push(innerValue);
25302 this.parent.checkIterators();
25303 };
25304 ZipBufferIterator.prototype.subscribe = function (value, index) {
25305 return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, this.observable, this, index);
25306 };
25307 return ZipBufferIterator;
25308}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
25309//# sourceMappingURL=zip.js.map
25310
25311
25312/***/ }),
25313/* 250 */,
25314/* 251 */
25315/***/ (function(module, __webpack_exports__, __webpack_require__) {
25316
25317"use strict";
25318__webpack_require__.r(__webpack_exports__);
25319/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(252);
25320/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; });
25321
25322/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(253);
25323/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; });
25324
25325/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(254);
25326/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; });
25327
25328/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(255);
25329/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; });
25330
25331/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(256);
25332/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; });
25333
25334/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(257);
25335/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; });
25336
25337/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(258);
25338/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; });
25339
25340/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(259);
25341/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; });
25342
25343/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(260);
25344/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; });
25345
25346/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(261);
25347/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; });
25348
25349/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(262);
25350/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; });
25351
25352/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(220);
25353/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; });
25354
25355/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(263);
25356/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; });
25357
25358/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(264);
25359/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; });
25360
25361/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(265);
25362/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; });
25363
25364/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(266);
25365/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; });
25366
25367/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(267);
25368/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; });
25369
25370/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(268);
25371/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; });
25372
25373/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(269);
25374/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; });
25375
25376/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(271);
25377/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; });
25378
25379/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(272);
25380/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; });
25381
25382/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(273);
25383/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; });
25384
25385/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(274);
25386/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; });
25387
25388/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(275);
25389/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; });
25390
25391/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(276);
25392/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; });
25393
25394/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(279);
25395/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; });
25396
25397/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(280);
25398/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; });
25399
25400/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(281);
25401/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; });
25402
25403/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(282);
25404/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; });
25405
25406/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(283);
25407/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; });
25408
25409/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(244);
25410/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; });
25411
25412/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(284);
25413/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; });
25414
25415/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(285);
25416/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; });
25417
25418/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(286);
25419/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; });
25420
25421/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(287);
25422/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; });
25423
25424/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(171);
25425/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; });
25426
25427/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(288);
25428/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; });
25429
25430/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(289);
25431/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; });
25432
25433/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(290);
25434/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; });
25435
25436/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(206);
25437/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; });
25438
25439/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(292);
25440/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; });
25441
25442/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(293);
25443/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; });
25444
25445/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(294);
25446/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; });
25447
25448/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(297);
25449/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; });
25450
25451/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(221);
25452/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; });
25453
25454/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(222);
25455/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
25456
25457/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
25458
25459/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(298);
25460/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; });
25461
25462/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(299);
25463/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; });
25464
25465/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(300);
25466/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; });
25467
25468/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(301);
25469/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; });
25470
25471/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(181);
25472/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; });
25473
25474/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(302);
25475/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; });
25476
25477/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(303);
25478/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; });
25479
25480/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(304);
25481/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; });
25482
25483/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(305);
25484/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; });
25485
25486/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(306);
25487/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; });
25488
25489/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(307);
25490/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; });
25491
25492/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(308);
25493/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; });
25494
25495/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(309);
25496/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; });
25497
25498/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(310);
25499/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; });
25500
25501/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(295);
25502/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; });
25503
25504/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(311);
25505/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; });
25506
25507/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(312);
25508/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; });
25509
25510/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(313);
25511/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; });
25512
25513/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(314);
25514/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; });
25515
25516/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(170);
25517/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; });
25518
25519/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(315);
25520/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; });
25521
25522/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(316);
25523/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; });
25524
25525/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(296);
25526/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; });
25527
25528/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(317);
25529/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; });
25530
25531/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(318);
25532/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; });
25533
25534/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(319);
25535/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; });
25536
25537/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(320);
25538/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; });
25539
25540/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(321);
25541/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; });
25542
25543/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(322);
25544/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; });
25545
25546/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(323);
25547/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; });
25548
25549/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(324);
25550/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; });
25551
25552/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(325);
25553/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; });
25554
25555/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(326);
25556/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; });
25557
25558/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(328);
25559/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; });
25560
25561/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(329);
25562/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; });
25563
25564/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(330);
25565/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; });
25566
25567/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(278);
25568/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; });
25569
25570/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(291);
25571/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; });
25572
25573/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(331);
25574/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; });
25575
25576/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(332);
25577/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; });
25578
25579/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(333);
25580/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; });
25581
25582/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(334);
25583/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; });
25584
25585/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(335);
25586/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; });
25587
25588/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(277);
25589/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; });
25590
25591/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(336);
25592/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; });
25593
25594/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(337);
25595/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; });
25596
25597/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(338);
25598/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; });
25599
25600/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(339);
25601/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; });
25602
25603/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(340);
25604/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; });
25605
25606/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(341);
25607/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; });
25608
25609/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(342);
25610/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; });
25611
25612/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(343);
25613/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; });
25614
25615/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(344);
25616/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; });
25617
25618/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(345);
25619/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; });
25620
25621/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(346);
25622/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; });
25623
25624/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(347);
25625/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; });
25626
25627/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(348);
25628/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; });
25629
25630/** PURE_IMPORTS_START PURE_IMPORTS_END */
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735//# sourceMappingURL=index.js.map
25736
25737
25738/***/ }),
25739/* 252 */
25740/***/ (function(module, __webpack_exports__, __webpack_require__) {
25741
25742"use strict";
25743__webpack_require__.r(__webpack_exports__);
25744/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
25745/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
25746/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
25747/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
25748/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
25749
25750
25751
25752function audit(durationSelector) {
25753 return function auditOperatorFunction(source) {
25754 return source.lift(new AuditOperator(durationSelector));
25755 };
25756}
25757var AuditOperator = /*@__PURE__*/ (function () {
25758 function AuditOperator(durationSelector) {
25759 this.durationSelector = durationSelector;
25760 }
25761 AuditOperator.prototype.call = function (subscriber, source) {
25762 return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
25763 };
25764 return AuditOperator;
25765}());
25766var AuditSubscriber = /*@__PURE__*/ (function (_super) {
25767 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AuditSubscriber, _super);
25768 function AuditSubscriber(destination, durationSelector) {
25769 var _this = _super.call(this, destination) || this;
25770 _this.durationSelector = durationSelector;
25771 _this.hasValue = false;
25772 return _this;
25773 }
25774 AuditSubscriber.prototype._next = function (value) {
25775 this.value = value;
25776 this.hasValue = true;
25777 if (!this.throttled) {
25778 var duration = void 0;
25779 try {
25780 var durationSelector = this.durationSelector;
25781 duration = durationSelector(value);
25782 }
25783 catch (err) {
25784 return this.destination.error(err);
25785 }
25786 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
25787 if (!innerSubscription || innerSubscription.closed) {
25788 this.clearThrottle();
25789 }
25790 else {
25791 this.add(this.throttled = innerSubscription);
25792 }
25793 }
25794 };
25795 AuditSubscriber.prototype.clearThrottle = function () {
25796 var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
25797 if (throttled) {
25798 this.remove(throttled);
25799 this.throttled = null;
25800 throttled.unsubscribe();
25801 }
25802 if (hasValue) {
25803 this.value = null;
25804 this.hasValue = false;
25805 this.destination.next(value);
25806 }
25807 };
25808 AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
25809 this.clearThrottle();
25810 };
25811 AuditSubscriber.prototype.notifyComplete = function () {
25812 this.clearThrottle();
25813 };
25814 return AuditSubscriber;
25815}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
25816//# sourceMappingURL=audit.js.map
25817
25818
25819/***/ }),
25820/* 253 */
25821/***/ (function(module, __webpack_exports__, __webpack_require__) {
25822
25823"use strict";
25824__webpack_require__.r(__webpack_exports__);
25825/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
25826/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(195);
25827/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(252);
25828/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(247);
25829/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
25830
25831
25832
25833function auditTime(duration, scheduler) {
25834 if (scheduler === void 0) {
25835 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
25836 }
25837 return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(function () { return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler); });
25838}
25839//# sourceMappingURL=auditTime.js.map
25840
25841
25842/***/ }),
25843/* 254 */
25844/***/ (function(module, __webpack_exports__, __webpack_require__) {
25845
25846"use strict";
25847__webpack_require__.r(__webpack_exports__);
25848/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; });
25849/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
25850/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
25851/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
25852/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
25853
25854
25855
25856function buffer(closingNotifier) {
25857 return function bufferOperatorFunction(source) {
25858 return source.lift(new BufferOperator(closingNotifier));
25859 };
25860}
25861var BufferOperator = /*@__PURE__*/ (function () {
25862 function BufferOperator(closingNotifier) {
25863 this.closingNotifier = closingNotifier;
25864 }
25865 BufferOperator.prototype.call = function (subscriber, source) {
25866 return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
25867 };
25868 return BufferOperator;
25869}());
25870var BufferSubscriber = /*@__PURE__*/ (function (_super) {
25871 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSubscriber, _super);
25872 function BufferSubscriber(destination, closingNotifier) {
25873 var _this = _super.call(this, destination) || this;
25874 _this.buffer = [];
25875 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, closingNotifier));
25876 return _this;
25877 }
25878 BufferSubscriber.prototype._next = function (value) {
25879 this.buffer.push(value);
25880 };
25881 BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
25882 var buffer = this.buffer;
25883 this.buffer = [];
25884 this.destination.next(buffer);
25885 };
25886 return BufferSubscriber;
25887}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
25888//# sourceMappingURL=buffer.js.map
25889
25890
25891/***/ }),
25892/* 255 */
25893/***/ (function(module, __webpack_exports__, __webpack_require__) {
25894
25895"use strict";
25896__webpack_require__.r(__webpack_exports__);
25897/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
25898/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
25899/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
25900/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
25901
25902
25903function bufferCount(bufferSize, startBufferEvery) {
25904 if (startBufferEvery === void 0) {
25905 startBufferEvery = null;
25906 }
25907 return function bufferCountOperatorFunction(source) {
25908 return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
25909 };
25910}
25911var BufferCountOperator = /*@__PURE__*/ (function () {
25912 function BufferCountOperator(bufferSize, startBufferEvery) {
25913 this.bufferSize = bufferSize;
25914 this.startBufferEvery = startBufferEvery;
25915 if (!startBufferEvery || bufferSize === startBufferEvery) {
25916 this.subscriberClass = BufferCountSubscriber;
25917 }
25918 else {
25919 this.subscriberClass = BufferSkipCountSubscriber;
25920 }
25921 }
25922 BufferCountOperator.prototype.call = function (subscriber, source) {
25923 return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
25924 };
25925 return BufferCountOperator;
25926}());
25927var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
25928 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferCountSubscriber, _super);
25929 function BufferCountSubscriber(destination, bufferSize) {
25930 var _this = _super.call(this, destination) || this;
25931 _this.bufferSize = bufferSize;
25932 _this.buffer = [];
25933 return _this;
25934 }
25935 BufferCountSubscriber.prototype._next = function (value) {
25936 var buffer = this.buffer;
25937 buffer.push(value);
25938 if (buffer.length == this.bufferSize) {
25939 this.destination.next(buffer);
25940 this.buffer = [];
25941 }
25942 };
25943 BufferCountSubscriber.prototype._complete = function () {
25944 var buffer = this.buffer;
25945 if (buffer.length > 0) {
25946 this.destination.next(buffer);
25947 }
25948 _super.prototype._complete.call(this);
25949 };
25950 return BufferCountSubscriber;
25951}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
25952var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
25953 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSkipCountSubscriber, _super);
25954 function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
25955 var _this = _super.call(this, destination) || this;
25956 _this.bufferSize = bufferSize;
25957 _this.startBufferEvery = startBufferEvery;
25958 _this.buffers = [];
25959 _this.count = 0;
25960 return _this;
25961 }
25962 BufferSkipCountSubscriber.prototype._next = function (value) {
25963 var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
25964 this.count++;
25965 if (count % startBufferEvery === 0) {
25966 buffers.push([]);
25967 }
25968 for (var i = buffers.length; i--;) {
25969 var buffer = buffers[i];
25970 buffer.push(value);
25971 if (buffer.length === bufferSize) {
25972 buffers.splice(i, 1);
25973 this.destination.next(buffer);
25974 }
25975 }
25976 };
25977 BufferSkipCountSubscriber.prototype._complete = function () {
25978 var _a = this, buffers = _a.buffers, destination = _a.destination;
25979 while (buffers.length > 0) {
25980 var buffer = buffers.shift();
25981 if (buffer.length > 0) {
25982 destination.next(buffer);
25983 }
25984 }
25985 _super.prototype._complete.call(this);
25986 };
25987 return BufferSkipCountSubscriber;
25988}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
25989//# sourceMappingURL=bufferCount.js.map
25990
25991
25992/***/ }),
25993/* 256 */
25994/***/ (function(module, __webpack_exports__, __webpack_require__) {
25995
25996"use strict";
25997__webpack_require__.r(__webpack_exports__);
25998/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
25999/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26000/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
26001/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(151);
26002/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(185);
26003/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
26004
26005
26006
26007
26008function bufferTime(bufferTimeSpan) {
26009 var length = arguments.length;
26010 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
26011 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(arguments[arguments.length - 1])) {
26012 scheduler = arguments[arguments.length - 1];
26013 length--;
26014 }
26015 var bufferCreationInterval = null;
26016 if (length >= 2) {
26017 bufferCreationInterval = arguments[1];
26018 }
26019 var maxBufferSize = Number.POSITIVE_INFINITY;
26020 if (length >= 3) {
26021 maxBufferSize = arguments[2];
26022 }
26023 return function bufferTimeOperatorFunction(source) {
26024 return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
26025 };
26026}
26027var BufferTimeOperator = /*@__PURE__*/ (function () {
26028 function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
26029 this.bufferTimeSpan = bufferTimeSpan;
26030 this.bufferCreationInterval = bufferCreationInterval;
26031 this.maxBufferSize = maxBufferSize;
26032 this.scheduler = scheduler;
26033 }
26034 BufferTimeOperator.prototype.call = function (subscriber, source) {
26035 return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
26036 };
26037 return BufferTimeOperator;
26038}());
26039var Context = /*@__PURE__*/ (function () {
26040 function Context() {
26041 this.buffer = [];
26042 }
26043 return Context;
26044}());
26045var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
26046 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferTimeSubscriber, _super);
26047 function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
26048 var _this = _super.call(this, destination) || this;
26049 _this.bufferTimeSpan = bufferTimeSpan;
26050 _this.bufferCreationInterval = bufferCreationInterval;
26051 _this.maxBufferSize = maxBufferSize;
26052 _this.scheduler = scheduler;
26053 _this.contexts = [];
26054 var context = _this.openContext();
26055 _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
26056 if (_this.timespanOnly) {
26057 var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
26058 _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
26059 }
26060 else {
26061 var closeState = { subscriber: _this, context: context };
26062 var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
26063 _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
26064 _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
26065 }
26066 return _this;
26067 }
26068 BufferTimeSubscriber.prototype._next = function (value) {
26069 var contexts = this.contexts;
26070 var len = contexts.length;
26071 var filledBufferContext;
26072 for (var i = 0; i < len; i++) {
26073 var context_1 = contexts[i];
26074 var buffer = context_1.buffer;
26075 buffer.push(value);
26076 if (buffer.length == this.maxBufferSize) {
26077 filledBufferContext = context_1;
26078 }
26079 }
26080 if (filledBufferContext) {
26081 this.onBufferFull(filledBufferContext);
26082 }
26083 };
26084 BufferTimeSubscriber.prototype._error = function (err) {
26085 this.contexts.length = 0;
26086 _super.prototype._error.call(this, err);
26087 };
26088 BufferTimeSubscriber.prototype._complete = function () {
26089 var _a = this, contexts = _a.contexts, destination = _a.destination;
26090 while (contexts.length > 0) {
26091 var context_2 = contexts.shift();
26092 destination.next(context_2.buffer);
26093 }
26094 _super.prototype._complete.call(this);
26095 };
26096 BufferTimeSubscriber.prototype._unsubscribe = function () {
26097 this.contexts = null;
26098 };
26099 BufferTimeSubscriber.prototype.onBufferFull = function (context) {
26100 this.closeContext(context);
26101 var closeAction = context.closeAction;
26102 closeAction.unsubscribe();
26103 this.remove(closeAction);
26104 if (!this.closed && this.timespanOnly) {
26105 context = this.openContext();
26106 var bufferTimeSpan = this.bufferTimeSpan;
26107 var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
26108 this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
26109 }
26110 };
26111 BufferTimeSubscriber.prototype.openContext = function () {
26112 var context = new Context();
26113 this.contexts.push(context);
26114 return context;
26115 };
26116 BufferTimeSubscriber.prototype.closeContext = function (context) {
26117 this.destination.next(context.buffer);
26118 var contexts = this.contexts;
26119 var spliceIndex = contexts ? contexts.indexOf(context) : -1;
26120 if (spliceIndex >= 0) {
26121 contexts.splice(contexts.indexOf(context), 1);
26122 }
26123 };
26124 return BufferTimeSubscriber;
26125}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
26126function dispatchBufferTimeSpanOnly(state) {
26127 var subscriber = state.subscriber;
26128 var prevContext = state.context;
26129 if (prevContext) {
26130 subscriber.closeContext(prevContext);
26131 }
26132 if (!subscriber.closed) {
26133 state.context = subscriber.openContext();
26134 state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
26135 }
26136}
26137function dispatchBufferCreation(state) {
26138 var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
26139 var context = subscriber.openContext();
26140 var action = this;
26141 if (!subscriber.closed) {
26142 subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
26143 action.schedule(state, bufferCreationInterval);
26144 }
26145}
26146function dispatchBufferClose(arg) {
26147 var subscriber = arg.subscriber, context = arg.context;
26148 subscriber.closeContext(context);
26149}
26150//# sourceMappingURL=bufferTime.js.map
26151
26152
26153/***/ }),
26154/* 257 */
26155/***/ (function(module, __webpack_exports__, __webpack_require__) {
26156
26157"use strict";
26158__webpack_require__.r(__webpack_exports__);
26159/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
26160/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26161/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
26162/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
26163/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
26164/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
26165
26166
26167
26168
26169function bufferToggle(openings, closingSelector) {
26170 return function bufferToggleOperatorFunction(source) {
26171 return source.lift(new BufferToggleOperator(openings, closingSelector));
26172 };
26173}
26174var BufferToggleOperator = /*@__PURE__*/ (function () {
26175 function BufferToggleOperator(openings, closingSelector) {
26176 this.openings = openings;
26177 this.closingSelector = closingSelector;
26178 }
26179 BufferToggleOperator.prototype.call = function (subscriber, source) {
26180 return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
26181 };
26182 return BufferToggleOperator;
26183}());
26184var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
26185 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferToggleSubscriber, _super);
26186 function BufferToggleSubscriber(destination, openings, closingSelector) {
26187 var _this = _super.call(this, destination) || this;
26188 _this.openings = openings;
26189 _this.closingSelector = closingSelector;
26190 _this.contexts = [];
26191 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, openings));
26192 return _this;
26193 }
26194 BufferToggleSubscriber.prototype._next = function (value) {
26195 var contexts = this.contexts;
26196 var len = contexts.length;
26197 for (var i = 0; i < len; i++) {
26198 contexts[i].buffer.push(value);
26199 }
26200 };
26201 BufferToggleSubscriber.prototype._error = function (err) {
26202 var contexts = this.contexts;
26203 while (contexts.length > 0) {
26204 var context_1 = contexts.shift();
26205 context_1.subscription.unsubscribe();
26206 context_1.buffer = null;
26207 context_1.subscription = null;
26208 }
26209 this.contexts = null;
26210 _super.prototype._error.call(this, err);
26211 };
26212 BufferToggleSubscriber.prototype._complete = function () {
26213 var contexts = this.contexts;
26214 while (contexts.length > 0) {
26215 var context_2 = contexts.shift();
26216 this.destination.next(context_2.buffer);
26217 context_2.subscription.unsubscribe();
26218 context_2.buffer = null;
26219 context_2.subscription = null;
26220 }
26221 this.contexts = null;
26222 _super.prototype._complete.call(this);
26223 };
26224 BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26225 outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
26226 };
26227 BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
26228 this.closeBuffer(innerSub.context);
26229 };
26230 BufferToggleSubscriber.prototype.openBuffer = function (value) {
26231 try {
26232 var closingSelector = this.closingSelector;
26233 var closingNotifier = closingSelector.call(this, value);
26234 if (closingNotifier) {
26235 this.trySubscribe(closingNotifier);
26236 }
26237 }
26238 catch (err) {
26239 this._error(err);
26240 }
26241 };
26242 BufferToggleSubscriber.prototype.closeBuffer = function (context) {
26243 var contexts = this.contexts;
26244 if (contexts && context) {
26245 var buffer = context.buffer, subscription = context.subscription;
26246 this.destination.next(buffer);
26247 contexts.splice(contexts.indexOf(context), 1);
26248 this.remove(subscription);
26249 subscription.unsubscribe();
26250 }
26251 };
26252 BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
26253 var contexts = this.contexts;
26254 var buffer = [];
26255 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
26256 var context = { buffer: buffer, subscription: subscription };
26257 contexts.push(context);
26258 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier, context);
26259 if (!innerSubscription || innerSubscription.closed) {
26260 this.closeBuffer(context);
26261 }
26262 else {
26263 innerSubscription.context = context;
26264 this.add(innerSubscription);
26265 subscription.add(innerSubscription);
26266 }
26267 };
26268 return BufferToggleSubscriber;
26269}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
26270//# sourceMappingURL=bufferToggle.js.map
26271
26272
26273/***/ }),
26274/* 258 */
26275/***/ (function(module, __webpack_exports__, __webpack_require__) {
26276
26277"use strict";
26278__webpack_require__.r(__webpack_exports__);
26279/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
26280/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26281/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
26282/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
26283/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
26284/** PURE_IMPORTS_START tslib,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
26285
26286
26287
26288
26289function bufferWhen(closingSelector) {
26290 return function (source) {
26291 return source.lift(new BufferWhenOperator(closingSelector));
26292 };
26293}
26294var BufferWhenOperator = /*@__PURE__*/ (function () {
26295 function BufferWhenOperator(closingSelector) {
26296 this.closingSelector = closingSelector;
26297 }
26298 BufferWhenOperator.prototype.call = function (subscriber, source) {
26299 return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
26300 };
26301 return BufferWhenOperator;
26302}());
26303var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
26304 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferWhenSubscriber, _super);
26305 function BufferWhenSubscriber(destination, closingSelector) {
26306 var _this = _super.call(this, destination) || this;
26307 _this.closingSelector = closingSelector;
26308 _this.subscribing = false;
26309 _this.openBuffer();
26310 return _this;
26311 }
26312 BufferWhenSubscriber.prototype._next = function (value) {
26313 this.buffer.push(value);
26314 };
26315 BufferWhenSubscriber.prototype._complete = function () {
26316 var buffer = this.buffer;
26317 if (buffer) {
26318 this.destination.next(buffer);
26319 }
26320 _super.prototype._complete.call(this);
26321 };
26322 BufferWhenSubscriber.prototype._unsubscribe = function () {
26323 this.buffer = null;
26324 this.subscribing = false;
26325 };
26326 BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26327 this.openBuffer();
26328 };
26329 BufferWhenSubscriber.prototype.notifyComplete = function () {
26330 if (this.subscribing) {
26331 this.complete();
26332 }
26333 else {
26334 this.openBuffer();
26335 }
26336 };
26337 BufferWhenSubscriber.prototype.openBuffer = function () {
26338 var closingSubscription = this.closingSubscription;
26339 if (closingSubscription) {
26340 this.remove(closingSubscription);
26341 closingSubscription.unsubscribe();
26342 }
26343 var buffer = this.buffer;
26344 if (this.buffer) {
26345 this.destination.next(buffer);
26346 }
26347 this.buffer = [];
26348 var closingNotifier;
26349 try {
26350 var closingSelector = this.closingSelector;
26351 closingNotifier = closingSelector();
26352 }
26353 catch (err) {
26354 return this.error(err);
26355 }
26356 closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
26357 this.closingSubscription = closingSubscription;
26358 this.add(closingSubscription);
26359 this.subscribing = true;
26360 closingSubscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
26361 this.subscribing = false;
26362 };
26363 return BufferWhenSubscriber;
26364}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
26365//# sourceMappingURL=bufferWhen.js.map
26366
26367
26368/***/ }),
26369/* 259 */
26370/***/ (function(module, __webpack_exports__, __webpack_require__) {
26371
26372"use strict";
26373__webpack_require__.r(__webpack_exports__);
26374/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
26375/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26376/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
26377/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(211);
26378/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
26379/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
26380
26381
26382
26383
26384function catchError(selector) {
26385 return function catchErrorOperatorFunction(source) {
26386 var operator = new CatchOperator(selector);
26387 var caught = source.lift(operator);
26388 return (operator.caught = caught);
26389 };
26390}
26391var CatchOperator = /*@__PURE__*/ (function () {
26392 function CatchOperator(selector) {
26393 this.selector = selector;
26394 }
26395 CatchOperator.prototype.call = function (subscriber, source) {
26396 return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
26397 };
26398 return CatchOperator;
26399}());
26400var CatchSubscriber = /*@__PURE__*/ (function (_super) {
26401 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CatchSubscriber, _super);
26402 function CatchSubscriber(destination, selector, caught) {
26403 var _this = _super.call(this, destination) || this;
26404 _this.selector = selector;
26405 _this.caught = caught;
26406 return _this;
26407 }
26408 CatchSubscriber.prototype.error = function (err) {
26409 if (!this.isStopped) {
26410 var result = void 0;
26411 try {
26412 result = this.selector(err, this.caught);
26413 }
26414 catch (err2) {
26415 _super.prototype.error.call(this, err2);
26416 return;
26417 }
26418 this._unsubscribeAndRecycle();
26419 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
26420 this.add(innerSubscriber);
26421 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
26422 }
26423 };
26424 return CatchSubscriber;
26425}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
26426//# sourceMappingURL=catchError.js.map
26427
26428
26429/***/ }),
26430/* 260 */
26431/***/ (function(module, __webpack_exports__, __webpack_require__) {
26432
26433"use strict";
26434__webpack_require__.r(__webpack_exports__);
26435/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
26436/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(208);
26437/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
26438
26439function combineAll(project) {
26440 return function (source) { return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); };
26441}
26442//# sourceMappingURL=combineAll.js.map
26443
26444
26445/***/ }),
26446/* 261 */
26447/***/ (function(module, __webpack_exports__, __webpack_require__) {
26448
26449"use strict";
26450__webpack_require__.r(__webpack_exports__);
26451/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
26452/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(158);
26453/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
26454/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(223);
26455/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
26456
26457
26458
26459var none = {};
26460function combineLatest() {
26461 var observables = [];
26462 for (var _i = 0; _i < arguments.length; _i++) {
26463 observables[_i] = arguments[_i];
26464 }
26465 var project = null;
26466 if (typeof observables[observables.length - 1] === 'function') {
26467 project = observables.pop();
26468 }
26469 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
26470 observables = observables[0].slice();
26471 }
26472 return function (source) { return source.lift.call(Object(_observable_from__WEBPACK_IMPORTED_MODULE_2__["from"])([source].concat(observables)), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project)); };
26473}
26474//# sourceMappingURL=combineLatest.js.map
26475
26476
26477/***/ }),
26478/* 262 */
26479/***/ (function(module, __webpack_exports__, __webpack_require__) {
26480
26481"use strict";
26482__webpack_require__.r(__webpack_exports__);
26483/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
26484/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(219);
26485/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
26486
26487function concat() {
26488 var observables = [];
26489 for (var _i = 0; _i < arguments.length; _i++) {
26490 observables[_i] = arguments[_i];
26491 }
26492 return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"].apply(void 0, [source].concat(observables))); };
26493}
26494//# sourceMappingURL=concat.js.map
26495
26496
26497/***/ }),
26498/* 263 */
26499/***/ (function(module, __webpack_exports__, __webpack_require__) {
26500
26501"use strict";
26502__webpack_require__.r(__webpack_exports__);
26503/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
26504/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(222);
26505/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
26506
26507function concatMap(project, resultSelector) {
26508 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
26509}
26510//# sourceMappingURL=concatMap.js.map
26511
26512
26513/***/ }),
26514/* 264 */
26515/***/ (function(module, __webpack_exports__, __webpack_require__) {
26516
26517"use strict";
26518__webpack_require__.r(__webpack_exports__);
26519/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
26520/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(263);
26521/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
26522
26523function concatMapTo(innerObservable, resultSelector) {
26524 return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () { return innerObservable; }, resultSelector);
26525}
26526//# sourceMappingURL=concatMapTo.js.map
26527
26528
26529/***/ }),
26530/* 265 */
26531/***/ (function(module, __webpack_exports__, __webpack_require__) {
26532
26533"use strict";
26534__webpack_require__.r(__webpack_exports__);
26535/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
26536/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26537/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
26538/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26539
26540
26541function count(predicate) {
26542 return function (source) { return source.lift(new CountOperator(predicate, source)); };
26543}
26544var CountOperator = /*@__PURE__*/ (function () {
26545 function CountOperator(predicate, source) {
26546 this.predicate = predicate;
26547 this.source = source;
26548 }
26549 CountOperator.prototype.call = function (subscriber, source) {
26550 return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
26551 };
26552 return CountOperator;
26553}());
26554var CountSubscriber = /*@__PURE__*/ (function (_super) {
26555 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountSubscriber, _super);
26556 function CountSubscriber(destination, predicate, source) {
26557 var _this = _super.call(this, destination) || this;
26558 _this.predicate = predicate;
26559 _this.source = source;
26560 _this.count = 0;
26561 _this.index = 0;
26562 return _this;
26563 }
26564 CountSubscriber.prototype._next = function (value) {
26565 if (this.predicate) {
26566 this._tryPredicate(value);
26567 }
26568 else {
26569 this.count++;
26570 }
26571 };
26572 CountSubscriber.prototype._tryPredicate = function (value) {
26573 var result;
26574 try {
26575 result = this.predicate(value, this.index++, this.source);
26576 }
26577 catch (err) {
26578 this.destination.error(err);
26579 return;
26580 }
26581 if (result) {
26582 this.count++;
26583 }
26584 };
26585 CountSubscriber.prototype._complete = function () {
26586 this.destination.next(this.count);
26587 this.destination.complete();
26588 };
26589 return CountSubscriber;
26590}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26591//# sourceMappingURL=count.js.map
26592
26593
26594/***/ }),
26595/* 266 */
26596/***/ (function(module, __webpack_exports__, __webpack_require__) {
26597
26598"use strict";
26599__webpack_require__.r(__webpack_exports__);
26600/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
26601/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26602/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
26603/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
26604/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
26605
26606
26607
26608function debounce(durationSelector) {
26609 return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
26610}
26611var DebounceOperator = /*@__PURE__*/ (function () {
26612 function DebounceOperator(durationSelector) {
26613 this.durationSelector = durationSelector;
26614 }
26615 DebounceOperator.prototype.call = function (subscriber, source) {
26616 return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
26617 };
26618 return DebounceOperator;
26619}());
26620var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
26621 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceSubscriber, _super);
26622 function DebounceSubscriber(destination, durationSelector) {
26623 var _this = _super.call(this, destination) || this;
26624 _this.durationSelector = durationSelector;
26625 _this.hasValue = false;
26626 _this.durationSubscription = null;
26627 return _this;
26628 }
26629 DebounceSubscriber.prototype._next = function (value) {
26630 try {
26631 var result = this.durationSelector.call(this, value);
26632 if (result) {
26633 this._tryNext(value, result);
26634 }
26635 }
26636 catch (err) {
26637 this.destination.error(err);
26638 }
26639 };
26640 DebounceSubscriber.prototype._complete = function () {
26641 this.emitValue();
26642 this.destination.complete();
26643 };
26644 DebounceSubscriber.prototype._tryNext = function (value, duration) {
26645 var subscription = this.durationSubscription;
26646 this.value = value;
26647 this.hasValue = true;
26648 if (subscription) {
26649 subscription.unsubscribe();
26650 this.remove(subscription);
26651 }
26652 subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
26653 if (subscription && !subscription.closed) {
26654 this.add(this.durationSubscription = subscription);
26655 }
26656 };
26657 DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26658 this.emitValue();
26659 };
26660 DebounceSubscriber.prototype.notifyComplete = function () {
26661 this.emitValue();
26662 };
26663 DebounceSubscriber.prototype.emitValue = function () {
26664 if (this.hasValue) {
26665 var value = this.value;
26666 var subscription = this.durationSubscription;
26667 if (subscription) {
26668 this.durationSubscription = null;
26669 subscription.unsubscribe();
26670 this.remove(subscription);
26671 }
26672 this.value = null;
26673 this.hasValue = false;
26674 _super.prototype._next.call(this, value);
26675 }
26676 };
26677 return DebounceSubscriber;
26678}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
26679//# sourceMappingURL=debounce.js.map
26680
26681
26682/***/ }),
26683/* 267 */
26684/***/ (function(module, __webpack_exports__, __webpack_require__) {
26685
26686"use strict";
26687__webpack_require__.r(__webpack_exports__);
26688/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
26689/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26690/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
26691/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(195);
26692/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
26693
26694
26695
26696function debounceTime(dueTime, scheduler) {
26697 if (scheduler === void 0) {
26698 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
26699 }
26700 return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
26701}
26702var DebounceTimeOperator = /*@__PURE__*/ (function () {
26703 function DebounceTimeOperator(dueTime, scheduler) {
26704 this.dueTime = dueTime;
26705 this.scheduler = scheduler;
26706 }
26707 DebounceTimeOperator.prototype.call = function (subscriber, source) {
26708 return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
26709 };
26710 return DebounceTimeOperator;
26711}());
26712var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
26713 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceTimeSubscriber, _super);
26714 function DebounceTimeSubscriber(destination, dueTime, scheduler) {
26715 var _this = _super.call(this, destination) || this;
26716 _this.dueTime = dueTime;
26717 _this.scheduler = scheduler;
26718 _this.debouncedSubscription = null;
26719 _this.lastValue = null;
26720 _this.hasValue = false;
26721 return _this;
26722 }
26723 DebounceTimeSubscriber.prototype._next = function (value) {
26724 this.clearDebounce();
26725 this.lastValue = value;
26726 this.hasValue = true;
26727 this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
26728 };
26729 DebounceTimeSubscriber.prototype._complete = function () {
26730 this.debouncedNext();
26731 this.destination.complete();
26732 };
26733 DebounceTimeSubscriber.prototype.debouncedNext = function () {
26734 this.clearDebounce();
26735 if (this.hasValue) {
26736 var lastValue = this.lastValue;
26737 this.lastValue = null;
26738 this.hasValue = false;
26739 this.destination.next(lastValue);
26740 }
26741 };
26742 DebounceTimeSubscriber.prototype.clearDebounce = function () {
26743 var debouncedSubscription = this.debouncedSubscription;
26744 if (debouncedSubscription !== null) {
26745 this.remove(debouncedSubscription);
26746 debouncedSubscription.unsubscribe();
26747 this.debouncedSubscription = null;
26748 }
26749 };
26750 return DebounceTimeSubscriber;
26751}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26752function dispatchNext(subscriber) {
26753 subscriber.debouncedNext();
26754}
26755//# sourceMappingURL=debounceTime.js.map
26756
26757
26758/***/ }),
26759/* 268 */
26760/***/ (function(module, __webpack_exports__, __webpack_require__) {
26761
26762"use strict";
26763__webpack_require__.r(__webpack_exports__);
26764/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
26765/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26766/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
26767/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26768
26769
26770function defaultIfEmpty(defaultValue) {
26771 if (defaultValue === void 0) {
26772 defaultValue = null;
26773 }
26774 return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
26775}
26776var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
26777 function DefaultIfEmptyOperator(defaultValue) {
26778 this.defaultValue = defaultValue;
26779 }
26780 DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
26781 return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
26782 };
26783 return DefaultIfEmptyOperator;
26784}());
26785var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
26786 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DefaultIfEmptySubscriber, _super);
26787 function DefaultIfEmptySubscriber(destination, defaultValue) {
26788 var _this = _super.call(this, destination) || this;
26789 _this.defaultValue = defaultValue;
26790 _this.isEmpty = true;
26791 return _this;
26792 }
26793 DefaultIfEmptySubscriber.prototype._next = function (value) {
26794 this.isEmpty = false;
26795 this.destination.next(value);
26796 };
26797 DefaultIfEmptySubscriber.prototype._complete = function () {
26798 if (this.isEmpty) {
26799 this.destination.next(this.defaultValue);
26800 }
26801 this.destination.complete();
26802 };
26803 return DefaultIfEmptySubscriber;
26804}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26805//# sourceMappingURL=defaultIfEmpty.js.map
26806
26807
26808/***/ }),
26809/* 269 */
26810/***/ (function(module, __webpack_exports__, __webpack_require__) {
26811
26812"use strict";
26813__webpack_require__.r(__webpack_exports__);
26814/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
26815/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26816/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
26817/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(270);
26818/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(151);
26819/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(182);
26820/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
26821
26822
26823
26824
26825
26826function delay(delay, scheduler) {
26827 if (scheduler === void 0) {
26828 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
26829 }
26830 var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(delay);
26831 var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
26832 return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
26833}
26834var DelayOperator = /*@__PURE__*/ (function () {
26835 function DelayOperator(delay, scheduler) {
26836 this.delay = delay;
26837 this.scheduler = scheduler;
26838 }
26839 DelayOperator.prototype.call = function (subscriber, source) {
26840 return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
26841 };
26842 return DelayOperator;
26843}());
26844var DelaySubscriber = /*@__PURE__*/ (function (_super) {
26845 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelaySubscriber, _super);
26846 function DelaySubscriber(destination, delay, scheduler) {
26847 var _this = _super.call(this, destination) || this;
26848 _this.delay = delay;
26849 _this.scheduler = scheduler;
26850 _this.queue = [];
26851 _this.active = false;
26852 _this.errored = false;
26853 return _this;
26854 }
26855 DelaySubscriber.dispatch = function (state) {
26856 var source = state.source;
26857 var queue = source.queue;
26858 var scheduler = state.scheduler;
26859 var destination = state.destination;
26860 while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
26861 queue.shift().notification.observe(destination);
26862 }
26863 if (queue.length > 0) {
26864 var delay_1 = Math.max(0, queue[0].time - scheduler.now());
26865 this.schedule(state, delay_1);
26866 }
26867 else {
26868 this.unsubscribe();
26869 source.active = false;
26870 }
26871 };
26872 DelaySubscriber.prototype._schedule = function (scheduler) {
26873 this.active = true;
26874 var destination = this.destination;
26875 destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
26876 source: this, destination: this.destination, scheduler: scheduler
26877 }));
26878 };
26879 DelaySubscriber.prototype.scheduleNotification = function (notification) {
26880 if (this.errored === true) {
26881 return;
26882 }
26883 var scheduler = this.scheduler;
26884 var message = new DelayMessage(scheduler.now() + this.delay, notification);
26885 this.queue.push(message);
26886 if (this.active === false) {
26887 this._schedule(scheduler);
26888 }
26889 };
26890 DelaySubscriber.prototype._next = function (value) {
26891 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createNext(value));
26892 };
26893 DelaySubscriber.prototype._error = function (err) {
26894 this.errored = true;
26895 this.queue = [];
26896 this.destination.error(err);
26897 this.unsubscribe();
26898 };
26899 DelaySubscriber.prototype._complete = function () {
26900 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createComplete());
26901 this.unsubscribe();
26902 };
26903 return DelaySubscriber;
26904}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
26905var DelayMessage = /*@__PURE__*/ (function () {
26906 function DelayMessage(time, notification) {
26907 this.time = time;
26908 this.notification = notification;
26909 }
26910 return DelayMessage;
26911}());
26912//# sourceMappingURL=delay.js.map
26913
26914
26915/***/ }),
26916/* 270 */
26917/***/ (function(module, __webpack_exports__, __webpack_require__) {
26918
26919"use strict";
26920__webpack_require__.r(__webpack_exports__);
26921/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
26922/** PURE_IMPORTS_START PURE_IMPORTS_END */
26923function isDate(value) {
26924 return value instanceof Date && !isNaN(+value);
26925}
26926//# sourceMappingURL=isDate.js.map
26927
26928
26929/***/ }),
26930/* 271 */
26931/***/ (function(module, __webpack_exports__, __webpack_require__) {
26932
26933"use strict";
26934__webpack_require__.r(__webpack_exports__);
26935/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
26936/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
26937/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
26938/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(149);
26939/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
26940/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(210);
26941/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
26942
26943
26944
26945
26946
26947function delayWhen(delayDurationSelector, subscriptionDelay) {
26948 if (subscriptionDelay) {
26949 return function (source) {
26950 return new SubscriptionDelayObservable(source, subscriptionDelay)
26951 .lift(new DelayWhenOperator(delayDurationSelector));
26952 };
26953 }
26954 return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
26955}
26956var DelayWhenOperator = /*@__PURE__*/ (function () {
26957 function DelayWhenOperator(delayDurationSelector) {
26958 this.delayDurationSelector = delayDurationSelector;
26959 }
26960 DelayWhenOperator.prototype.call = function (subscriber, source) {
26961 return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
26962 };
26963 return DelayWhenOperator;
26964}());
26965var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
26966 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelayWhenSubscriber, _super);
26967 function DelayWhenSubscriber(destination, delayDurationSelector) {
26968 var _this = _super.call(this, destination) || this;
26969 _this.delayDurationSelector = delayDurationSelector;
26970 _this.completed = false;
26971 _this.delayNotifierSubscriptions = [];
26972 _this.index = 0;
26973 return _this;
26974 }
26975 DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26976 this.destination.next(outerValue);
26977 this.removeSubscription(innerSub);
26978 this.tryComplete();
26979 };
26980 DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
26981 this._error(error);
26982 };
26983 DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
26984 var value = this.removeSubscription(innerSub);
26985 if (value) {
26986 this.destination.next(value);
26987 }
26988 this.tryComplete();
26989 };
26990 DelayWhenSubscriber.prototype._next = function (value) {
26991 var index = this.index++;
26992 try {
26993 var delayNotifier = this.delayDurationSelector(value, index);
26994 if (delayNotifier) {
26995 this.tryDelay(delayNotifier, value);
26996 }
26997 }
26998 catch (err) {
26999 this.destination.error(err);
27000 }
27001 };
27002 DelayWhenSubscriber.prototype._complete = function () {
27003 this.completed = true;
27004 this.tryComplete();
27005 this.unsubscribe();
27006 };
27007 DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
27008 subscription.unsubscribe();
27009 var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
27010 if (subscriptionIdx !== -1) {
27011 this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
27012 }
27013 return subscription.outerValue;
27014 };
27015 DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
27016 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, delayNotifier, value);
27017 if (notifierSubscription && !notifierSubscription.closed) {
27018 var destination = this.destination;
27019 destination.add(notifierSubscription);
27020 this.delayNotifierSubscriptions.push(notifierSubscription);
27021 }
27022 };
27023 DelayWhenSubscriber.prototype.tryComplete = function () {
27024 if (this.completed && this.delayNotifierSubscriptions.length === 0) {
27025 this.destination.complete();
27026 }
27027 };
27028 return DelayWhenSubscriber;
27029}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
27030var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
27031 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelayObservable, _super);
27032 function SubscriptionDelayObservable(source, subscriptionDelay) {
27033 var _this = _super.call(this) || this;
27034 _this.source = source;
27035 _this.subscriptionDelay = subscriptionDelay;
27036 return _this;
27037 }
27038 SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
27039 this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
27040 };
27041 return SubscriptionDelayObservable;
27042}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
27043var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
27044 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelaySubscriber, _super);
27045 function SubscriptionDelaySubscriber(parent, source) {
27046 var _this = _super.call(this) || this;
27047 _this.parent = parent;
27048 _this.source = source;
27049 _this.sourceSubscribed = false;
27050 return _this;
27051 }
27052 SubscriptionDelaySubscriber.prototype._next = function (unused) {
27053 this.subscribeToSource();
27054 };
27055 SubscriptionDelaySubscriber.prototype._error = function (err) {
27056 this.unsubscribe();
27057 this.parent.error(err);
27058 };
27059 SubscriptionDelaySubscriber.prototype._complete = function () {
27060 this.unsubscribe();
27061 this.subscribeToSource();
27062 };
27063 SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
27064 if (!this.sourceSubscribed) {
27065 this.sourceSubscribed = true;
27066 this.unsubscribe();
27067 this.source.subscribe(this.parent);
27068 }
27069 };
27070 return SubscriptionDelaySubscriber;
27071}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27072//# sourceMappingURL=delayWhen.js.map
27073
27074
27075/***/ }),
27076/* 272 */
27077/***/ (function(module, __webpack_exports__, __webpack_require__) {
27078
27079"use strict";
27080__webpack_require__.r(__webpack_exports__);
27081/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
27082/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27083/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
27084/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27085
27086
27087function dematerialize() {
27088 return function dematerializeOperatorFunction(source) {
27089 return source.lift(new DeMaterializeOperator());
27090 };
27091}
27092var DeMaterializeOperator = /*@__PURE__*/ (function () {
27093 function DeMaterializeOperator() {
27094 }
27095 DeMaterializeOperator.prototype.call = function (subscriber, source) {
27096 return source.subscribe(new DeMaterializeSubscriber(subscriber));
27097 };
27098 return DeMaterializeOperator;
27099}());
27100var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
27101 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DeMaterializeSubscriber, _super);
27102 function DeMaterializeSubscriber(destination) {
27103 return _super.call(this, destination) || this;
27104 }
27105 DeMaterializeSubscriber.prototype._next = function (value) {
27106 value.observe(this.destination);
27107 };
27108 return DeMaterializeSubscriber;
27109}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27110//# sourceMappingURL=dematerialize.js.map
27111
27112
27113/***/ }),
27114/* 273 */
27115/***/ (function(module, __webpack_exports__, __webpack_require__) {
27116
27117"use strict";
27118__webpack_require__.r(__webpack_exports__);
27119/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
27120/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; });
27121/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27122/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
27123/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
27124/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
27125
27126
27127
27128function distinct(keySelector, flushes) {
27129 return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
27130}
27131var DistinctOperator = /*@__PURE__*/ (function () {
27132 function DistinctOperator(keySelector, flushes) {
27133 this.keySelector = keySelector;
27134 this.flushes = flushes;
27135 }
27136 DistinctOperator.prototype.call = function (subscriber, source) {
27137 return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
27138 };
27139 return DistinctOperator;
27140}());
27141var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
27142 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctSubscriber, _super);
27143 function DistinctSubscriber(destination, keySelector, flushes) {
27144 var _this = _super.call(this, destination) || this;
27145 _this.keySelector = keySelector;
27146 _this.values = new Set();
27147 if (flushes) {
27148 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, flushes));
27149 }
27150 return _this;
27151 }
27152 DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27153 this.values.clear();
27154 };
27155 DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
27156 this._error(error);
27157 };
27158 DistinctSubscriber.prototype._next = function (value) {
27159 if (this.keySelector) {
27160 this._useKeySelector(value);
27161 }
27162 else {
27163 this._finalizeNext(value, value);
27164 }
27165 };
27166 DistinctSubscriber.prototype._useKeySelector = function (value) {
27167 var key;
27168 var destination = this.destination;
27169 try {
27170 key = this.keySelector(value);
27171 }
27172 catch (err) {
27173 destination.error(err);
27174 return;
27175 }
27176 this._finalizeNext(key, value);
27177 };
27178 DistinctSubscriber.prototype._finalizeNext = function (key, value) {
27179 var values = this.values;
27180 if (!values.has(key)) {
27181 values.add(key);
27182 this.destination.next(value);
27183 }
27184 };
27185 return DistinctSubscriber;
27186}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
27187
27188//# sourceMappingURL=distinct.js.map
27189
27190
27191/***/ }),
27192/* 274 */
27193/***/ (function(module, __webpack_exports__, __webpack_require__) {
27194
27195"use strict";
27196__webpack_require__.r(__webpack_exports__);
27197/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
27198/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27199/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
27200/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27201
27202
27203function distinctUntilChanged(compare, keySelector) {
27204 return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
27205}
27206var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
27207 function DistinctUntilChangedOperator(compare, keySelector) {
27208 this.compare = compare;
27209 this.keySelector = keySelector;
27210 }
27211 DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
27212 return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
27213 };
27214 return DistinctUntilChangedOperator;
27215}());
27216var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
27217 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctUntilChangedSubscriber, _super);
27218 function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
27219 var _this = _super.call(this, destination) || this;
27220 _this.keySelector = keySelector;
27221 _this.hasKey = false;
27222 if (typeof compare === 'function') {
27223 _this.compare = compare;
27224 }
27225 return _this;
27226 }
27227 DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
27228 return x === y;
27229 };
27230 DistinctUntilChangedSubscriber.prototype._next = function (value) {
27231 var key;
27232 try {
27233 var keySelector = this.keySelector;
27234 key = keySelector ? keySelector(value) : value;
27235 }
27236 catch (err) {
27237 return this.destination.error(err);
27238 }
27239 var result = false;
27240 if (this.hasKey) {
27241 try {
27242 var compare = this.compare;
27243 result = compare(this.key, key);
27244 }
27245 catch (err) {
27246 return this.destination.error(err);
27247 }
27248 }
27249 else {
27250 this.hasKey = true;
27251 }
27252 if (!result) {
27253 this.key = key;
27254 this.destination.next(value);
27255 }
27256 };
27257 return DistinctUntilChangedSubscriber;
27258}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27259//# sourceMappingURL=distinctUntilChanged.js.map
27260
27261
27262/***/ }),
27263/* 275 */
27264/***/ (function(module, __webpack_exports__, __webpack_require__) {
27265
27266"use strict";
27267__webpack_require__.r(__webpack_exports__);
27268/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
27269/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(274);
27270/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
27271
27272function distinctUntilKeyChanged(key, compare) {
27273 return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
27274}
27275//# sourceMappingURL=distinctUntilKeyChanged.js.map
27276
27277
27278/***/ }),
27279/* 276 */
27280/***/ (function(module, __webpack_exports__, __webpack_require__) {
27281
27282"use strict";
27283__webpack_require__.r(__webpack_exports__);
27284/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
27285/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(202);
27286/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
27287/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(277);
27288/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(268);
27289/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(278);
27290/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
27291
27292
27293
27294
27295
27296function elementAt(index, defaultValue) {
27297 if (index < 0) {
27298 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
27299 }
27300 var hasDefaultValue = arguments.length >= 2;
27301 return function (source) {
27302 return source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return i === index; }), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue
27303 ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
27304 : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
27305 };
27306}
27307//# sourceMappingURL=elementAt.js.map
27308
27309
27310/***/ }),
27311/* 277 */
27312/***/ (function(module, __webpack_exports__, __webpack_require__) {
27313
27314"use strict";
27315__webpack_require__.r(__webpack_exports__);
27316/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
27317/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27318/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
27319/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(151);
27320/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */
27321
27322
27323
27324function throwIfEmpty(errorFactory) {
27325 if (errorFactory === void 0) {
27326 errorFactory = defaultErrorFactory;
27327 }
27328 return function (source) {
27329 return source.lift(new ThrowIfEmptyOperator(errorFactory));
27330 };
27331}
27332var ThrowIfEmptyOperator = /*@__PURE__*/ (function () {
27333 function ThrowIfEmptyOperator(errorFactory) {
27334 this.errorFactory = errorFactory;
27335 }
27336 ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {
27337 return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
27338 };
27339 return ThrowIfEmptyOperator;
27340}());
27341var ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
27342 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrowIfEmptySubscriber, _super);
27343 function ThrowIfEmptySubscriber(destination, errorFactory) {
27344 var _this = _super.call(this, destination) || this;
27345 _this.errorFactory = errorFactory;
27346 _this.hasValue = false;
27347 return _this;
27348 }
27349 ThrowIfEmptySubscriber.prototype._next = function (value) {
27350 this.hasValue = true;
27351 this.destination.next(value);
27352 };
27353 ThrowIfEmptySubscriber.prototype._complete = function () {
27354 if (!this.hasValue) {
27355 var err = void 0;
27356 try {
27357 err = this.errorFactory();
27358 }
27359 catch (e) {
27360 err = e;
27361 }
27362 this.destination.error(err);
27363 }
27364 else {
27365 return this.destination.complete();
27366 }
27367 };
27368 return ThrowIfEmptySubscriber;
27369}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
27370function defaultErrorFactory() {
27371 return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
27372}
27373//# sourceMappingURL=throwIfEmpty.js.map
27374
27375
27376/***/ }),
27377/* 278 */
27378/***/ (function(module, __webpack_exports__, __webpack_require__) {
27379
27380"use strict";
27381__webpack_require__.r(__webpack_exports__);
27382/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; });
27383/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27384/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
27385/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(202);
27386/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(183);
27387/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
27388
27389
27390
27391
27392function take(count) {
27393 return function (source) {
27394 if (count === 0) {
27395 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
27396 }
27397 else {
27398 return source.lift(new TakeOperator(count));
27399 }
27400 };
27401}
27402var TakeOperator = /*@__PURE__*/ (function () {
27403 function TakeOperator(total) {
27404 this.total = total;
27405 if (this.total < 0) {
27406 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
27407 }
27408 }
27409 TakeOperator.prototype.call = function (subscriber, source) {
27410 return source.subscribe(new TakeSubscriber(subscriber, this.total));
27411 };
27412 return TakeOperator;
27413}());
27414var TakeSubscriber = /*@__PURE__*/ (function (_super) {
27415 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeSubscriber, _super);
27416 function TakeSubscriber(destination, total) {
27417 var _this = _super.call(this, destination) || this;
27418 _this.total = total;
27419 _this.count = 0;
27420 return _this;
27421 }
27422 TakeSubscriber.prototype._next = function (value) {
27423 var total = this.total;
27424 var count = ++this.count;
27425 if (count <= total) {
27426 this.destination.next(value);
27427 if (count === total) {
27428 this.destination.complete();
27429 this.unsubscribe();
27430 }
27431 }
27432 };
27433 return TakeSubscriber;
27434}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27435//# sourceMappingURL=take.js.map
27436
27437
27438/***/ }),
27439/* 279 */
27440/***/ (function(module, __webpack_exports__, __webpack_require__) {
27441
27442"use strict";
27443__webpack_require__.r(__webpack_exports__);
27444/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; });
27445/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(219);
27446/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
27447/** PURE_IMPORTS_START _observable_concat,_observable_of PURE_IMPORTS_END */
27448
27449
27450function endWith() {
27451 var array = [];
27452 for (var _i = 0; _i < arguments.length; _i++) {
27453 array[_i] = arguments[_i];
27454 }
27455 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, _observable_of__WEBPACK_IMPORTED_MODULE_1__["of"].apply(void 0, array)); };
27456}
27457//# sourceMappingURL=endWith.js.map
27458
27459
27460/***/ }),
27461/* 280 */
27462/***/ (function(module, __webpack_exports__, __webpack_require__) {
27463
27464"use strict";
27465__webpack_require__.r(__webpack_exports__);
27466/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; });
27467/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27468/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
27469/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27470
27471
27472function every(predicate, thisArg) {
27473 return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
27474}
27475var EveryOperator = /*@__PURE__*/ (function () {
27476 function EveryOperator(predicate, thisArg, source) {
27477 this.predicate = predicate;
27478 this.thisArg = thisArg;
27479 this.source = source;
27480 }
27481 EveryOperator.prototype.call = function (observer, source) {
27482 return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
27483 };
27484 return EveryOperator;
27485}());
27486var EverySubscriber = /*@__PURE__*/ (function (_super) {
27487 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EverySubscriber, _super);
27488 function EverySubscriber(destination, predicate, thisArg, source) {
27489 var _this = _super.call(this, destination) || this;
27490 _this.predicate = predicate;
27491 _this.thisArg = thisArg;
27492 _this.source = source;
27493 _this.index = 0;
27494 _this.thisArg = thisArg || _this;
27495 return _this;
27496 }
27497 EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
27498 this.destination.next(everyValueMatch);
27499 this.destination.complete();
27500 };
27501 EverySubscriber.prototype._next = function (value) {
27502 var result = false;
27503 try {
27504 result = this.predicate.call(this.thisArg, value, this.index++, this.source);
27505 }
27506 catch (err) {
27507 this.destination.error(err);
27508 return;
27509 }
27510 if (!result) {
27511 this.notifyComplete(false);
27512 }
27513 };
27514 EverySubscriber.prototype._complete = function () {
27515 this.notifyComplete(true);
27516 };
27517 return EverySubscriber;
27518}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27519//# sourceMappingURL=every.js.map
27520
27521
27522/***/ }),
27523/* 281 */
27524/***/ (function(module, __webpack_exports__, __webpack_require__) {
27525
27526"use strict";
27527__webpack_require__.r(__webpack_exports__);
27528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
27529/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27530/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
27531/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
27532/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
27533
27534
27535
27536function exhaust() {
27537 return function (source) { return source.lift(new SwitchFirstOperator()); };
27538}
27539var SwitchFirstOperator = /*@__PURE__*/ (function () {
27540 function SwitchFirstOperator() {
27541 }
27542 SwitchFirstOperator.prototype.call = function (subscriber, source) {
27543 return source.subscribe(new SwitchFirstSubscriber(subscriber));
27544 };
27545 return SwitchFirstOperator;
27546}());
27547var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
27548 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchFirstSubscriber, _super);
27549 function SwitchFirstSubscriber(destination) {
27550 var _this = _super.call(this, destination) || this;
27551 _this.hasCompleted = false;
27552 _this.hasSubscription = false;
27553 return _this;
27554 }
27555 SwitchFirstSubscriber.prototype._next = function (value) {
27556 if (!this.hasSubscription) {
27557 this.hasSubscription = true;
27558 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, value));
27559 }
27560 };
27561 SwitchFirstSubscriber.prototype._complete = function () {
27562 this.hasCompleted = true;
27563 if (!this.hasSubscription) {
27564 this.destination.complete();
27565 }
27566 };
27567 SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
27568 this.remove(innerSub);
27569 this.hasSubscription = false;
27570 if (this.hasCompleted) {
27571 this.destination.complete();
27572 }
27573 };
27574 return SwitchFirstSubscriber;
27575}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
27576//# sourceMappingURL=exhaust.js.map
27577
27578
27579/***/ }),
27580/* 282 */
27581/***/ (function(module, __webpack_exports__, __webpack_require__) {
27582
27583"use strict";
27584__webpack_require__.r(__webpack_exports__);
27585/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
27586/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27587/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
27588/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(211);
27589/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
27590/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(206);
27591/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(223);
27592/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
27593
27594
27595
27596
27597
27598
27599function exhaustMap(project, resultSelector) {
27600 if (resultSelector) {
27601 return function (source) { return source.pipe(exhaustMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
27602 }
27603 return function (source) {
27604 return source.lift(new ExhaustMapOperator(project));
27605 };
27606}
27607var ExhaustMapOperator = /*@__PURE__*/ (function () {
27608 function ExhaustMapOperator(project) {
27609 this.project = project;
27610 }
27611 ExhaustMapOperator.prototype.call = function (subscriber, source) {
27612 return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
27613 };
27614 return ExhaustMapOperator;
27615}());
27616var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
27617 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExhaustMapSubscriber, _super);
27618 function ExhaustMapSubscriber(destination, project) {
27619 var _this = _super.call(this, destination) || this;
27620 _this.project = project;
27621 _this.hasSubscription = false;
27622 _this.hasCompleted = false;
27623 _this.index = 0;
27624 return _this;
27625 }
27626 ExhaustMapSubscriber.prototype._next = function (value) {
27627 if (!this.hasSubscription) {
27628 this.tryNext(value);
27629 }
27630 };
27631 ExhaustMapSubscriber.prototype.tryNext = function (value) {
27632 var result;
27633 var index = this.index++;
27634 try {
27635 result = this.project(value, index);
27636 }
27637 catch (err) {
27638 this.destination.error(err);
27639 return;
27640 }
27641 this.hasSubscription = true;
27642 this._innerSub(result, value, index);
27643 };
27644 ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) {
27645 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
27646 var destination = this.destination;
27647 destination.add(innerSubscriber);
27648 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
27649 };
27650 ExhaustMapSubscriber.prototype._complete = function () {
27651 this.hasCompleted = true;
27652 if (!this.hasSubscription) {
27653 this.destination.complete();
27654 }
27655 this.unsubscribe();
27656 };
27657 ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27658 this.destination.next(innerValue);
27659 };
27660 ExhaustMapSubscriber.prototype.notifyError = function (err) {
27661 this.destination.error(err);
27662 };
27663 ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
27664 var destination = this.destination;
27665 destination.remove(innerSub);
27666 this.hasSubscription = false;
27667 if (this.hasCompleted) {
27668 this.destination.complete();
27669 }
27670 };
27671 return ExhaustMapSubscriber;
27672}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
27673//# sourceMappingURL=exhaustMap.js.map
27674
27675
27676/***/ }),
27677/* 283 */
27678/***/ (function(module, __webpack_exports__, __webpack_require__) {
27679
27680"use strict";
27681__webpack_require__.r(__webpack_exports__);
27682/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
27683/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; });
27684/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; });
27685/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27686/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
27687/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
27688/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
27689
27690
27691
27692function expand(project, concurrent, scheduler) {
27693 if (concurrent === void 0) {
27694 concurrent = Number.POSITIVE_INFINITY;
27695 }
27696 if (scheduler === void 0) {
27697 scheduler = undefined;
27698 }
27699 concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
27700 return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
27701}
27702var ExpandOperator = /*@__PURE__*/ (function () {
27703 function ExpandOperator(project, concurrent, scheduler) {
27704 this.project = project;
27705 this.concurrent = concurrent;
27706 this.scheduler = scheduler;
27707 }
27708 ExpandOperator.prototype.call = function (subscriber, source) {
27709 return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
27710 };
27711 return ExpandOperator;
27712}());
27713
27714var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
27715 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExpandSubscriber, _super);
27716 function ExpandSubscriber(destination, project, concurrent, scheduler) {
27717 var _this = _super.call(this, destination) || this;
27718 _this.project = project;
27719 _this.concurrent = concurrent;
27720 _this.scheduler = scheduler;
27721 _this.index = 0;
27722 _this.active = 0;
27723 _this.hasCompleted = false;
27724 if (concurrent < Number.POSITIVE_INFINITY) {
27725 _this.buffer = [];
27726 }
27727 return _this;
27728 }
27729 ExpandSubscriber.dispatch = function (arg) {
27730 var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
27731 subscriber.subscribeToProjection(result, value, index);
27732 };
27733 ExpandSubscriber.prototype._next = function (value) {
27734 var destination = this.destination;
27735 if (destination.closed) {
27736 this._complete();
27737 return;
27738 }
27739 var index = this.index++;
27740 if (this.active < this.concurrent) {
27741 destination.next(value);
27742 try {
27743 var project = this.project;
27744 var result = project(value, index);
27745 if (!this.scheduler) {
27746 this.subscribeToProjection(result, value, index);
27747 }
27748 else {
27749 var state = { subscriber: this, result: result, value: value, index: index };
27750 var destination_1 = this.destination;
27751 destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
27752 }
27753 }
27754 catch (e) {
27755 destination.error(e);
27756 }
27757 }
27758 else {
27759 this.buffer.push(value);
27760 }
27761 };
27762 ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
27763 this.active++;
27764 var destination = this.destination;
27765 destination.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index));
27766 };
27767 ExpandSubscriber.prototype._complete = function () {
27768 this.hasCompleted = true;
27769 if (this.hasCompleted && this.active === 0) {
27770 this.destination.complete();
27771 }
27772 this.unsubscribe();
27773 };
27774 ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27775 this._next(innerValue);
27776 };
27777 ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
27778 var buffer = this.buffer;
27779 var destination = this.destination;
27780 destination.remove(innerSub);
27781 this.active--;
27782 if (buffer && buffer.length > 0) {
27783 this._next(buffer.shift());
27784 }
27785 if (this.hasCompleted && this.active === 0) {
27786 this.destination.complete();
27787 }
27788 };
27789 return ExpandSubscriber;
27790}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
27791
27792//# sourceMappingURL=expand.js.map
27793
27794
27795/***/ }),
27796/* 284 */
27797/***/ (function(module, __webpack_exports__, __webpack_require__) {
27798
27799"use strict";
27800__webpack_require__.r(__webpack_exports__);
27801/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
27802/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27803/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
27804/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(157);
27805/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
27806
27807
27808
27809function finalize(callback) {
27810 return function (source) { return source.lift(new FinallyOperator(callback)); };
27811}
27812var FinallyOperator = /*@__PURE__*/ (function () {
27813 function FinallyOperator(callback) {
27814 this.callback = callback;
27815 }
27816 FinallyOperator.prototype.call = function (subscriber, source) {
27817 return source.subscribe(new FinallySubscriber(subscriber, this.callback));
27818 };
27819 return FinallyOperator;
27820}());
27821var FinallySubscriber = /*@__PURE__*/ (function (_super) {
27822 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FinallySubscriber, _super);
27823 function FinallySubscriber(destination, callback) {
27824 var _this = _super.call(this, destination) || this;
27825 _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"](callback));
27826 return _this;
27827 }
27828 return FinallySubscriber;
27829}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27830//# sourceMappingURL=finalize.js.map
27831
27832
27833/***/ }),
27834/* 285 */
27835/***/ (function(module, __webpack_exports__, __webpack_require__) {
27836
27837"use strict";
27838__webpack_require__.r(__webpack_exports__);
27839/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
27840/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; });
27841/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; });
27842/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27843/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
27844/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27845
27846
27847function find(predicate, thisArg) {
27848 if (typeof predicate !== 'function') {
27849 throw new TypeError('predicate is not a function');
27850 }
27851 return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
27852}
27853var FindValueOperator = /*@__PURE__*/ (function () {
27854 function FindValueOperator(predicate, source, yieldIndex, thisArg) {
27855 this.predicate = predicate;
27856 this.source = source;
27857 this.yieldIndex = yieldIndex;
27858 this.thisArg = thisArg;
27859 }
27860 FindValueOperator.prototype.call = function (observer, source) {
27861 return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
27862 };
27863 return FindValueOperator;
27864}());
27865
27866var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
27867 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FindValueSubscriber, _super);
27868 function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
27869 var _this = _super.call(this, destination) || this;
27870 _this.predicate = predicate;
27871 _this.source = source;
27872 _this.yieldIndex = yieldIndex;
27873 _this.thisArg = thisArg;
27874 _this.index = 0;
27875 return _this;
27876 }
27877 FindValueSubscriber.prototype.notifyComplete = function (value) {
27878 var destination = this.destination;
27879 destination.next(value);
27880 destination.complete();
27881 this.unsubscribe();
27882 };
27883 FindValueSubscriber.prototype._next = function (value) {
27884 var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
27885 var index = this.index++;
27886 try {
27887 var result = predicate.call(thisArg || this, value, index, this.source);
27888 if (result) {
27889 this.notifyComplete(this.yieldIndex ? index : value);
27890 }
27891 }
27892 catch (err) {
27893 this.destination.error(err);
27894 }
27895 };
27896 FindValueSubscriber.prototype._complete = function () {
27897 this.notifyComplete(this.yieldIndex ? -1 : undefined);
27898 };
27899 return FindValueSubscriber;
27900}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27901
27902//# sourceMappingURL=find.js.map
27903
27904
27905/***/ }),
27906/* 286 */
27907/***/ (function(module, __webpack_exports__, __webpack_require__) {
27908
27909"use strict";
27910__webpack_require__.r(__webpack_exports__);
27911/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
27912/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(285);
27913/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
27914
27915function findIndex(predicate, thisArg) {
27916 return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); };
27917}
27918//# sourceMappingURL=findIndex.js.map
27919
27920
27921/***/ }),
27922/* 287 */
27923/***/ (function(module, __webpack_exports__, __webpack_require__) {
27924
27925"use strict";
27926__webpack_require__.r(__webpack_exports__);
27927/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; });
27928/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(203);
27929/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
27930/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(278);
27931/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(268);
27932/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(277);
27933/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(200);
27934/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
27935
27936
27937
27938
27939
27940
27941function first(predicate, defaultValue) {
27942 var hasDefaultValue = arguments.length >= 2;
27943 return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_take__WEBPACK_IMPORTED_MODULE_2__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
27944}
27945//# sourceMappingURL=first.js.map
27946
27947
27948/***/ }),
27949/* 288 */
27950/***/ (function(module, __webpack_exports__, __webpack_require__) {
27951
27952"use strict";
27953__webpack_require__.r(__webpack_exports__);
27954/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
27955/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27956/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
27957/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27958
27959
27960function ignoreElements() {
27961 return function ignoreElementsOperatorFunction(source) {
27962 return source.lift(new IgnoreElementsOperator());
27963 };
27964}
27965var IgnoreElementsOperator = /*@__PURE__*/ (function () {
27966 function IgnoreElementsOperator() {
27967 }
27968 IgnoreElementsOperator.prototype.call = function (subscriber, source) {
27969 return source.subscribe(new IgnoreElementsSubscriber(subscriber));
27970 };
27971 return IgnoreElementsOperator;
27972}());
27973var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
27974 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IgnoreElementsSubscriber, _super);
27975 function IgnoreElementsSubscriber() {
27976 return _super !== null && _super.apply(this, arguments) || this;
27977 }
27978 IgnoreElementsSubscriber.prototype._next = function (unused) {
27979 };
27980 return IgnoreElementsSubscriber;
27981}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27982//# sourceMappingURL=ignoreElements.js.map
27983
27984
27985/***/ }),
27986/* 289 */
27987/***/ (function(module, __webpack_exports__, __webpack_require__) {
27988
27989"use strict";
27990__webpack_require__.r(__webpack_exports__);
27991/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
27992/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
27993/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
27994/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27995
27996
27997function isEmpty() {
27998 return function (source) { return source.lift(new IsEmptyOperator()); };
27999}
28000var IsEmptyOperator = /*@__PURE__*/ (function () {
28001 function IsEmptyOperator() {
28002 }
28003 IsEmptyOperator.prototype.call = function (observer, source) {
28004 return source.subscribe(new IsEmptySubscriber(observer));
28005 };
28006 return IsEmptyOperator;
28007}());
28008var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
28009 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IsEmptySubscriber, _super);
28010 function IsEmptySubscriber(destination) {
28011 return _super.call(this, destination) || this;
28012 }
28013 IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
28014 var destination = this.destination;
28015 destination.next(isEmpty);
28016 destination.complete();
28017 };
28018 IsEmptySubscriber.prototype._next = function (value) {
28019 this.notifyComplete(false);
28020 };
28021 IsEmptySubscriber.prototype._complete = function () {
28022 this.notifyComplete(true);
28023 };
28024 return IsEmptySubscriber;
28025}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28026//# sourceMappingURL=isEmpty.js.map
28027
28028
28029/***/ }),
28030/* 290 */
28031/***/ (function(module, __webpack_exports__, __webpack_require__) {
28032
28033"use strict";
28034__webpack_require__.r(__webpack_exports__);
28035/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
28036/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(203);
28037/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
28038/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(291);
28039/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(277);
28040/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(268);
28041/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(200);
28042/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
28043
28044
28045
28046
28047
28048
28049function last(predicate, defaultValue) {
28050 var hasDefaultValue = arguments.length >= 2;
28051 return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["takeLast"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
28052}
28053//# sourceMappingURL=last.js.map
28054
28055
28056/***/ }),
28057/* 291 */
28058/***/ (function(module, __webpack_exports__, __webpack_require__) {
28059
28060"use strict";
28061__webpack_require__.r(__webpack_exports__);
28062/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
28063/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
28064/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
28065/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(202);
28066/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(183);
28067/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
28068
28069
28070
28071
28072function takeLast(count) {
28073 return function takeLastOperatorFunction(source) {
28074 if (count === 0) {
28075 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
28076 }
28077 else {
28078 return source.lift(new TakeLastOperator(count));
28079 }
28080 };
28081}
28082var TakeLastOperator = /*@__PURE__*/ (function () {
28083 function TakeLastOperator(total) {
28084 this.total = total;
28085 if (this.total < 0) {
28086 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
28087 }
28088 }
28089 TakeLastOperator.prototype.call = function (subscriber, source) {
28090 return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
28091 };
28092 return TakeLastOperator;
28093}());
28094var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
28095 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeLastSubscriber, _super);
28096 function TakeLastSubscriber(destination, total) {
28097 var _this = _super.call(this, destination) || this;
28098 _this.total = total;
28099 _this.ring = new Array();
28100 _this.count = 0;
28101 return _this;
28102 }
28103 TakeLastSubscriber.prototype._next = function (value) {
28104 var ring = this.ring;
28105 var total = this.total;
28106 var count = this.count++;
28107 if (ring.length < total) {
28108 ring.push(value);
28109 }
28110 else {
28111 var index = count % total;
28112 ring[index] = value;
28113 }
28114 };
28115 TakeLastSubscriber.prototype._complete = function () {
28116 var destination = this.destination;
28117 var count = this.count;
28118 if (count > 0) {
28119 var total = this.count >= this.total ? this.total : this.count;
28120 var ring = this.ring;
28121 for (var i = 0; i < total; i++) {
28122 var idx = (count++) % total;
28123 destination.next(ring[idx]);
28124 }
28125 }
28126 destination.complete();
28127 };
28128 return TakeLastSubscriber;
28129}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28130//# sourceMappingURL=takeLast.js.map
28131
28132
28133/***/ }),
28134/* 292 */
28135/***/ (function(module, __webpack_exports__, __webpack_require__) {
28136
28137"use strict";
28138__webpack_require__.r(__webpack_exports__);
28139/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
28140/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
28141/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
28142/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
28143
28144
28145function mapTo(value) {
28146 return function (source) { return source.lift(new MapToOperator(value)); };
28147}
28148var MapToOperator = /*@__PURE__*/ (function () {
28149 function MapToOperator(value) {
28150 this.value = value;
28151 }
28152 MapToOperator.prototype.call = function (subscriber, source) {
28153 return source.subscribe(new MapToSubscriber(subscriber, this.value));
28154 };
28155 return MapToOperator;
28156}());
28157var MapToSubscriber = /*@__PURE__*/ (function (_super) {
28158 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapToSubscriber, _super);
28159 function MapToSubscriber(destination, value) {
28160 var _this = _super.call(this, destination) || this;
28161 _this.value = value;
28162 return _this;
28163 }
28164 MapToSubscriber.prototype._next = function (x) {
28165 this.destination.next(this.value);
28166 };
28167 return MapToSubscriber;
28168}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28169//# sourceMappingURL=mapTo.js.map
28170
28171
28172/***/ }),
28173/* 293 */
28174/***/ (function(module, __webpack_exports__, __webpack_require__) {
28175
28176"use strict";
28177__webpack_require__.r(__webpack_exports__);
28178/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
28179/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
28180/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
28181/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
28182/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
28183
28184
28185
28186function materialize() {
28187 return function materializeOperatorFunction(source) {
28188 return source.lift(new MaterializeOperator());
28189 };
28190}
28191var MaterializeOperator = /*@__PURE__*/ (function () {
28192 function MaterializeOperator() {
28193 }
28194 MaterializeOperator.prototype.call = function (subscriber, source) {
28195 return source.subscribe(new MaterializeSubscriber(subscriber));
28196 };
28197 return MaterializeOperator;
28198}());
28199var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
28200 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MaterializeSubscriber, _super);
28201 function MaterializeSubscriber(destination) {
28202 return _super.call(this, destination) || this;
28203 }
28204 MaterializeSubscriber.prototype._next = function (value) {
28205 this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
28206 };
28207 MaterializeSubscriber.prototype._error = function (err) {
28208 var destination = this.destination;
28209 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
28210 destination.complete();
28211 };
28212 MaterializeSubscriber.prototype._complete = function () {
28213 var destination = this.destination;
28214 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
28215 destination.complete();
28216 };
28217 return MaterializeSubscriber;
28218}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28219//# sourceMappingURL=materialize.js.map
28220
28221
28222/***/ }),
28223/* 294 */
28224/***/ (function(module, __webpack_exports__, __webpack_require__) {
28225
28226"use strict";
28227__webpack_require__.r(__webpack_exports__);
28228/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
28229/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295);
28230/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
28231
28232function max(comparer) {
28233 var max = (typeof comparer === 'function')
28234 ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
28235 : function (x, y) { return x > y ? x : y; };
28236 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
28237}
28238//# sourceMappingURL=max.js.map
28239
28240
28241/***/ }),
28242/* 295 */
28243/***/ (function(module, __webpack_exports__, __webpack_require__) {
28244
28245"use strict";
28246__webpack_require__.r(__webpack_exports__);
28247/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
28248/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(296);
28249/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(291);
28250/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(268);
28251/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(164);
28252/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
28253
28254
28255
28256
28257function reduce(accumulator, seed) {
28258 if (arguments.length >= 2) {
28259 return function reduceOperatorFunctionWithSeed(source) {
28260 return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(accumulator, seed), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1), Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__["defaultIfEmpty"])(seed))(source);
28261 };
28262 }
28263 return function reduceOperatorFunction(source) {
28264 return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(function (acc, value, index) { return accumulator(acc, value, index + 1); }), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1))(source);
28265 };
28266}
28267//# sourceMappingURL=reduce.js.map
28268
28269
28270/***/ }),
28271/* 296 */
28272/***/ (function(module, __webpack_exports__, __webpack_require__) {
28273
28274"use strict";
28275__webpack_require__.r(__webpack_exports__);
28276/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
28277/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
28278/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
28279/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
28280
28281
28282function scan(accumulator, seed) {
28283 var hasSeed = false;
28284 if (arguments.length >= 2) {
28285 hasSeed = true;
28286 }
28287 return function scanOperatorFunction(source) {
28288 return source.lift(new ScanOperator(accumulator, seed, hasSeed));
28289 };
28290}
28291var ScanOperator = /*@__PURE__*/ (function () {
28292 function ScanOperator(accumulator, seed, hasSeed) {
28293 if (hasSeed === void 0) {
28294 hasSeed = false;
28295 }
28296 this.accumulator = accumulator;
28297 this.seed = seed;
28298 this.hasSeed = hasSeed;
28299 }
28300 ScanOperator.prototype.call = function (subscriber, source) {
28301 return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
28302 };
28303 return ScanOperator;
28304}());
28305var ScanSubscriber = /*@__PURE__*/ (function (_super) {
28306 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ScanSubscriber, _super);
28307 function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
28308 var _this = _super.call(this, destination) || this;
28309 _this.accumulator = accumulator;
28310 _this._seed = _seed;
28311 _this.hasSeed = hasSeed;
28312 _this.index = 0;
28313 return _this;
28314 }
28315 Object.defineProperty(ScanSubscriber.prototype, "seed", {
28316 get: function () {
28317 return this._seed;
28318 },
28319 set: function (value) {
28320 this.hasSeed = true;
28321 this._seed = value;
28322 },
28323 enumerable: true,
28324 configurable: true
28325 });
28326 ScanSubscriber.prototype._next = function (value) {
28327 if (!this.hasSeed) {
28328 this.seed = value;
28329 this.destination.next(value);
28330 }
28331 else {
28332 return this._tryNext(value);
28333 }
28334 };
28335 ScanSubscriber.prototype._tryNext = function (value) {
28336 var index = this.index++;
28337 var result;
28338 try {
28339 result = this.accumulator(this.seed, value, index);
28340 }
28341 catch (err) {
28342 this.destination.error(err);
28343 }
28344 this.seed = result;
28345 this.destination.next(result);
28346 };
28347 return ScanSubscriber;
28348}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28349//# sourceMappingURL=scan.js.map
28350
28351
28352/***/ }),
28353/* 297 */
28354/***/ (function(module, __webpack_exports__, __webpack_require__) {
28355
28356"use strict";
28357__webpack_require__.r(__webpack_exports__);
28358/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
28359/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(238);
28360/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
28361
28362function merge() {
28363 var observables = [];
28364 for (var _i = 0; _i < arguments.length; _i++) {
28365 observables[_i] = arguments[_i];
28366 }
28367 return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
28368}
28369//# sourceMappingURL=merge.js.map
28370
28371
28372/***/ }),
28373/* 298 */
28374/***/ (function(module, __webpack_exports__, __webpack_require__) {
28375
28376"use strict";
28377__webpack_require__.r(__webpack_exports__);
28378/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
28379/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(222);
28380/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
28381
28382function mergeMapTo(innerObservable, resultSelector, concurrent) {
28383 if (concurrent === void 0) {
28384 concurrent = Number.POSITIVE_INFINITY;
28385 }
28386 if (typeof resultSelector === 'function') {
28387 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, resultSelector, concurrent);
28388 }
28389 if (typeof resultSelector === 'number') {
28390 concurrent = resultSelector;
28391 }
28392 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, concurrent);
28393}
28394//# sourceMappingURL=mergeMapTo.js.map
28395
28396
28397/***/ }),
28398/* 299 */
28399/***/ (function(module, __webpack_exports__, __webpack_require__) {
28400
28401"use strict";
28402__webpack_require__.r(__webpack_exports__);
28403/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
28404/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; });
28405/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; });
28406/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
28407/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(210);
28408/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
28409/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(211);
28410/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber PURE_IMPORTS_END */
28411
28412
28413
28414
28415function mergeScan(accumulator, seed, concurrent) {
28416 if (concurrent === void 0) {
28417 concurrent = Number.POSITIVE_INFINITY;
28418 }
28419 return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
28420}
28421var MergeScanOperator = /*@__PURE__*/ (function () {
28422 function MergeScanOperator(accumulator, seed, concurrent) {
28423 this.accumulator = accumulator;
28424 this.seed = seed;
28425 this.concurrent = concurrent;
28426 }
28427 MergeScanOperator.prototype.call = function (subscriber, source) {
28428 return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
28429 };
28430 return MergeScanOperator;
28431}());
28432
28433var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
28434 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeScanSubscriber, _super);
28435 function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
28436 var _this = _super.call(this, destination) || this;
28437 _this.accumulator = accumulator;
28438 _this.acc = acc;
28439 _this.concurrent = concurrent;
28440 _this.hasValue = false;
28441 _this.hasCompleted = false;
28442 _this.buffer = [];
28443 _this.active = 0;
28444 _this.index = 0;
28445 return _this;
28446 }
28447 MergeScanSubscriber.prototype._next = function (value) {
28448 if (this.active < this.concurrent) {
28449 var index = this.index++;
28450 var destination = this.destination;
28451 var ish = void 0;
28452 try {
28453 var accumulator = this.accumulator;
28454 ish = accumulator(this.acc, value, index);
28455 }
28456 catch (e) {
28457 return destination.error(e);
28458 }
28459 this.active++;
28460 this._innerSub(ish, value, index);
28461 }
28462 else {
28463 this.buffer.push(value);
28464 }
28465 };
28466 MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
28467 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, undefined, undefined);
28468 var destination = this.destination;
28469 destination.add(innerSubscriber);
28470 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
28471 };
28472 MergeScanSubscriber.prototype._complete = function () {
28473 this.hasCompleted = true;
28474 if (this.active === 0 && this.buffer.length === 0) {
28475 if (this.hasValue === false) {
28476 this.destination.next(this.acc);
28477 }
28478 this.destination.complete();
28479 }
28480 this.unsubscribe();
28481 };
28482 MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28483 var destination = this.destination;
28484 this.acc = innerValue;
28485 this.hasValue = true;
28486 destination.next(innerValue);
28487 };
28488 MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
28489 var buffer = this.buffer;
28490 var destination = this.destination;
28491 destination.remove(innerSub);
28492 this.active--;
28493 if (buffer.length > 0) {
28494 this._next(buffer.shift());
28495 }
28496 else if (this.active === 0 && this.hasCompleted) {
28497 if (this.hasValue === false) {
28498 this.destination.next(this.acc);
28499 }
28500 this.destination.complete();
28501 }
28502 };
28503 return MergeScanSubscriber;
28504}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
28505
28506//# sourceMappingURL=mergeScan.js.map
28507
28508
28509/***/ }),
28510/* 300 */
28511/***/ (function(module, __webpack_exports__, __webpack_require__) {
28512
28513"use strict";
28514__webpack_require__.r(__webpack_exports__);
28515/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
28516/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295);
28517/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
28518
28519function min(comparer) {
28520 var min = (typeof comparer === 'function')
28521 ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
28522 : function (x, y) { return x < y ? x : y; };
28523 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min);
28524}
28525//# sourceMappingURL=min.js.map
28526
28527
28528/***/ }),
28529/* 301 */
28530/***/ (function(module, __webpack_exports__, __webpack_require__) {
28531
28532"use strict";
28533__webpack_require__.r(__webpack_exports__);
28534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
28535/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; });
28536/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
28537/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
28538
28539function multicast(subjectOrSubjectFactory, selector) {
28540 return function multicastOperatorFunction(source) {
28541 var subjectFactory;
28542 if (typeof subjectOrSubjectFactory === 'function') {
28543 subjectFactory = subjectOrSubjectFactory;
28544 }
28545 else {
28546 subjectFactory = function subjectFactory() {
28547 return subjectOrSubjectFactory;
28548 };
28549 }
28550 if (typeof selector === 'function') {
28551 return source.lift(new MulticastOperator(subjectFactory, selector));
28552 }
28553 var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
28554 connectable.source = source;
28555 connectable.subjectFactory = subjectFactory;
28556 return connectable;
28557 };
28558}
28559var MulticastOperator = /*@__PURE__*/ (function () {
28560 function MulticastOperator(subjectFactory, selector) {
28561 this.subjectFactory = subjectFactory;
28562 this.selector = selector;
28563 }
28564 MulticastOperator.prototype.call = function (subscriber, source) {
28565 var selector = this.selector;
28566 var subject = this.subjectFactory();
28567 var subscription = selector(subject).subscribe(subscriber);
28568 subscription.add(source.subscribe(subject));
28569 return subscription;
28570 };
28571 return MulticastOperator;
28572}());
28573
28574//# sourceMappingURL=multicast.js.map
28575
28576
28577/***/ }),
28578/* 302 */
28579/***/ (function(module, __webpack_exports__, __webpack_require__) {
28580
28581"use strict";
28582__webpack_require__.r(__webpack_exports__);
28583/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
28584/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; });
28585/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
28586/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
28587/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(158);
28588/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
28589/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(211);
28590/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(210);
28591/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28592
28593
28594
28595
28596
28597
28598function onErrorResumeNext() {
28599 var nextSources = [];
28600 for (var _i = 0; _i < arguments.length; _i++) {
28601 nextSources[_i] = arguments[_i];
28602 }
28603 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
28604 nextSources = nextSources[0];
28605 }
28606 return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
28607}
28608function onErrorResumeNextStatic() {
28609 var nextSources = [];
28610 for (var _i = 0; _i < arguments.length; _i++) {
28611 nextSources[_i] = arguments[_i];
28612 }
28613 var source = null;
28614 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
28615 nextSources = nextSources[0];
28616 }
28617 source = nextSources.shift();
28618 return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
28619}
28620var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
28621 function OnErrorResumeNextOperator(nextSources) {
28622 this.nextSources = nextSources;
28623 }
28624 OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
28625 return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
28626 };
28627 return OnErrorResumeNextOperator;
28628}());
28629var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
28630 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OnErrorResumeNextSubscriber, _super);
28631 function OnErrorResumeNextSubscriber(destination, nextSources) {
28632 var _this = _super.call(this, destination) || this;
28633 _this.destination = destination;
28634 _this.nextSources = nextSources;
28635 return _this;
28636 }
28637 OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
28638 this.subscribeToNextSource();
28639 };
28640 OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
28641 this.subscribeToNextSource();
28642 };
28643 OnErrorResumeNextSubscriber.prototype._error = function (err) {
28644 this.subscribeToNextSource();
28645 this.unsubscribe();
28646 };
28647 OnErrorResumeNextSubscriber.prototype._complete = function () {
28648 this.subscribeToNextSource();
28649 this.unsubscribe();
28650 };
28651 OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
28652 var next = this.nextSources.shift();
28653 if (!!next) {
28654 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__["InnerSubscriber"](this, undefined, undefined);
28655 var destination = this.destination;
28656 destination.add(innerSubscriber);
28657 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, next, undefined, undefined, innerSubscriber);
28658 }
28659 else {
28660 this.destination.complete();
28661 }
28662 };
28663 return OnErrorResumeNextSubscriber;
28664}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
28665//# sourceMappingURL=onErrorResumeNext.js.map
28666
28667
28668/***/ }),
28669/* 303 */
28670/***/ (function(module, __webpack_exports__, __webpack_require__) {
28671
28672"use strict";
28673__webpack_require__.r(__webpack_exports__);
28674/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
28675/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
28676/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
28677/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
28678
28679
28680function pairwise() {
28681 return function (source) { return source.lift(new PairwiseOperator()); };
28682}
28683var PairwiseOperator = /*@__PURE__*/ (function () {
28684 function PairwiseOperator() {
28685 }
28686 PairwiseOperator.prototype.call = function (subscriber, source) {
28687 return source.subscribe(new PairwiseSubscriber(subscriber));
28688 };
28689 return PairwiseOperator;
28690}());
28691var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
28692 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](PairwiseSubscriber, _super);
28693 function PairwiseSubscriber(destination) {
28694 var _this = _super.call(this, destination) || this;
28695 _this.hasPrev = false;
28696 return _this;
28697 }
28698 PairwiseSubscriber.prototype._next = function (value) {
28699 var pair;
28700 if (this.hasPrev) {
28701 pair = [this.prev, value];
28702 }
28703 else {
28704 this.hasPrev = true;
28705 }
28706 this.prev = value;
28707 if (pair) {
28708 this.destination.next(pair);
28709 }
28710 };
28711 return PairwiseSubscriber;
28712}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28713//# sourceMappingURL=pairwise.js.map
28714
28715
28716/***/ }),
28717/* 304 */
28718/***/ (function(module, __webpack_exports__, __webpack_require__) {
28719
28720"use strict";
28721__webpack_require__.r(__webpack_exports__);
28722/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
28723/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(243);
28724/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
28725/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
28726
28727
28728function partition(predicate, thisArg) {
28729 return function (source) {
28730 return [
28731 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source),
28732 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source)
28733 ];
28734 };
28735}
28736//# sourceMappingURL=partition.js.map
28737
28738
28739/***/ }),
28740/* 305 */
28741/***/ (function(module, __webpack_exports__, __webpack_require__) {
28742
28743"use strict";
28744__webpack_require__.r(__webpack_exports__);
28745/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
28746/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(206);
28747/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
28748
28749function pluck() {
28750 var properties = [];
28751 for (var _i = 0; _i < arguments.length; _i++) {
28752 properties[_i] = arguments[_i];
28753 }
28754 var length = properties.length;
28755 if (length === 0) {
28756 throw new Error('list of properties cannot be empty.');
28757 }
28758 return function (source) { return Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); };
28759}
28760function plucker(props, length) {
28761 var mapper = function (x) {
28762 var currentProp = x;
28763 for (var i = 0; i < length; i++) {
28764 var p = currentProp[props[i]];
28765 if (typeof p !== 'undefined') {
28766 currentProp = p;
28767 }
28768 else {
28769 return undefined;
28770 }
28771 }
28772 return currentProp;
28773 };
28774 return mapper;
28775}
28776//# sourceMappingURL=pluck.js.map
28777
28778
28779/***/ }),
28780/* 306 */
28781/***/ (function(module, __webpack_exports__, __webpack_require__) {
28782
28783"use strict";
28784__webpack_require__.r(__webpack_exports__);
28785/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
28786/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28787/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(301);
28788/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
28789
28790
28791function publish(selector) {
28792 return selector ?
28793 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); }, selector) :
28794 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]());
28795}
28796//# sourceMappingURL=publish.js.map
28797
28798
28799/***/ }),
28800/* 307 */
28801/***/ (function(module, __webpack_exports__, __webpack_require__) {
28802
28803"use strict";
28804__webpack_require__.r(__webpack_exports__);
28805/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
28806/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
28807/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(301);
28808/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
28809
28810
28811function publishBehavior(value) {
28812 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); };
28813}
28814//# sourceMappingURL=publishBehavior.js.map
28815
28816
28817/***/ }),
28818/* 308 */
28819/***/ (function(module, __webpack_exports__, __webpack_require__) {
28820
28821"use strict";
28822__webpack_require__.r(__webpack_exports__);
28823/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
28824/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
28825/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(301);
28826/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
28827
28828
28829function publishLast() {
28830 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); };
28831}
28832//# sourceMappingURL=publishLast.js.map
28833
28834
28835/***/ }),
28836/* 309 */
28837/***/ (function(module, __webpack_exports__, __webpack_require__) {
28838
28839"use strict";
28840__webpack_require__.r(__webpack_exports__);
28841/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
28842/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(173);
28843/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(301);
28844/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
28845
28846
28847function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
28848 if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
28849 scheduler = selectorOrScheduler;
28850 }
28851 var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
28852 var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
28853 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return subject; }, selector)(source); };
28854}
28855//# sourceMappingURL=publishReplay.js.map
28856
28857
28858/***/ }),
28859/* 310 */
28860/***/ (function(module, __webpack_exports__, __webpack_require__) {
28861
28862"use strict";
28863__webpack_require__.r(__webpack_exports__);
28864/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
28865/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(158);
28866/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(245);
28867/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
28868
28869
28870function race() {
28871 var observables = [];
28872 for (var _i = 0; _i < arguments.length; _i++) {
28873 observables[_i] = arguments[_i];
28874 }
28875 return function raceOperatorFunction(source) {
28876 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
28877 observables = observables[0];
28878 }
28879 return source.lift.call(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"].apply(void 0, [source].concat(observables)));
28880 };
28881}
28882//# sourceMappingURL=race.js.map
28883
28884
28885/***/ }),
28886/* 311 */
28887/***/ (function(module, __webpack_exports__, __webpack_require__) {
28888
28889"use strict";
28890__webpack_require__.r(__webpack_exports__);
28891/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
28892/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
28893/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
28894/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(183);
28895/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
28896
28897
28898
28899function repeat(count) {
28900 if (count === void 0) {
28901 count = -1;
28902 }
28903 return function (source) {
28904 if (count === 0) {
28905 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
28906 }
28907 else if (count < 0) {
28908 return source.lift(new RepeatOperator(-1, source));
28909 }
28910 else {
28911 return source.lift(new RepeatOperator(count - 1, source));
28912 }
28913 };
28914}
28915var RepeatOperator = /*@__PURE__*/ (function () {
28916 function RepeatOperator(count, source) {
28917 this.count = count;
28918 this.source = source;
28919 }
28920 RepeatOperator.prototype.call = function (subscriber, source) {
28921 return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
28922 };
28923 return RepeatOperator;
28924}());
28925var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
28926 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatSubscriber, _super);
28927 function RepeatSubscriber(destination, count, source) {
28928 var _this = _super.call(this, destination) || this;
28929 _this.count = count;
28930 _this.source = source;
28931 return _this;
28932 }
28933 RepeatSubscriber.prototype.complete = function () {
28934 if (!this.isStopped) {
28935 var _a = this, source = _a.source, count = _a.count;
28936 if (count === 0) {
28937 return _super.prototype.complete.call(this);
28938 }
28939 else if (count > -1) {
28940 this.count = count - 1;
28941 }
28942 source.subscribe(this._unsubscribeAndRecycle());
28943 }
28944 };
28945 return RepeatSubscriber;
28946}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28947//# sourceMappingURL=repeat.js.map
28948
28949
28950/***/ }),
28951/* 312 */
28952/***/ (function(module, __webpack_exports__, __webpack_require__) {
28953
28954"use strict";
28955__webpack_require__.r(__webpack_exports__);
28956/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
28957/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
28958/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
28959/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
28960/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
28961/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28962
28963
28964
28965
28966function repeatWhen(notifier) {
28967 return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
28968}
28969var RepeatWhenOperator = /*@__PURE__*/ (function () {
28970 function RepeatWhenOperator(notifier) {
28971 this.notifier = notifier;
28972 }
28973 RepeatWhenOperator.prototype.call = function (subscriber, source) {
28974 return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
28975 };
28976 return RepeatWhenOperator;
28977}());
28978var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
28979 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatWhenSubscriber, _super);
28980 function RepeatWhenSubscriber(destination, notifier, source) {
28981 var _this = _super.call(this, destination) || this;
28982 _this.notifier = notifier;
28983 _this.source = source;
28984 _this.sourceIsBeingSubscribedTo = true;
28985 return _this;
28986 }
28987 RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28988 this.sourceIsBeingSubscribedTo = true;
28989 this.source.subscribe(this);
28990 };
28991 RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
28992 if (this.sourceIsBeingSubscribedTo === false) {
28993 return _super.prototype.complete.call(this);
28994 }
28995 };
28996 RepeatWhenSubscriber.prototype.complete = function () {
28997 this.sourceIsBeingSubscribedTo = false;
28998 if (!this.isStopped) {
28999 if (!this.retries) {
29000 this.subscribeToRetries();
29001 }
29002 if (!this.retriesSubscription || this.retriesSubscription.closed) {
29003 return _super.prototype.complete.call(this);
29004 }
29005 this._unsubscribeAndRecycle();
29006 this.notifications.next();
29007 }
29008 };
29009 RepeatWhenSubscriber.prototype._unsubscribe = function () {
29010 var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
29011 if (notifications) {
29012 notifications.unsubscribe();
29013 this.notifications = null;
29014 }
29015 if (retriesSubscription) {
29016 retriesSubscription.unsubscribe();
29017 this.retriesSubscription = null;
29018 }
29019 this.retries = null;
29020 };
29021 RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
29022 var _unsubscribe = this._unsubscribe;
29023 this._unsubscribe = null;
29024 _super.prototype._unsubscribeAndRecycle.call(this);
29025 this._unsubscribe = _unsubscribe;
29026 return this;
29027 };
29028 RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
29029 this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
29030 var retries;
29031 try {
29032 var notifier = this.notifier;
29033 retries = notifier(this.notifications);
29034 }
29035 catch (e) {
29036 return _super.prototype.complete.call(this);
29037 }
29038 this.retries = retries;
29039 this.retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
29040 };
29041 return RepeatWhenSubscriber;
29042}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
29043//# sourceMappingURL=repeatWhen.js.map
29044
29045
29046/***/ }),
29047/* 313 */
29048/***/ (function(module, __webpack_exports__, __webpack_require__) {
29049
29050"use strict";
29051__webpack_require__.r(__webpack_exports__);
29052/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
29053/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29054/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
29055/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29056
29057
29058function retry(count) {
29059 if (count === void 0) {
29060 count = -1;
29061 }
29062 return function (source) { return source.lift(new RetryOperator(count, source)); };
29063}
29064var RetryOperator = /*@__PURE__*/ (function () {
29065 function RetryOperator(count, source) {
29066 this.count = count;
29067 this.source = source;
29068 }
29069 RetryOperator.prototype.call = function (subscriber, source) {
29070 return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
29071 };
29072 return RetryOperator;
29073}());
29074var RetrySubscriber = /*@__PURE__*/ (function (_super) {
29075 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetrySubscriber, _super);
29076 function RetrySubscriber(destination, count, source) {
29077 var _this = _super.call(this, destination) || this;
29078 _this.count = count;
29079 _this.source = source;
29080 return _this;
29081 }
29082 RetrySubscriber.prototype.error = function (err) {
29083 if (!this.isStopped) {
29084 var _a = this, source = _a.source, count = _a.count;
29085 if (count === 0) {
29086 return _super.prototype.error.call(this, err);
29087 }
29088 else if (count > -1) {
29089 this.count = count - 1;
29090 }
29091 source.subscribe(this._unsubscribeAndRecycle());
29092 }
29093 };
29094 return RetrySubscriber;
29095}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29096//# sourceMappingURL=retry.js.map
29097
29098
29099/***/ }),
29100/* 314 */
29101/***/ (function(module, __webpack_exports__, __webpack_require__) {
29102
29103"use strict";
29104__webpack_require__.r(__webpack_exports__);
29105/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
29106/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29107/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
29108/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
29109/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
29110/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29111
29112
29113
29114
29115function retryWhen(notifier) {
29116 return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
29117}
29118var RetryWhenOperator = /*@__PURE__*/ (function () {
29119 function RetryWhenOperator(notifier, source) {
29120 this.notifier = notifier;
29121 this.source = source;
29122 }
29123 RetryWhenOperator.prototype.call = function (subscriber, source) {
29124 return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
29125 };
29126 return RetryWhenOperator;
29127}());
29128var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
29129 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetryWhenSubscriber, _super);
29130 function RetryWhenSubscriber(destination, notifier, source) {
29131 var _this = _super.call(this, destination) || this;
29132 _this.notifier = notifier;
29133 _this.source = source;
29134 return _this;
29135 }
29136 RetryWhenSubscriber.prototype.error = function (err) {
29137 if (!this.isStopped) {
29138 var errors = this.errors;
29139 var retries = this.retries;
29140 var retriesSubscription = this.retriesSubscription;
29141 if (!retries) {
29142 errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
29143 try {
29144 var notifier = this.notifier;
29145 retries = notifier(errors);
29146 }
29147 catch (e) {
29148 return _super.prototype.error.call(this, e);
29149 }
29150 retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
29151 }
29152 else {
29153 this.errors = null;
29154 this.retriesSubscription = null;
29155 }
29156 this._unsubscribeAndRecycle();
29157 this.errors = errors;
29158 this.retries = retries;
29159 this.retriesSubscription = retriesSubscription;
29160 errors.next(err);
29161 }
29162 };
29163 RetryWhenSubscriber.prototype._unsubscribe = function () {
29164 var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
29165 if (errors) {
29166 errors.unsubscribe();
29167 this.errors = null;
29168 }
29169 if (retriesSubscription) {
29170 retriesSubscription.unsubscribe();
29171 this.retriesSubscription = null;
29172 }
29173 this.retries = null;
29174 };
29175 RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29176 var _unsubscribe = this._unsubscribe;
29177 this._unsubscribe = null;
29178 this._unsubscribeAndRecycle();
29179 this._unsubscribe = _unsubscribe;
29180 this.source.subscribe(this);
29181 };
29182 return RetryWhenSubscriber;
29183}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
29184//# sourceMappingURL=retryWhen.js.map
29185
29186
29187/***/ }),
29188/* 315 */
29189/***/ (function(module, __webpack_exports__, __webpack_require__) {
29190
29191"use strict";
29192__webpack_require__.r(__webpack_exports__);
29193/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
29194/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29195/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
29196/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
29197/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29198
29199
29200
29201function sample(notifier) {
29202 return function (source) { return source.lift(new SampleOperator(notifier)); };
29203}
29204var SampleOperator = /*@__PURE__*/ (function () {
29205 function SampleOperator(notifier) {
29206 this.notifier = notifier;
29207 }
29208 SampleOperator.prototype.call = function (subscriber, source) {
29209 var sampleSubscriber = new SampleSubscriber(subscriber);
29210 var subscription = source.subscribe(sampleSubscriber);
29211 subscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(sampleSubscriber, this.notifier));
29212 return subscription;
29213 };
29214 return SampleOperator;
29215}());
29216var SampleSubscriber = /*@__PURE__*/ (function (_super) {
29217 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleSubscriber, _super);
29218 function SampleSubscriber() {
29219 var _this = _super !== null && _super.apply(this, arguments) || this;
29220 _this.hasValue = false;
29221 return _this;
29222 }
29223 SampleSubscriber.prototype._next = function (value) {
29224 this.value = value;
29225 this.hasValue = true;
29226 };
29227 SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29228 this.emitValue();
29229 };
29230 SampleSubscriber.prototype.notifyComplete = function () {
29231 this.emitValue();
29232 };
29233 SampleSubscriber.prototype.emitValue = function () {
29234 if (this.hasValue) {
29235 this.hasValue = false;
29236 this.destination.next(this.value);
29237 }
29238 };
29239 return SampleSubscriber;
29240}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29241//# sourceMappingURL=sample.js.map
29242
29243
29244/***/ }),
29245/* 316 */
29246/***/ (function(module, __webpack_exports__, __webpack_require__) {
29247
29248"use strict";
29249__webpack_require__.r(__webpack_exports__);
29250/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
29251/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29252/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
29253/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(195);
29254/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
29255
29256
29257
29258function sampleTime(period, scheduler) {
29259 if (scheduler === void 0) {
29260 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
29261 }
29262 return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
29263}
29264var SampleTimeOperator = /*@__PURE__*/ (function () {
29265 function SampleTimeOperator(period, scheduler) {
29266 this.period = period;
29267 this.scheduler = scheduler;
29268 }
29269 SampleTimeOperator.prototype.call = function (subscriber, source) {
29270 return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
29271 };
29272 return SampleTimeOperator;
29273}());
29274var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
29275 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleTimeSubscriber, _super);
29276 function SampleTimeSubscriber(destination, period, scheduler) {
29277 var _this = _super.call(this, destination) || this;
29278 _this.period = period;
29279 _this.scheduler = scheduler;
29280 _this.hasValue = false;
29281 _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
29282 return _this;
29283 }
29284 SampleTimeSubscriber.prototype._next = function (value) {
29285 this.lastValue = value;
29286 this.hasValue = true;
29287 };
29288 SampleTimeSubscriber.prototype.notifyNext = function () {
29289 if (this.hasValue) {
29290 this.hasValue = false;
29291 this.destination.next(this.lastValue);
29292 }
29293 };
29294 return SampleTimeSubscriber;
29295}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29296function dispatchNotification(state) {
29297 var subscriber = state.subscriber, period = state.period;
29298 subscriber.notifyNext();
29299 this.schedule(state, period);
29300}
29301//# sourceMappingURL=sampleTime.js.map
29302
29303
29304/***/ }),
29305/* 317 */
29306/***/ (function(module, __webpack_exports__, __webpack_require__) {
29307
29308"use strict";
29309__webpack_require__.r(__webpack_exports__);
29310/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
29311/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; });
29312/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; });
29313/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29314/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
29315/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29316
29317
29318function sequenceEqual(compareTo, comparator) {
29319 return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };
29320}
29321var SequenceEqualOperator = /*@__PURE__*/ (function () {
29322 function SequenceEqualOperator(compareTo, comparator) {
29323 this.compareTo = compareTo;
29324 this.comparator = comparator;
29325 }
29326 SequenceEqualOperator.prototype.call = function (subscriber, source) {
29327 return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
29328 };
29329 return SequenceEqualOperator;
29330}());
29331
29332var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
29333 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualSubscriber, _super);
29334 function SequenceEqualSubscriber(destination, compareTo, comparator) {
29335 var _this = _super.call(this, destination) || this;
29336 _this.compareTo = compareTo;
29337 _this.comparator = comparator;
29338 _this._a = [];
29339 _this._b = [];
29340 _this._oneComplete = false;
29341 _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
29342 return _this;
29343 }
29344 SequenceEqualSubscriber.prototype._next = function (value) {
29345 if (this._oneComplete && this._b.length === 0) {
29346 this.emit(false);
29347 }
29348 else {
29349 this._a.push(value);
29350 this.checkValues();
29351 }
29352 };
29353 SequenceEqualSubscriber.prototype._complete = function () {
29354 if (this._oneComplete) {
29355 this.emit(this._a.length === 0 && this._b.length === 0);
29356 }
29357 else {
29358 this._oneComplete = true;
29359 }
29360 this.unsubscribe();
29361 };
29362 SequenceEqualSubscriber.prototype.checkValues = function () {
29363 var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;
29364 while (_a.length > 0 && _b.length > 0) {
29365 var a = _a.shift();
29366 var b = _b.shift();
29367 var areEqual = false;
29368 try {
29369 areEqual = comparator ? comparator(a, b) : a === b;
29370 }
29371 catch (e) {
29372 this.destination.error(e);
29373 }
29374 if (!areEqual) {
29375 this.emit(false);
29376 }
29377 }
29378 };
29379 SequenceEqualSubscriber.prototype.emit = function (value) {
29380 var destination = this.destination;
29381 destination.next(value);
29382 destination.complete();
29383 };
29384 SequenceEqualSubscriber.prototype.nextB = function (value) {
29385 if (this._oneComplete && this._a.length === 0) {
29386 this.emit(false);
29387 }
29388 else {
29389 this._b.push(value);
29390 this.checkValues();
29391 }
29392 };
29393 SequenceEqualSubscriber.prototype.completeB = function () {
29394 if (this._oneComplete) {
29395 this.emit(this._a.length === 0 && this._b.length === 0);
29396 }
29397 else {
29398 this._oneComplete = true;
29399 }
29400 };
29401 return SequenceEqualSubscriber;
29402}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29403
29404var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
29405 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualCompareToSubscriber, _super);
29406 function SequenceEqualCompareToSubscriber(destination, parent) {
29407 var _this = _super.call(this, destination) || this;
29408 _this.parent = parent;
29409 return _this;
29410 }
29411 SequenceEqualCompareToSubscriber.prototype._next = function (value) {
29412 this.parent.nextB(value);
29413 };
29414 SequenceEqualCompareToSubscriber.prototype._error = function (err) {
29415 this.parent.error(err);
29416 this.unsubscribe();
29417 };
29418 SequenceEqualCompareToSubscriber.prototype._complete = function () {
29419 this.parent.completeB();
29420 this.unsubscribe();
29421 };
29422 return SequenceEqualCompareToSubscriber;
29423}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29424//# sourceMappingURL=sequenceEqual.js.map
29425
29426
29427/***/ }),
29428/* 318 */
29429/***/ (function(module, __webpack_exports__, __webpack_require__) {
29430
29431"use strict";
29432__webpack_require__.r(__webpack_exports__);
29433/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; });
29434/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(301);
29435/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(170);
29436/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
29437/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
29438
29439
29440
29441function shareSubjectFactory() {
29442 return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
29443}
29444function share() {
29445 return function (source) { return Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); };
29446}
29447//# sourceMappingURL=share.js.map
29448
29449
29450/***/ }),
29451/* 319 */
29452/***/ (function(module, __webpack_exports__, __webpack_require__) {
29453
29454"use strict";
29455__webpack_require__.r(__webpack_exports__);
29456/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
29457/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(173);
29458/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
29459
29460function shareReplay(configOrBufferSize, windowTime, scheduler) {
29461 var config;
29462 if (configOrBufferSize && typeof configOrBufferSize === 'object') {
29463 config = configOrBufferSize;
29464 }
29465 else {
29466 config = {
29467 bufferSize: configOrBufferSize,
29468 windowTime: windowTime,
29469 refCount: false,
29470 scheduler: scheduler
29471 };
29472 }
29473 return function (source) { return source.lift(shareReplayOperator(config)); };
29474}
29475function shareReplayOperator(_a) {
29476 var _b = _a.bufferSize, bufferSize = _b === void 0 ? Number.POSITIVE_INFINITY : _b, _c = _a.windowTime, windowTime = _c === void 0 ? Number.POSITIVE_INFINITY : _c, useRefCount = _a.refCount, scheduler = _a.scheduler;
29477 var subject;
29478 var refCount = 0;
29479 var subscription;
29480 var hasError = false;
29481 var isComplete = false;
29482 return function shareReplayOperation(source) {
29483 refCount++;
29484 if (!subject || hasError) {
29485 hasError = false;
29486 subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
29487 subscription = source.subscribe({
29488 next: function (value) { subject.next(value); },
29489 error: function (err) {
29490 hasError = true;
29491 subject.error(err);
29492 },
29493 complete: function () {
29494 isComplete = true;
29495 subject.complete();
29496 },
29497 });
29498 }
29499 var innerSub = subject.subscribe(this);
29500 this.add(function () {
29501 refCount--;
29502 innerSub.unsubscribe();
29503 if (subscription && !isComplete && useRefCount && refCount === 0) {
29504 subscription.unsubscribe();
29505 subscription = undefined;
29506 subject = undefined;
29507 }
29508 });
29509 };
29510}
29511//# sourceMappingURL=shareReplay.js.map
29512
29513
29514/***/ }),
29515/* 320 */
29516/***/ (function(module, __webpack_exports__, __webpack_require__) {
29517
29518"use strict";
29519__webpack_require__.r(__webpack_exports__);
29520/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; });
29521/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29522/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
29523/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(203);
29524/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
29525
29526
29527
29528function single(predicate) {
29529 return function (source) { return source.lift(new SingleOperator(predicate, source)); };
29530}
29531var SingleOperator = /*@__PURE__*/ (function () {
29532 function SingleOperator(predicate, source) {
29533 this.predicate = predicate;
29534 this.source = source;
29535 }
29536 SingleOperator.prototype.call = function (subscriber, source) {
29537 return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
29538 };
29539 return SingleOperator;
29540}());
29541var SingleSubscriber = /*@__PURE__*/ (function (_super) {
29542 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SingleSubscriber, _super);
29543 function SingleSubscriber(destination, predicate, source) {
29544 var _this = _super.call(this, destination) || this;
29545 _this.predicate = predicate;
29546 _this.source = source;
29547 _this.seenValue = false;
29548 _this.index = 0;
29549 return _this;
29550 }
29551 SingleSubscriber.prototype.applySingleValue = function (value) {
29552 if (this.seenValue) {
29553 this.destination.error('Sequence contains more than one element');
29554 }
29555 else {
29556 this.seenValue = true;
29557 this.singleValue = value;
29558 }
29559 };
29560 SingleSubscriber.prototype._next = function (value) {
29561 var index = this.index++;
29562 if (this.predicate) {
29563 this.tryNext(value, index);
29564 }
29565 else {
29566 this.applySingleValue(value);
29567 }
29568 };
29569 SingleSubscriber.prototype.tryNext = function (value, index) {
29570 try {
29571 if (this.predicate(value, index, this.source)) {
29572 this.applySingleValue(value);
29573 }
29574 }
29575 catch (err) {
29576 this.destination.error(err);
29577 }
29578 };
29579 SingleSubscriber.prototype._complete = function () {
29580 var destination = this.destination;
29581 if (this.index > 0) {
29582 destination.next(this.seenValue ? this.singleValue : undefined);
29583 destination.complete();
29584 }
29585 else {
29586 destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__["EmptyError"]);
29587 }
29588 };
29589 return SingleSubscriber;
29590}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29591//# sourceMappingURL=single.js.map
29592
29593
29594/***/ }),
29595/* 321 */
29596/***/ (function(module, __webpack_exports__, __webpack_require__) {
29597
29598"use strict";
29599__webpack_require__.r(__webpack_exports__);
29600/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
29601/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29602/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
29603/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29604
29605
29606function skip(count) {
29607 return function (source) { return source.lift(new SkipOperator(count)); };
29608}
29609var SkipOperator = /*@__PURE__*/ (function () {
29610 function SkipOperator(total) {
29611 this.total = total;
29612 }
29613 SkipOperator.prototype.call = function (subscriber, source) {
29614 return source.subscribe(new SkipSubscriber(subscriber, this.total));
29615 };
29616 return SkipOperator;
29617}());
29618var SkipSubscriber = /*@__PURE__*/ (function (_super) {
29619 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipSubscriber, _super);
29620 function SkipSubscriber(destination, total) {
29621 var _this = _super.call(this, destination) || this;
29622 _this.total = total;
29623 _this.count = 0;
29624 return _this;
29625 }
29626 SkipSubscriber.prototype._next = function (x) {
29627 if (++this.count > this.total) {
29628 this.destination.next(x);
29629 }
29630 };
29631 return SkipSubscriber;
29632}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29633//# sourceMappingURL=skip.js.map
29634
29635
29636/***/ }),
29637/* 322 */
29638/***/ (function(module, __webpack_exports__, __webpack_require__) {
29639
29640"use strict";
29641__webpack_require__.r(__webpack_exports__);
29642/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
29643/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29644/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
29645/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(202);
29646/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
29647
29648
29649
29650function skipLast(count) {
29651 return function (source) { return source.lift(new SkipLastOperator(count)); };
29652}
29653var SkipLastOperator = /*@__PURE__*/ (function () {
29654 function SkipLastOperator(_skipCount) {
29655 this._skipCount = _skipCount;
29656 if (this._skipCount < 0) {
29657 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
29658 }
29659 }
29660 SkipLastOperator.prototype.call = function (subscriber, source) {
29661 if (this._skipCount === 0) {
29662 return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"](subscriber));
29663 }
29664 else {
29665 return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
29666 }
29667 };
29668 return SkipLastOperator;
29669}());
29670var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
29671 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipLastSubscriber, _super);
29672 function SkipLastSubscriber(destination, _skipCount) {
29673 var _this = _super.call(this, destination) || this;
29674 _this._skipCount = _skipCount;
29675 _this._count = 0;
29676 _this._ring = new Array(_skipCount);
29677 return _this;
29678 }
29679 SkipLastSubscriber.prototype._next = function (value) {
29680 var skipCount = this._skipCount;
29681 var count = this._count++;
29682 if (count < skipCount) {
29683 this._ring[count] = value;
29684 }
29685 else {
29686 var currentIndex = count % skipCount;
29687 var ring = this._ring;
29688 var oldValue = ring[currentIndex];
29689 ring[currentIndex] = value;
29690 this.destination.next(oldValue);
29691 }
29692 };
29693 return SkipLastSubscriber;
29694}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29695//# sourceMappingURL=skipLast.js.map
29696
29697
29698/***/ }),
29699/* 323 */
29700/***/ (function(module, __webpack_exports__, __webpack_require__) {
29701
29702"use strict";
29703__webpack_require__.r(__webpack_exports__);
29704/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
29705/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29706/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
29707/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(211);
29708/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
29709/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29710
29711
29712
29713
29714function skipUntil(notifier) {
29715 return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
29716}
29717var SkipUntilOperator = /*@__PURE__*/ (function () {
29718 function SkipUntilOperator(notifier) {
29719 this.notifier = notifier;
29720 }
29721 SkipUntilOperator.prototype.call = function (destination, source) {
29722 return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
29723 };
29724 return SkipUntilOperator;
29725}());
29726var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
29727 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipUntilSubscriber, _super);
29728 function SkipUntilSubscriber(destination, notifier) {
29729 var _this = _super.call(this, destination) || this;
29730 _this.hasValue = false;
29731 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](_this, undefined, undefined);
29732 _this.add(innerSubscriber);
29733 _this.innerSubscription = innerSubscriber;
29734 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_this, notifier, undefined, undefined, innerSubscriber);
29735 return _this;
29736 }
29737 SkipUntilSubscriber.prototype._next = function (value) {
29738 if (this.hasValue) {
29739 _super.prototype._next.call(this, value);
29740 }
29741 };
29742 SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29743 this.hasValue = true;
29744 if (this.innerSubscription) {
29745 this.innerSubscription.unsubscribe();
29746 }
29747 };
29748 SkipUntilSubscriber.prototype.notifyComplete = function () {
29749 };
29750 return SkipUntilSubscriber;
29751}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29752//# sourceMappingURL=skipUntil.js.map
29753
29754
29755/***/ }),
29756/* 324 */
29757/***/ (function(module, __webpack_exports__, __webpack_require__) {
29758
29759"use strict";
29760__webpack_require__.r(__webpack_exports__);
29761/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
29762/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29763/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
29764/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29765
29766
29767function skipWhile(predicate) {
29768 return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
29769}
29770var SkipWhileOperator = /*@__PURE__*/ (function () {
29771 function SkipWhileOperator(predicate) {
29772 this.predicate = predicate;
29773 }
29774 SkipWhileOperator.prototype.call = function (subscriber, source) {
29775 return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
29776 };
29777 return SkipWhileOperator;
29778}());
29779var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
29780 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipWhileSubscriber, _super);
29781 function SkipWhileSubscriber(destination, predicate) {
29782 var _this = _super.call(this, destination) || this;
29783 _this.predicate = predicate;
29784 _this.skipping = true;
29785 _this.index = 0;
29786 return _this;
29787 }
29788 SkipWhileSubscriber.prototype._next = function (value) {
29789 var destination = this.destination;
29790 if (this.skipping) {
29791 this.tryCallPredicate(value);
29792 }
29793 if (!this.skipping) {
29794 destination.next(value);
29795 }
29796 };
29797 SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
29798 try {
29799 var result = this.predicate(value, this.index++);
29800 this.skipping = Boolean(result);
29801 }
29802 catch (err) {
29803 this.destination.error(err);
29804 }
29805 };
29806 return SkipWhileSubscriber;
29807}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29808//# sourceMappingURL=skipWhile.js.map
29809
29810
29811/***/ }),
29812/* 325 */
29813/***/ (function(module, __webpack_exports__, __webpack_require__) {
29814
29815"use strict";
29816__webpack_require__.r(__webpack_exports__);
29817/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
29818/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(219);
29819/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
29820/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
29821
29822
29823function startWith() {
29824 var array = [];
29825 for (var _i = 0; _i < arguments.length; _i++) {
29826 array[_i] = arguments[_i];
29827 }
29828 var scheduler = array[array.length - 1];
29829 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) {
29830 array.pop();
29831 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); };
29832 }
29833 else {
29834 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); };
29835 }
29836}
29837//# sourceMappingURL=startWith.js.map
29838
29839
29840/***/ }),
29841/* 326 */
29842/***/ (function(module, __webpack_exports__, __webpack_require__) {
29843
29844"use strict";
29845__webpack_require__.r(__webpack_exports__);
29846/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
29847/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(327);
29848/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
29849
29850function subscribeOn(scheduler, delay) {
29851 if (delay === void 0) {
29852 delay = 0;
29853 }
29854 return function subscribeOnOperatorFunction(source) {
29855 return source.lift(new SubscribeOnOperator(scheduler, delay));
29856 };
29857}
29858var SubscribeOnOperator = /*@__PURE__*/ (function () {
29859 function SubscribeOnOperator(scheduler, delay) {
29860 this.scheduler = scheduler;
29861 this.delay = delay;
29862 }
29863 SubscribeOnOperator.prototype.call = function (subscriber, source) {
29864 return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber);
29865 };
29866 return SubscribeOnOperator;
29867}());
29868//# sourceMappingURL=subscribeOn.js.map
29869
29870
29871/***/ }),
29872/* 327 */
29873/***/ (function(module, __webpack_exports__, __webpack_require__) {
29874
29875"use strict";
29876__webpack_require__.r(__webpack_exports__);
29877/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; });
29878/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29879/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(149);
29880/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(191);
29881/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(237);
29882/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
29883
29884
29885
29886
29887var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
29888 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscribeOnObservable, _super);
29889 function SubscribeOnObservable(source, delayTime, scheduler) {
29890 if (delayTime === void 0) {
29891 delayTime = 0;
29892 }
29893 if (scheduler === void 0) {
29894 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
29895 }
29896 var _this = _super.call(this) || this;
29897 _this.source = source;
29898 _this.delayTime = delayTime;
29899 _this.scheduler = scheduler;
29900 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(delayTime) || delayTime < 0) {
29901 _this.delayTime = 0;
29902 }
29903 if (!scheduler || typeof scheduler.schedule !== 'function') {
29904 _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
29905 }
29906 return _this;
29907 }
29908 SubscribeOnObservable.create = function (source, delay, scheduler) {
29909 if (delay === void 0) {
29910 delay = 0;
29911 }
29912 if (scheduler === void 0) {
29913 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
29914 }
29915 return new SubscribeOnObservable(source, delay, scheduler);
29916 };
29917 SubscribeOnObservable.dispatch = function (arg) {
29918 var source = arg.source, subscriber = arg.subscriber;
29919 return this.add(source.subscribe(subscriber));
29920 };
29921 SubscribeOnObservable.prototype._subscribe = function (subscriber) {
29922 var delay = this.delayTime;
29923 var source = this.source;
29924 var scheduler = this.scheduler;
29925 return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
29926 source: source, subscriber: subscriber
29927 });
29928 };
29929 return SubscribeOnObservable;
29930}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
29931
29932//# sourceMappingURL=SubscribeOnObservable.js.map
29933
29934
29935/***/ }),
29936/* 328 */
29937/***/ (function(module, __webpack_exports__, __webpack_require__) {
29938
29939"use strict";
29940__webpack_require__.r(__webpack_exports__);
29941/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
29942/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(329);
29943/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(200);
29944/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
29945
29946
29947function switchAll() {
29948 return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
29949}
29950//# sourceMappingURL=switchAll.js.map
29951
29952
29953/***/ }),
29954/* 329 */
29955/***/ (function(module, __webpack_exports__, __webpack_require__) {
29956
29957"use strict";
29958__webpack_require__.r(__webpack_exports__);
29959/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
29960/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
29961/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
29962/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(211);
29963/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
29964/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(206);
29965/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(223);
29966/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
29967
29968
29969
29970
29971
29972
29973function switchMap(project, resultSelector) {
29974 if (typeof resultSelector === 'function') {
29975 return function (source) { return source.pipe(switchMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
29976 }
29977 return function (source) { return source.lift(new SwitchMapOperator(project)); };
29978}
29979var SwitchMapOperator = /*@__PURE__*/ (function () {
29980 function SwitchMapOperator(project) {
29981 this.project = project;
29982 }
29983 SwitchMapOperator.prototype.call = function (subscriber, source) {
29984 return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
29985 };
29986 return SwitchMapOperator;
29987}());
29988var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
29989 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchMapSubscriber, _super);
29990 function SwitchMapSubscriber(destination, project) {
29991 var _this = _super.call(this, destination) || this;
29992 _this.project = project;
29993 _this.index = 0;
29994 return _this;
29995 }
29996 SwitchMapSubscriber.prototype._next = function (value) {
29997 var result;
29998 var index = this.index++;
29999 try {
30000 result = this.project(value, index);
30001 }
30002 catch (error) {
30003 this.destination.error(error);
30004 return;
30005 }
30006 this._innerSub(result, value, index);
30007 };
30008 SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
30009 var innerSubscription = this.innerSubscription;
30010 if (innerSubscription) {
30011 innerSubscription.unsubscribe();
30012 }
30013 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
30014 var destination = this.destination;
30015 destination.add(innerSubscriber);
30016 this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
30017 };
30018 SwitchMapSubscriber.prototype._complete = function () {
30019 var innerSubscription = this.innerSubscription;
30020 if (!innerSubscription || innerSubscription.closed) {
30021 _super.prototype._complete.call(this);
30022 }
30023 this.unsubscribe();
30024 };
30025 SwitchMapSubscriber.prototype._unsubscribe = function () {
30026 this.innerSubscription = null;
30027 };
30028 SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
30029 var destination = this.destination;
30030 destination.remove(innerSub);
30031 this.innerSubscription = null;
30032 if (this.isStopped) {
30033 _super.prototype._complete.call(this);
30034 }
30035 };
30036 SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30037 this.destination.next(innerValue);
30038 };
30039 return SwitchMapSubscriber;
30040}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30041//# sourceMappingURL=switchMap.js.map
30042
30043
30044/***/ }),
30045/* 330 */
30046/***/ (function(module, __webpack_exports__, __webpack_require__) {
30047
30048"use strict";
30049__webpack_require__.r(__webpack_exports__);
30050/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
30051/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(329);
30052/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
30053
30054function switchMapTo(innerObservable, resultSelector) {
30055 return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; });
30056}
30057//# sourceMappingURL=switchMapTo.js.map
30058
30059
30060/***/ }),
30061/* 331 */
30062/***/ (function(module, __webpack_exports__, __webpack_require__) {
30063
30064"use strict";
30065__webpack_require__.r(__webpack_exports__);
30066/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
30067/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
30068/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
30069/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
30070/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30071
30072
30073
30074function takeUntil(notifier) {
30075 return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
30076}
30077var TakeUntilOperator = /*@__PURE__*/ (function () {
30078 function TakeUntilOperator(notifier) {
30079 this.notifier = notifier;
30080 }
30081 TakeUntilOperator.prototype.call = function (subscriber, source) {
30082 var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
30083 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(takeUntilSubscriber, this.notifier);
30084 if (notifierSubscription && !takeUntilSubscriber.seenValue) {
30085 takeUntilSubscriber.add(notifierSubscription);
30086 return source.subscribe(takeUntilSubscriber);
30087 }
30088 return takeUntilSubscriber;
30089 };
30090 return TakeUntilOperator;
30091}());
30092var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
30093 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeUntilSubscriber, _super);
30094 function TakeUntilSubscriber(destination) {
30095 var _this = _super.call(this, destination) || this;
30096 _this.seenValue = false;
30097 return _this;
30098 }
30099 TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30100 this.seenValue = true;
30101 this.complete();
30102 };
30103 TakeUntilSubscriber.prototype.notifyComplete = function () {
30104 };
30105 return TakeUntilSubscriber;
30106}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30107//# sourceMappingURL=takeUntil.js.map
30108
30109
30110/***/ }),
30111/* 332 */
30112/***/ (function(module, __webpack_exports__, __webpack_require__) {
30113
30114"use strict";
30115__webpack_require__.r(__webpack_exports__);
30116/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
30117/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
30118/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
30119/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30120
30121
30122function takeWhile(predicate, inclusive) {
30123 if (inclusive === void 0) {
30124 inclusive = false;
30125 }
30126 return function (source) {
30127 return source.lift(new TakeWhileOperator(predicate, inclusive));
30128 };
30129}
30130var TakeWhileOperator = /*@__PURE__*/ (function () {
30131 function TakeWhileOperator(predicate, inclusive) {
30132 this.predicate = predicate;
30133 this.inclusive = inclusive;
30134 }
30135 TakeWhileOperator.prototype.call = function (subscriber, source) {
30136 return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
30137 };
30138 return TakeWhileOperator;
30139}());
30140var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
30141 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeWhileSubscriber, _super);
30142 function TakeWhileSubscriber(destination, predicate, inclusive) {
30143 var _this = _super.call(this, destination) || this;
30144 _this.predicate = predicate;
30145 _this.inclusive = inclusive;
30146 _this.index = 0;
30147 return _this;
30148 }
30149 TakeWhileSubscriber.prototype._next = function (value) {
30150 var destination = this.destination;
30151 var result;
30152 try {
30153 result = this.predicate(value, this.index++);
30154 }
30155 catch (err) {
30156 destination.error(err);
30157 return;
30158 }
30159 this.nextOrComplete(value, result);
30160 };
30161 TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
30162 var destination = this.destination;
30163 if (Boolean(predicateResult)) {
30164 destination.next(value);
30165 }
30166 else {
30167 if (this.inclusive) {
30168 destination.next(value);
30169 }
30170 destination.complete();
30171 }
30172 };
30173 return TakeWhileSubscriber;
30174}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30175//# sourceMappingURL=takeWhile.js.map
30176
30177
30178/***/ }),
30179/* 333 */
30180/***/ (function(module, __webpack_exports__, __webpack_require__) {
30181
30182"use strict";
30183__webpack_require__.r(__webpack_exports__);
30184/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
30185/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
30186/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
30187/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(165);
30188/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(153);
30189/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
30190
30191
30192
30193
30194function tap(nextOrObserver, error, complete) {
30195 return function tapOperatorFunction(source) {
30196 return source.lift(new DoOperator(nextOrObserver, error, complete));
30197 };
30198}
30199var DoOperator = /*@__PURE__*/ (function () {
30200 function DoOperator(nextOrObserver, error, complete) {
30201 this.nextOrObserver = nextOrObserver;
30202 this.error = error;
30203 this.complete = complete;
30204 }
30205 DoOperator.prototype.call = function (subscriber, source) {
30206 return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
30207 };
30208 return DoOperator;
30209}());
30210var TapSubscriber = /*@__PURE__*/ (function (_super) {
30211 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TapSubscriber, _super);
30212 function TapSubscriber(destination, observerOrNext, error, complete) {
30213 var _this = _super.call(this, destination) || this;
30214 _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30215 _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30216 _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30217 _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30218 _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30219 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(observerOrNext)) {
30220 _this._context = _this;
30221 _this._tapNext = observerOrNext;
30222 }
30223 else if (observerOrNext) {
30224 _this._context = observerOrNext;
30225 _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30226 _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30227 _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30228 }
30229 return _this;
30230 }
30231 TapSubscriber.prototype._next = function (value) {
30232 try {
30233 this._tapNext.call(this._context, value);
30234 }
30235 catch (err) {
30236 this.destination.error(err);
30237 return;
30238 }
30239 this.destination.next(value);
30240 };
30241 TapSubscriber.prototype._error = function (err) {
30242 try {
30243 this._tapError.call(this._context, err);
30244 }
30245 catch (err) {
30246 this.destination.error(err);
30247 return;
30248 }
30249 this.destination.error(err);
30250 };
30251 TapSubscriber.prototype._complete = function () {
30252 try {
30253 this._tapComplete.call(this._context);
30254 }
30255 catch (err) {
30256 this.destination.error(err);
30257 return;
30258 }
30259 return this.destination.complete();
30260 };
30261 return TapSubscriber;
30262}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30263//# sourceMappingURL=tap.js.map
30264
30265
30266/***/ }),
30267/* 334 */
30268/***/ (function(module, __webpack_exports__, __webpack_require__) {
30269
30270"use strict";
30271__webpack_require__.r(__webpack_exports__);
30272/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; });
30273/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
30274/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
30275/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
30276/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
30277/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30278
30279
30280
30281var defaultThrottleConfig = {
30282 leading: true,
30283 trailing: false
30284};
30285function throttle(durationSelector, config) {
30286 if (config === void 0) {
30287 config = defaultThrottleConfig;
30288 }
30289 return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
30290}
30291var ThrottleOperator = /*@__PURE__*/ (function () {
30292 function ThrottleOperator(durationSelector, leading, trailing) {
30293 this.durationSelector = durationSelector;
30294 this.leading = leading;
30295 this.trailing = trailing;
30296 }
30297 ThrottleOperator.prototype.call = function (subscriber, source) {
30298 return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
30299 };
30300 return ThrottleOperator;
30301}());
30302var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
30303 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleSubscriber, _super);
30304 function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
30305 var _this = _super.call(this, destination) || this;
30306 _this.destination = destination;
30307 _this.durationSelector = durationSelector;
30308 _this._leading = _leading;
30309 _this._trailing = _trailing;
30310 _this._hasValue = false;
30311 return _this;
30312 }
30313 ThrottleSubscriber.prototype._next = function (value) {
30314 this._hasValue = true;
30315 this._sendValue = value;
30316 if (!this._throttled) {
30317 if (this._leading) {
30318 this.send();
30319 }
30320 else {
30321 this.throttle(value);
30322 }
30323 }
30324 };
30325 ThrottleSubscriber.prototype.send = function () {
30326 var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
30327 if (_hasValue) {
30328 this.destination.next(_sendValue);
30329 this.throttle(_sendValue);
30330 }
30331 this._hasValue = false;
30332 this._sendValue = null;
30333 };
30334 ThrottleSubscriber.prototype.throttle = function (value) {
30335 var duration = this.tryDurationSelector(value);
30336 if (!!duration) {
30337 this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration));
30338 }
30339 };
30340 ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
30341 try {
30342 return this.durationSelector(value);
30343 }
30344 catch (err) {
30345 this.destination.error(err);
30346 return null;
30347 }
30348 };
30349 ThrottleSubscriber.prototype.throttlingDone = function () {
30350 var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
30351 if (_throttled) {
30352 _throttled.unsubscribe();
30353 }
30354 this._throttled = null;
30355 if (_trailing) {
30356 this.send();
30357 }
30358 };
30359 ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30360 this.throttlingDone();
30361 };
30362 ThrottleSubscriber.prototype.notifyComplete = function () {
30363 this.throttlingDone();
30364 };
30365 return ThrottleSubscriber;
30366}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30367//# sourceMappingURL=throttle.js.map
30368
30369
30370/***/ }),
30371/* 335 */
30372/***/ (function(module, __webpack_exports__, __webpack_require__) {
30373
30374"use strict";
30375__webpack_require__.r(__webpack_exports__);
30376/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
30377/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
30378/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
30379/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(195);
30380/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(334);
30381/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
30382
30383
30384
30385
30386function throttleTime(duration, scheduler, config) {
30387 if (scheduler === void 0) {
30388 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
30389 }
30390 if (config === void 0) {
30391 config = _throttle__WEBPACK_IMPORTED_MODULE_3__["defaultThrottleConfig"];
30392 }
30393 return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
30394}
30395var ThrottleTimeOperator = /*@__PURE__*/ (function () {
30396 function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
30397 this.duration = duration;
30398 this.scheduler = scheduler;
30399 this.leading = leading;
30400 this.trailing = trailing;
30401 }
30402 ThrottleTimeOperator.prototype.call = function (subscriber, source) {
30403 return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
30404 };
30405 return ThrottleTimeOperator;
30406}());
30407var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
30408 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleTimeSubscriber, _super);
30409 function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
30410 var _this = _super.call(this, destination) || this;
30411 _this.duration = duration;
30412 _this.scheduler = scheduler;
30413 _this.leading = leading;
30414 _this.trailing = trailing;
30415 _this._hasTrailingValue = false;
30416 _this._trailingValue = null;
30417 return _this;
30418 }
30419 ThrottleTimeSubscriber.prototype._next = function (value) {
30420 if (this.throttled) {
30421 if (this.trailing) {
30422 this._trailingValue = value;
30423 this._hasTrailingValue = true;
30424 }
30425 }
30426 else {
30427 this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));
30428 if (this.leading) {
30429 this.destination.next(value);
30430 }
30431 else if (this.trailing) {
30432 this._trailingValue = value;
30433 this._hasTrailingValue = true;
30434 }
30435 }
30436 };
30437 ThrottleTimeSubscriber.prototype._complete = function () {
30438 if (this._hasTrailingValue) {
30439 this.destination.next(this._trailingValue);
30440 this.destination.complete();
30441 }
30442 else {
30443 this.destination.complete();
30444 }
30445 };
30446 ThrottleTimeSubscriber.prototype.clearThrottle = function () {
30447 var throttled = this.throttled;
30448 if (throttled) {
30449 if (this.trailing && this._hasTrailingValue) {
30450 this.destination.next(this._trailingValue);
30451 this._trailingValue = null;
30452 this._hasTrailingValue = false;
30453 }
30454 throttled.unsubscribe();
30455 this.remove(throttled);
30456 this.throttled = null;
30457 }
30458 };
30459 return ThrottleTimeSubscriber;
30460}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30461function dispatchNext(arg) {
30462 var subscriber = arg.subscriber;
30463 subscriber.clearThrottle();
30464}
30465//# sourceMappingURL=throttleTime.js.map
30466
30467
30468/***/ }),
30469/* 336 */
30470/***/ (function(module, __webpack_exports__, __webpack_require__) {
30471
30472"use strict";
30473__webpack_require__.r(__webpack_exports__);
30474/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
30475/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; });
30476/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(195);
30477/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(296);
30478/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
30479/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(206);
30480/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
30481
30482
30483
30484
30485function timeInterval(scheduler) {
30486 if (scheduler === void 0) {
30487 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
30488 }
30489 return function (source) {
30490 return Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
30491 return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(function (_a, value) {
30492 var current = _a.current;
30493 return ({ value: value, current: scheduler.now(), last: current });
30494 }, { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_a) {
30495 var current = _a.current, last = _a.last, value = _a.value;
30496 return new TimeInterval(value, current - last);
30497 }));
30498 });
30499 };
30500}
30501var TimeInterval = /*@__PURE__*/ (function () {
30502 function TimeInterval(value, interval) {
30503 this.value = value;
30504 this.interval = interval;
30505 }
30506 return TimeInterval;
30507}());
30508
30509//# sourceMappingURL=timeInterval.js.map
30510
30511
30512/***/ }),
30513/* 337 */
30514/***/ (function(module, __webpack_exports__, __webpack_require__) {
30515
30516"use strict";
30517__webpack_require__.r(__webpack_exports__);
30518/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
30519/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(195);
30520/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
30521/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(338);
30522/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(189);
30523/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
30524
30525
30526
30527
30528function timeout(due, scheduler) {
30529 if (scheduler === void 0) {
30530 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
30531 }
30532 return Object(_timeoutWith__WEBPACK_IMPORTED_MODULE_2__["timeoutWith"])(due, Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_3__["throwError"])(new _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__["TimeoutError"]()), scheduler);
30533}
30534//# sourceMappingURL=timeout.js.map
30535
30536
30537/***/ }),
30538/* 338 */
30539/***/ (function(module, __webpack_exports__, __webpack_require__) {
30540
30541"use strict";
30542__webpack_require__.r(__webpack_exports__);
30543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
30544/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
30545/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
30546/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(270);
30547/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
30548/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(210);
30549/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30550
30551
30552
30553
30554
30555function timeoutWith(due, withObservable, scheduler) {
30556 if (scheduler === void 0) {
30557 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
30558 }
30559 return function (source) {
30560 var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(due);
30561 var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
30562 return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
30563 };
30564}
30565var TimeoutWithOperator = /*@__PURE__*/ (function () {
30566 function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
30567 this.waitFor = waitFor;
30568 this.absoluteTimeout = absoluteTimeout;
30569 this.withObservable = withObservable;
30570 this.scheduler = scheduler;
30571 }
30572 TimeoutWithOperator.prototype.call = function (subscriber, source) {
30573 return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
30574 };
30575 return TimeoutWithOperator;
30576}());
30577var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
30578 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutWithSubscriber, _super);
30579 function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
30580 var _this = _super.call(this, destination) || this;
30581 _this.absoluteTimeout = absoluteTimeout;
30582 _this.waitFor = waitFor;
30583 _this.withObservable = withObservable;
30584 _this.scheduler = scheduler;
30585 _this.action = null;
30586 _this.scheduleTimeout();
30587 return _this;
30588 }
30589 TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
30590 var withObservable = subscriber.withObservable;
30591 subscriber._unsubscribeAndRecycle();
30592 subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(subscriber, withObservable));
30593 };
30594 TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
30595 var action = this.action;
30596 if (action) {
30597 this.action = action.schedule(this, this.waitFor);
30598 }
30599 else {
30600 this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
30601 }
30602 };
30603 TimeoutWithSubscriber.prototype._next = function (value) {
30604 if (!this.absoluteTimeout) {
30605 this.scheduleTimeout();
30606 }
30607 _super.prototype._next.call(this, value);
30608 };
30609 TimeoutWithSubscriber.prototype._unsubscribe = function () {
30610 this.action = null;
30611 this.scheduler = null;
30612 this.withObservable = null;
30613 };
30614 return TimeoutWithSubscriber;
30615}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
30616//# sourceMappingURL=timeoutWith.js.map
30617
30618
30619/***/ }),
30620/* 339 */
30621/***/ (function(module, __webpack_exports__, __webpack_require__) {
30622
30623"use strict";
30624__webpack_require__.r(__webpack_exports__);
30625/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
30626/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
30627/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(195);
30628/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
30629/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
30630
30631
30632function timestamp(scheduler) {
30633 if (scheduler === void 0) {
30634 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
30635 }
30636 return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) { return new Timestamp(value, scheduler.now()); });
30637}
30638var Timestamp = /*@__PURE__*/ (function () {
30639 function Timestamp(value, timestamp) {
30640 this.value = value;
30641 this.timestamp = timestamp;
30642 }
30643 return Timestamp;
30644}());
30645
30646//# sourceMappingURL=timestamp.js.map
30647
30648
30649/***/ }),
30650/* 340 */
30651/***/ (function(module, __webpack_exports__, __webpack_require__) {
30652
30653"use strict";
30654__webpack_require__.r(__webpack_exports__);
30655/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
30656/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295);
30657/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
30658
30659function toArrayReducer(arr, item, index) {
30660 if (index === 0) {
30661 return [item];
30662 }
30663 arr.push(item);
30664 return arr;
30665}
30666function toArray() {
30667 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []);
30668}
30669//# sourceMappingURL=toArray.js.map
30670
30671
30672/***/ }),
30673/* 341 */
30674/***/ (function(module, __webpack_exports__, __webpack_require__) {
30675
30676"use strict";
30677__webpack_require__.r(__webpack_exports__);
30678/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; });
30679/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
30680/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
30681/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
30682/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
30683/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30684
30685
30686
30687
30688function window(windowBoundaries) {
30689 return function windowOperatorFunction(source) {
30690 return source.lift(new WindowOperator(windowBoundaries));
30691 };
30692}
30693var WindowOperator = /*@__PURE__*/ (function () {
30694 function WindowOperator(windowBoundaries) {
30695 this.windowBoundaries = windowBoundaries;
30696 }
30697 WindowOperator.prototype.call = function (subscriber, source) {
30698 var windowSubscriber = new WindowSubscriber(subscriber);
30699 var sourceSubscription = source.subscribe(windowSubscriber);
30700 if (!sourceSubscription.closed) {
30701 windowSubscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
30702 }
30703 return sourceSubscription;
30704 };
30705 return WindowOperator;
30706}());
30707var WindowSubscriber = /*@__PURE__*/ (function (_super) {
30708 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
30709 function WindowSubscriber(destination) {
30710 var _this = _super.call(this, destination) || this;
30711 _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
30712 destination.next(_this.window);
30713 return _this;
30714 }
30715 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30716 this.openWindow();
30717 };
30718 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
30719 this._error(error);
30720 };
30721 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
30722 this._complete();
30723 };
30724 WindowSubscriber.prototype._next = function (value) {
30725 this.window.next(value);
30726 };
30727 WindowSubscriber.prototype._error = function (err) {
30728 this.window.error(err);
30729 this.destination.error(err);
30730 };
30731 WindowSubscriber.prototype._complete = function () {
30732 this.window.complete();
30733 this.destination.complete();
30734 };
30735 WindowSubscriber.prototype._unsubscribe = function () {
30736 this.window = null;
30737 };
30738 WindowSubscriber.prototype.openWindow = function () {
30739 var prevWindow = this.window;
30740 if (prevWindow) {
30741 prevWindow.complete();
30742 }
30743 var destination = this.destination;
30744 var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
30745 destination.next(newWindow);
30746 };
30747 return WindowSubscriber;
30748}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
30749//# sourceMappingURL=window.js.map
30750
30751
30752/***/ }),
30753/* 342 */
30754/***/ (function(module, __webpack_exports__, __webpack_require__) {
30755
30756"use strict";
30757__webpack_require__.r(__webpack_exports__);
30758/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
30759/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
30760/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(151);
30761/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
30762/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
30763
30764
30765
30766function windowCount(windowSize, startWindowEvery) {
30767 if (startWindowEvery === void 0) {
30768 startWindowEvery = 0;
30769 }
30770 return function windowCountOperatorFunction(source) {
30771 return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
30772 };
30773}
30774var WindowCountOperator = /*@__PURE__*/ (function () {
30775 function WindowCountOperator(windowSize, startWindowEvery) {
30776 this.windowSize = windowSize;
30777 this.startWindowEvery = startWindowEvery;
30778 }
30779 WindowCountOperator.prototype.call = function (subscriber, source) {
30780 return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
30781 };
30782 return WindowCountOperator;
30783}());
30784var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
30785 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowCountSubscriber, _super);
30786 function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
30787 var _this = _super.call(this, destination) || this;
30788 _this.destination = destination;
30789 _this.windowSize = windowSize;
30790 _this.startWindowEvery = startWindowEvery;
30791 _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]()];
30792 _this.count = 0;
30793 destination.next(_this.windows[0]);
30794 return _this;
30795 }
30796 WindowCountSubscriber.prototype._next = function (value) {
30797 var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
30798 var destination = this.destination;
30799 var windowSize = this.windowSize;
30800 var windows = this.windows;
30801 var len = windows.length;
30802 for (var i = 0; i < len && !this.closed; i++) {
30803 windows[i].next(value);
30804 }
30805 var c = this.count - windowSize + 1;
30806 if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
30807 windows.shift().complete();
30808 }
30809 if (++this.count % startWindowEvery === 0 && !this.closed) {
30810 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
30811 windows.push(window_1);
30812 destination.next(window_1);
30813 }
30814 };
30815 WindowCountSubscriber.prototype._error = function (err) {
30816 var windows = this.windows;
30817 if (windows) {
30818 while (windows.length > 0 && !this.closed) {
30819 windows.shift().error(err);
30820 }
30821 }
30822 this.destination.error(err);
30823 };
30824 WindowCountSubscriber.prototype._complete = function () {
30825 var windows = this.windows;
30826 if (windows) {
30827 while (windows.length > 0 && !this.closed) {
30828 windows.shift().complete();
30829 }
30830 }
30831 this.destination.complete();
30832 };
30833 WindowCountSubscriber.prototype._unsubscribe = function () {
30834 this.count = 0;
30835 this.windows = null;
30836 };
30837 return WindowCountSubscriber;
30838}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30839//# sourceMappingURL=windowCount.js.map
30840
30841
30842/***/ }),
30843/* 343 */
30844/***/ (function(module, __webpack_exports__, __webpack_require__) {
30845
30846"use strict";
30847__webpack_require__.r(__webpack_exports__);
30848/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; });
30849/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
30850/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
30851/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(195);
30852/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(151);
30853/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(237);
30854/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(185);
30855/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
30856
30857
30858
30859
30860
30861
30862function windowTime(windowTimeSpan) {
30863 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
30864 var windowCreationInterval = null;
30865 var maxWindowSize = Number.POSITIVE_INFINITY;
30866 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[3])) {
30867 scheduler = arguments[3];
30868 }
30869 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[2])) {
30870 scheduler = arguments[2];
30871 }
30872 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[2])) {
30873 maxWindowSize = arguments[2];
30874 }
30875 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[1])) {
30876 scheduler = arguments[1];
30877 }
30878 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[1])) {
30879 windowCreationInterval = arguments[1];
30880 }
30881 return function windowTimeOperatorFunction(source) {
30882 return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
30883 };
30884}
30885var WindowTimeOperator = /*@__PURE__*/ (function () {
30886 function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
30887 this.windowTimeSpan = windowTimeSpan;
30888 this.windowCreationInterval = windowCreationInterval;
30889 this.maxWindowSize = maxWindowSize;
30890 this.scheduler = scheduler;
30891 }
30892 WindowTimeOperator.prototype.call = function (subscriber, source) {
30893 return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
30894 };
30895 return WindowTimeOperator;
30896}());
30897var CountedSubject = /*@__PURE__*/ (function (_super) {
30898 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountedSubject, _super);
30899 function CountedSubject() {
30900 var _this = _super !== null && _super.apply(this, arguments) || this;
30901 _this._numberOfNextedValues = 0;
30902 return _this;
30903 }
30904 CountedSubject.prototype.next = function (value) {
30905 this._numberOfNextedValues++;
30906 _super.prototype.next.call(this, value);
30907 };
30908 Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
30909 get: function () {
30910 return this._numberOfNextedValues;
30911 },
30912 enumerable: true,
30913 configurable: true
30914 });
30915 return CountedSubject;
30916}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
30917var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
30918 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowTimeSubscriber, _super);
30919 function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
30920 var _this = _super.call(this, destination) || this;
30921 _this.destination = destination;
30922 _this.windowTimeSpan = windowTimeSpan;
30923 _this.windowCreationInterval = windowCreationInterval;
30924 _this.maxWindowSize = maxWindowSize;
30925 _this.scheduler = scheduler;
30926 _this.windows = [];
30927 var window = _this.openWindow();
30928 if (windowCreationInterval !== null && windowCreationInterval >= 0) {
30929 var closeState = { subscriber: _this, window: window, context: null };
30930 var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
30931 _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
30932 _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
30933 }
30934 else {
30935 var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
30936 _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
30937 }
30938 return _this;
30939 }
30940 WindowTimeSubscriber.prototype._next = function (value) {
30941 var windows = this.windows;
30942 var len = windows.length;
30943 for (var i = 0; i < len; i++) {
30944 var window_1 = windows[i];
30945 if (!window_1.closed) {
30946 window_1.next(value);
30947 if (window_1.numberOfNextedValues >= this.maxWindowSize) {
30948 this.closeWindow(window_1);
30949 }
30950 }
30951 }
30952 };
30953 WindowTimeSubscriber.prototype._error = function (err) {
30954 var windows = this.windows;
30955 while (windows.length > 0) {
30956 windows.shift().error(err);
30957 }
30958 this.destination.error(err);
30959 };
30960 WindowTimeSubscriber.prototype._complete = function () {
30961 var windows = this.windows;
30962 while (windows.length > 0) {
30963 var window_2 = windows.shift();
30964 if (!window_2.closed) {
30965 window_2.complete();
30966 }
30967 }
30968 this.destination.complete();
30969 };
30970 WindowTimeSubscriber.prototype.openWindow = function () {
30971 var window = new CountedSubject();
30972 this.windows.push(window);
30973 var destination = this.destination;
30974 destination.next(window);
30975 return window;
30976 };
30977 WindowTimeSubscriber.prototype.closeWindow = function (window) {
30978 window.complete();
30979 var windows = this.windows;
30980 windows.splice(windows.indexOf(window), 1);
30981 };
30982 return WindowTimeSubscriber;
30983}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
30984function dispatchWindowTimeSpanOnly(state) {
30985 var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
30986 if (window) {
30987 subscriber.closeWindow(window);
30988 }
30989 state.window = subscriber.openWindow();
30990 this.schedule(state, windowTimeSpan);
30991}
30992function dispatchWindowCreation(state) {
30993 var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
30994 var window = subscriber.openWindow();
30995 var action = this;
30996 var context = { action: action, subscription: null };
30997 var timeSpanState = { subscriber: subscriber, window: window, context: context };
30998 context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
30999 action.add(context.subscription);
31000 action.schedule(state, windowCreationInterval);
31001}
31002function dispatchWindowClose(state) {
31003 var subscriber = state.subscriber, window = state.window, context = state.context;
31004 if (context && context.action && context.subscription) {
31005 context.action.remove(context.subscription);
31006 }
31007 subscriber.closeWindow(window);
31008}
31009//# sourceMappingURL=windowTime.js.map
31010
31011
31012/***/ }),
31013/* 344 */
31014/***/ (function(module, __webpack_exports__, __webpack_require__) {
31015
31016"use strict";
31017__webpack_require__.r(__webpack_exports__);
31018/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
31019/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
31020/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
31021/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(157);
31022/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
31023/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(210);
31024/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31025
31026
31027
31028
31029
31030function windowToggle(openings, closingSelector) {
31031 return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
31032}
31033var WindowToggleOperator = /*@__PURE__*/ (function () {
31034 function WindowToggleOperator(openings, closingSelector) {
31035 this.openings = openings;
31036 this.closingSelector = closingSelector;
31037 }
31038 WindowToggleOperator.prototype.call = function (subscriber, source) {
31039 return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
31040 };
31041 return WindowToggleOperator;
31042}());
31043var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
31044 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowToggleSubscriber, _super);
31045 function WindowToggleSubscriber(destination, openings, closingSelector) {
31046 var _this = _super.call(this, destination) || this;
31047 _this.openings = openings;
31048 _this.closingSelector = closingSelector;
31049 _this.contexts = [];
31050 _this.add(_this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(_this, openings, openings));
31051 return _this;
31052 }
31053 WindowToggleSubscriber.prototype._next = function (value) {
31054 var contexts = this.contexts;
31055 if (contexts) {
31056 var len = contexts.length;
31057 for (var i = 0; i < len; i++) {
31058 contexts[i].window.next(value);
31059 }
31060 }
31061 };
31062 WindowToggleSubscriber.prototype._error = function (err) {
31063 var contexts = this.contexts;
31064 this.contexts = null;
31065 if (contexts) {
31066 var len = contexts.length;
31067 var index = -1;
31068 while (++index < len) {
31069 var context_1 = contexts[index];
31070 context_1.window.error(err);
31071 context_1.subscription.unsubscribe();
31072 }
31073 }
31074 _super.prototype._error.call(this, err);
31075 };
31076 WindowToggleSubscriber.prototype._complete = function () {
31077 var contexts = this.contexts;
31078 this.contexts = null;
31079 if (contexts) {
31080 var len = contexts.length;
31081 var index = -1;
31082 while (++index < len) {
31083 var context_2 = contexts[index];
31084 context_2.window.complete();
31085 context_2.subscription.unsubscribe();
31086 }
31087 }
31088 _super.prototype._complete.call(this);
31089 };
31090 WindowToggleSubscriber.prototype._unsubscribe = function () {
31091 var contexts = this.contexts;
31092 this.contexts = null;
31093 if (contexts) {
31094 var len = contexts.length;
31095 var index = -1;
31096 while (++index < len) {
31097 var context_3 = contexts[index];
31098 context_3.window.unsubscribe();
31099 context_3.subscription.unsubscribe();
31100 }
31101 }
31102 };
31103 WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31104 if (outerValue === this.openings) {
31105 var closingNotifier = void 0;
31106 try {
31107 var closingSelector = this.closingSelector;
31108 closingNotifier = closingSelector(innerValue);
31109 }
31110 catch (e) {
31111 return this.error(e);
31112 }
31113 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
31114 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
31115 var context_4 = { window: window_1, subscription: subscription };
31116 this.contexts.push(context_4);
31117 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, closingNotifier, context_4);
31118 if (innerSubscription.closed) {
31119 this.closeWindow(this.contexts.length - 1);
31120 }
31121 else {
31122 innerSubscription.context = context_4;
31123 subscription.add(innerSubscription);
31124 }
31125 this.destination.next(window_1);
31126 }
31127 else {
31128 this.closeWindow(this.contexts.indexOf(outerValue));
31129 }
31130 };
31131 WindowToggleSubscriber.prototype.notifyError = function (err) {
31132 this.error(err);
31133 };
31134 WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
31135 if (inner !== this.openSubscription) {
31136 this.closeWindow(this.contexts.indexOf(inner.context));
31137 }
31138 };
31139 WindowToggleSubscriber.prototype.closeWindow = function (index) {
31140 if (index === -1) {
31141 return;
31142 }
31143 var contexts = this.contexts;
31144 var context = contexts[index];
31145 var window = context.window, subscription = context.subscription;
31146 contexts.splice(index, 1);
31147 window.complete();
31148 subscription.unsubscribe();
31149 };
31150 return WindowToggleSubscriber;
31151}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
31152//# sourceMappingURL=windowToggle.js.map
31153
31154
31155/***/ }),
31156/* 345 */
31157/***/ (function(module, __webpack_exports__, __webpack_require__) {
31158
31159"use strict";
31160__webpack_require__.r(__webpack_exports__);
31161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
31162/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
31163/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
31164/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
31165/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
31166/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31167
31168
31169
31170
31171function windowWhen(closingSelector) {
31172 return function windowWhenOperatorFunction(source) {
31173 return source.lift(new WindowOperator(closingSelector));
31174 };
31175}
31176var WindowOperator = /*@__PURE__*/ (function () {
31177 function WindowOperator(closingSelector) {
31178 this.closingSelector = closingSelector;
31179 }
31180 WindowOperator.prototype.call = function (subscriber, source) {
31181 return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
31182 };
31183 return WindowOperator;
31184}());
31185var WindowSubscriber = /*@__PURE__*/ (function (_super) {
31186 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
31187 function WindowSubscriber(destination, closingSelector) {
31188 var _this = _super.call(this, destination) || this;
31189 _this.destination = destination;
31190 _this.closingSelector = closingSelector;
31191 _this.openWindow();
31192 return _this;
31193 }
31194 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31195 this.openWindow(innerSub);
31196 };
31197 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
31198 this._error(error);
31199 };
31200 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
31201 this.openWindow(innerSub);
31202 };
31203 WindowSubscriber.prototype._next = function (value) {
31204 this.window.next(value);
31205 };
31206 WindowSubscriber.prototype._error = function (err) {
31207 this.window.error(err);
31208 this.destination.error(err);
31209 this.unsubscribeClosingNotification();
31210 };
31211 WindowSubscriber.prototype._complete = function () {
31212 this.window.complete();
31213 this.destination.complete();
31214 this.unsubscribeClosingNotification();
31215 };
31216 WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
31217 if (this.closingNotification) {
31218 this.closingNotification.unsubscribe();
31219 }
31220 };
31221 WindowSubscriber.prototype.openWindow = function (innerSub) {
31222 if (innerSub === void 0) {
31223 innerSub = null;
31224 }
31225 if (innerSub) {
31226 this.remove(innerSub);
31227 innerSub.unsubscribe();
31228 }
31229 var prevWindow = this.window;
31230 if (prevWindow) {
31231 prevWindow.complete();
31232 }
31233 var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
31234 this.destination.next(window);
31235 var closingNotifier;
31236 try {
31237 var closingSelector = this.closingSelector;
31238 closingNotifier = closingSelector();
31239 }
31240 catch (e) {
31241 this.destination.error(e);
31242 this.window.error(e);
31243 return;
31244 }
31245 this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
31246 };
31247 return WindowSubscriber;
31248}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
31249//# sourceMappingURL=windowWhen.js.map
31250
31251
31252/***/ }),
31253/* 346 */
31254/***/ (function(module, __webpack_exports__, __webpack_require__) {
31255
31256"use strict";
31257__webpack_require__.r(__webpack_exports__);
31258/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
31259/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(152);
31260/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
31261/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
31262/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31263
31264
31265
31266function withLatestFrom() {
31267 var args = [];
31268 for (var _i = 0; _i < arguments.length; _i++) {
31269 args[_i] = arguments[_i];
31270 }
31271 return function (source) {
31272 var project;
31273 if (typeof args[args.length - 1] === 'function') {
31274 project = args.pop();
31275 }
31276 var observables = args;
31277 return source.lift(new WithLatestFromOperator(observables, project));
31278 };
31279}
31280var WithLatestFromOperator = /*@__PURE__*/ (function () {
31281 function WithLatestFromOperator(observables, project) {
31282 this.observables = observables;
31283 this.project = project;
31284 }
31285 WithLatestFromOperator.prototype.call = function (subscriber, source) {
31286 return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
31287 };
31288 return WithLatestFromOperator;
31289}());
31290var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
31291 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WithLatestFromSubscriber, _super);
31292 function WithLatestFromSubscriber(destination, observables, project) {
31293 var _this = _super.call(this, destination) || this;
31294 _this.observables = observables;
31295 _this.project = project;
31296 _this.toRespond = [];
31297 var len = observables.length;
31298 _this.values = new Array(len);
31299 for (var i = 0; i < len; i++) {
31300 _this.toRespond.push(i);
31301 }
31302 for (var i = 0; i < len; i++) {
31303 var observable = observables[i];
31304 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, observable, observable, i));
31305 }
31306 return _this;
31307 }
31308 WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31309 this.values[outerIndex] = innerValue;
31310 var toRespond = this.toRespond;
31311 if (toRespond.length > 0) {
31312 var found = toRespond.indexOf(outerIndex);
31313 if (found !== -1) {
31314 toRespond.splice(found, 1);
31315 }
31316 }
31317 };
31318 WithLatestFromSubscriber.prototype.notifyComplete = function () {
31319 };
31320 WithLatestFromSubscriber.prototype._next = function (value) {
31321 if (this.toRespond.length === 0) {
31322 var args = [value].concat(this.values);
31323 if (this.project) {
31324 this._tryProject(args);
31325 }
31326 else {
31327 this.destination.next(args);
31328 }
31329 }
31330 };
31331 WithLatestFromSubscriber.prototype._tryProject = function (args) {
31332 var result;
31333 try {
31334 result = this.project.apply(this, args);
31335 }
31336 catch (err) {
31337 this.destination.error(err);
31338 return;
31339 }
31340 this.destination.next(result);
31341 };
31342 return WithLatestFromSubscriber;
31343}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
31344//# sourceMappingURL=withLatestFrom.js.map
31345
31346
31347/***/ }),
31348/* 347 */
31349/***/ (function(module, __webpack_exports__, __webpack_require__) {
31350
31351"use strict";
31352__webpack_require__.r(__webpack_exports__);
31353/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
31354/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(249);
31355/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
31356
31357function zip() {
31358 var observables = [];
31359 for (var _i = 0; _i < arguments.length; _i++) {
31360 observables[_i] = arguments[_i];
31361 }
31362 return function zipOperatorFunction(source) {
31363 return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"].apply(void 0, [source].concat(observables)));
31364 };
31365}
31366//# sourceMappingURL=zip.js.map
31367
31368
31369/***/ }),
31370/* 348 */
31371/***/ (function(module, __webpack_exports__, __webpack_require__) {
31372
31373"use strict";
31374__webpack_require__.r(__webpack_exports__);
31375/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
31376/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(249);
31377/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
31378
31379function zipAll(project) {
31380 return function (source) { return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); };
31381}
31382//# sourceMappingURL=zipAll.js.map
31383
31384
31385/***/ }),
31386/* 349 */,
31387/* 350 */
31388/***/ (function(module, exports, __webpack_require__) {
31389
31390"use strict";
31391
31392var __importDefault = (this && this.__importDefault) || function (mod) {
31393 return (mod && mod.__esModule) ? mod : { "default": mod };
31394};
31395Object.defineProperty(exports, "__esModule", { value: true });
31396var fast_glob_1 = __importDefault(__webpack_require__(53));
31397var os_1 = __importDefault(__webpack_require__(16));
31398var path_1 = __webpack_require__(15);
31399var rxjs_1 = __webpack_require__(148);
31400var operators_1 = __webpack_require__(251);
31401var vscode_uri_1 = __importDefault(__webpack_require__(132));
31402var fs_1 = __webpack_require__(36);
31403var constant_1 = __webpack_require__(2);
31404var util_1 = __webpack_require__(40);
31405var indexes = {};
31406var indexesFiles = {};
31407var queue = [];
31408var source$;
31409var gap = 100;
31410var count = 3;
31411var customProjectRootPatterns = constant_1.projectRootPatterns;
31412function initSource() {
31413 if (source$) {
31414 return;
31415 }
31416 source$ = new rxjs_1.Subject();
31417 source$.pipe(operators_1.concatMap(function (uri) {
31418 return rxjs_1.from(util_1.findProjectRoot(vscode_uri_1.default.parse(uri).fsPath, customProjectRootPatterns)).pipe(operators_1.switchMap(function (projectRoot) {
31419 return rxjs_1.from(util_1.getRealPath(projectRoot));
31420 }), operators_1.filter(function (projectRoot) { return projectRoot && projectRoot !== os_1.default.homedir(); }), operators_1.map(function (projectRoot) { return ({
31421 uri: uri,
31422 projectRoot: projectRoot,
31423 }); }));
31424 }), operators_1.filter(function (_a) {
31425 var projectRoot = _a.projectRoot;
31426 if (!indexes[projectRoot]) {
31427 indexes[projectRoot] = true;
31428 return true;
31429 }
31430 return false;
31431 }), operators_1.concatMap(function (_a) {
31432 var projectRoot = _a.projectRoot;
31433 var indexPath = path_1.join(projectRoot, "**/*.vim");
31434 return rxjs_1.from(fast_glob_1.default([indexPath, "!**/node_modules/**"])).pipe(operators_1.catchError(function (error) {
31435 process.send({
31436 msglog: [
31437 "Index Workspace Error: " + indexPath,
31438 "Error => " + (error.stack || error.message || error),
31439 ].join("\n"),
31440 });
31441 return rxjs_1.of(undefined);
31442 }), operators_1.filter(function (list) { return list && list.length > 0; }), operators_1.concatMap(function (list) {
31443 return rxjs_1.of.apply(void 0, list.sort(function (a, b) { return a.length - b.length; })).pipe(operators_1.filter(function (fpath) {
31444 if (!indexesFiles[fpath]) {
31445 indexesFiles[fpath] = true;
31446 return true;
31447 }
31448 return false;
31449 }), operators_1.mergeMap(function (fpath) {
31450 return rxjs_1.timer(gap).pipe(operators_1.concatMap(function () {
31451 var content = fs_1.readFileSync(fpath).toString();
31452 return rxjs_1.from(util_1.handleParse(content)).pipe(operators_1.filter(function (res) { return res[0] !== null; }), operators_1.map(function (res) { return ({
31453 node: res[0],
31454 uri: vscode_uri_1.default.file(fpath).toString(),
31455 }); }), operators_1.catchError(function (error) {
31456 process.send({
31457 msglog: fpath + ":\n" + (error.stack || error.message || error),
31458 });
31459 return rxjs_1.of(undefined);
31460 }));
31461 }));
31462 }, count));
31463 }));
31464 }), operators_1.filter(function (res) { return !!res; })).subscribe(function (res) {
31465 process.send({
31466 data: res,
31467 });
31468 }, function (error) {
31469 process.send({
31470 msglog: error.stack || error.message || error,
31471 });
31472 });
31473 if (queue.length) {
31474 queue.forEach(function (uri) {
31475 source$.next(uri);
31476 });
31477 queue = [];
31478 }
31479}
31480process.on("message", function (mess) {
31481 var uri = mess.uri, config = mess.config;
31482 if (uri) {
31483 if (source$) {
31484 source$.next(uri);
31485 }
31486 else {
31487 queue.push(uri);
31488 }
31489 }
31490 if (config) {
31491 if (config.gap !== undefined) {
31492 gap = config.gap;
31493 }
31494 if (config.count !== undefined) {
31495 count = config.count;
31496 }
31497 if (config.projectRootPatterns !== undefined) {
31498 customProjectRootPatterns = config.projectRootPatterns;
31499 }
31500 initSource();
31501 }
31502});
31503
31504
31505/***/ })
31506/******/ ])));
\No newline at end of file