UNPKG

1.32 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 = 370);
85/******/ })
86/************************************************************************/
87/******/ ([
88/* 0 */,
89/* 1 */,
90/* 2 */
91/***/ (function(module, exports, __webpack_require__) {
92
93"use strict";
94/* --------------------------------------------------------------------------------------------
95 * Copyright (c) Microsoft Corporation. All rights reserved.
96 * Licensed under the MIT License. See License.txt in the project root for license information.
97 * ------------------------------------------------------------------------------------------ */
98/// <reference path="../typings/thenable.d.ts" />
99
100function __export(m) {
101 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
102}
103Object.defineProperty(exports, "__esModule", { value: true });
104const vscode_languageserver_protocol_1 = __webpack_require__(3);
105exports.Event = vscode_languageserver_protocol_1.Event;
106const configuration_1 = __webpack_require__(33);
107const workspaceFolders_1 = __webpack_require__(35);
108const progress_1 = __webpack_require__(36);
109const Is = __webpack_require__(34);
110const UUID = __webpack_require__(37);
111// ------------- Reexport the API surface of the language worker API ----------------------
112__export(__webpack_require__(3));
113const fm = __webpack_require__(38);
114var Files;
115(function (Files) {
116 Files.uriToFilePath = fm.uriToFilePath;
117 Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
118 Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
119 Files.resolve = fm.resolve;
120 Files.resolveModulePath = fm.resolveModulePath;
121})(Files = exports.Files || (exports.Files = {}));
122let shutdownReceived = false;
123let exitTimer = undefined;
124function setupExitTimer() {
125 const argName = '--clientProcessId';
126 function runTimer(value) {
127 try {
128 let processId = parseInt(value);
129 if (!isNaN(processId)) {
130 exitTimer = setInterval(() => {
131 try {
132 process.kill(processId, 0);
133 }
134 catch (ex) {
135 // Parent process doesn't exist anymore. Exit the server.
136 process.exit(shutdownReceived ? 0 : 1);
137 }
138 }, 3000);
139 }
140 }
141 catch (e) {
142 // Ignore errors;
143 }
144 }
145 for (let i = 2; i < process.argv.length; i++) {
146 let arg = process.argv[i];
147 if (arg === argName && i + 1 < process.argv.length) {
148 runTimer(process.argv[i + 1]);
149 return;
150 }
151 else {
152 let args = arg.split('=');
153 if (args[0] === argName) {
154 runTimer(args[1]);
155 }
156 }
157 }
158}
159setupExitTimer();
160function null2Undefined(value) {
161 if (value === null) {
162 return void 0;
163 }
164 return value;
165}
166/**
167 * A manager for simple text documents
168 */
169class TextDocuments {
170 /**
171 * Create a new text document manager.
172 */
173 constructor(configuration) {
174 this._documents = Object.create(null);
175 this._configuration = configuration;
176 this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
177 this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
178 this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
179 this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
180 this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
181 }
182 /**
183 * An event that fires when a text document managed by this manager
184 * has been opened or the content changes.
185 */
186 get onDidChangeContent() {
187 return this._onDidChangeContent.event;
188 }
189 /**
190 * An event that fires when a text document managed by this manager
191 * has been opened.
192 */
193 get onDidOpen() {
194 return this._onDidOpen.event;
195 }
196 /**
197 * An event that fires when a text document managed by this manager
198 * will be saved.
199 */
200 get onWillSave() {
201 return this._onWillSave.event;
202 }
203 /**
204 * Sets a handler that will be called if a participant wants to provide
205 * edits during a text document save.
206 */
207 onWillSaveWaitUntil(handler) {
208 this._willSaveWaitUntil = handler;
209 }
210 /**
211 * An event that fires when a text document managed by this manager
212 * has been saved.
213 */
214 get onDidSave() {
215 return this._onDidSave.event;
216 }
217 /**
218 * An event that fires when a text document managed by this manager
219 * has been closed.
220 */
221 get onDidClose() {
222 return this._onDidClose.event;
223 }
224 /**
225 * Returns the document for the given URI. Returns undefined if
226 * the document is not mananged by this instance.
227 *
228 * @param uri The text document's URI to retrieve.
229 * @return the text document or `undefined`.
230 */
231 get(uri) {
232 return this._documents[uri];
233 }
234 /**
235 * Returns all text documents managed by this instance.
236 *
237 * @return all text documents.
238 */
239 all() {
240 return Object.keys(this._documents).map(key => this._documents[key]);
241 }
242 /**
243 * Returns the URIs of all text documents managed by this instance.
244 *
245 * @return the URI's of all text documents.
246 */
247 keys() {
248 return Object.keys(this._documents);
249 }
250 /**
251 * Listens for `low level` notification on the given connection to
252 * update the text documents managed by this instance.
253 *
254 * @param connection The connection to listen on.
255 */
256 listen(connection) {
257 connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
258 connection.onDidOpenTextDocument((event) => {
259 let td = event.textDocument;
260 let document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
261 this._documents[td.uri] = document;
262 let toFire = Object.freeze({ document });
263 this._onDidOpen.fire(toFire);
264 this._onDidChangeContent.fire(toFire);
265 });
266 connection.onDidChangeTextDocument((event) => {
267 let td = event.textDocument;
268 let changes = event.contentChanges;
269 if (changes.length === 0) {
270 return;
271 }
272 let document = this._documents[td.uri];
273 const { version } = td;
274 if (version === null || version === void 0) {
275 throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
276 }
277 document = this._configuration.update(document, changes, version);
278 this._documents[td.uri] = document;
279 this._onDidChangeContent.fire(Object.freeze({ document }));
280 });
281 connection.onDidCloseTextDocument((event) => {
282 let document = this._documents[event.textDocument.uri];
283 if (document) {
284 delete this._documents[event.textDocument.uri];
285 this._onDidClose.fire(Object.freeze({ document }));
286 }
287 });
288 connection.onWillSaveTextDocument((event) => {
289 let document = this._documents[event.textDocument.uri];
290 if (document) {
291 this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
292 }
293 });
294 connection.onWillSaveTextDocumentWaitUntil((event, token) => {
295 let document = this._documents[event.textDocument.uri];
296 if (document && this._willSaveWaitUntil) {
297 return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
298 }
299 else {
300 return [];
301 }
302 });
303 connection.onDidSaveTextDocument((event) => {
304 let document = this._documents[event.textDocument.uri];
305 if (document) {
306 this._onDidSave.fire(Object.freeze({ document }));
307 }
308 });
309 }
310}
311exports.TextDocuments = TextDocuments;
312/**
313 * Helps tracking error message. Equal occurences of the same
314 * message are only stored once. This class is for example
315 * useful if text documents are validated in a loop and equal
316 * error message should be folded into one.
317 */
318class ErrorMessageTracker {
319 constructor() {
320 this._messages = Object.create(null);
321 }
322 /**
323 * Add a message to the tracker.
324 *
325 * @param message The message to add.
326 */
327 add(message) {
328 let count = this._messages[message];
329 if (!count) {
330 count = 0;
331 }
332 count++;
333 this._messages[message] = count;
334 }
335 /**
336 * Send all tracked messages to the connection's window.
337 *
338 * @param connection The connection established between client and server.
339 */
340 sendErrors(connection) {
341 Object.keys(this._messages).forEach(message => {
342 connection.window.showErrorMessage(message);
343 });
344 }
345}
346exports.ErrorMessageTracker = ErrorMessageTracker;
347class RemoteConsoleImpl {
348 constructor() {
349 }
350 rawAttach(connection) {
351 this._rawConnection = connection;
352 }
353 attach(connection) {
354 this._connection = connection;
355 }
356 get connection() {
357 if (!this._connection) {
358 throw new Error('Remote is not attached to a connection yet.');
359 }
360 return this._connection;
361 }
362 fillServerCapabilities(_capabilities) {
363 }
364 initialize(_capabilities) {
365 }
366 error(message) {
367 this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
368 }
369 warn(message) {
370 this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
371 }
372 info(message) {
373 this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
374 }
375 log(message) {
376 this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
377 }
378 send(type, message) {
379 if (this._rawConnection) {
380 this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
381 }
382 }
383}
384class _RemoteWindowImpl {
385 constructor() {
386 }
387 attach(connection) {
388 this._connection = connection;
389 }
390 get connection() {
391 if (!this._connection) {
392 throw new Error('Remote is not attached to a connection yet.');
393 }
394 return this._connection;
395 }
396 initialize(_capabilities) {
397 }
398 fillServerCapabilities(_capabilities) {
399 }
400 showErrorMessage(message, ...actions) {
401 let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
402 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
403 }
404 showWarningMessage(message, ...actions) {
405 let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
406 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
407 }
408 showInformationMessage(message, ...actions) {
409 let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
410 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
411 }
412}
413const RemoteWindowImpl = progress_1.ProgressFeature(_RemoteWindowImpl);
414var BulkRegistration;
415(function (BulkRegistration) {
416 /**
417 * Creates a new bulk registration.
418 * @return an empty bulk registration.
419 */
420 function create() {
421 return new BulkRegistrationImpl();
422 }
423 BulkRegistration.create = create;
424})(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
425class BulkRegistrationImpl {
426 constructor() {
427 this._registrations = [];
428 this._registered = new Set();
429 }
430 add(type, registerOptions) {
431 const method = Is.string(type) ? type : type.method;
432 if (this._registered.has(method)) {
433 throw new Error(`${method} is already added to this registration`);
434 }
435 const id = UUID.generateUuid();
436 this._registrations.push({
437 id: id,
438 method: method,
439 registerOptions: registerOptions || {}
440 });
441 this._registered.add(method);
442 }
443 asRegistrationParams() {
444 return {
445 registrations: this._registrations
446 };
447 }
448}
449var BulkUnregistration;
450(function (BulkUnregistration) {
451 function create() {
452 return new BulkUnregistrationImpl(undefined, []);
453 }
454 BulkUnregistration.create = create;
455})(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
456class BulkUnregistrationImpl {
457 constructor(_connection, unregistrations) {
458 this._connection = _connection;
459 this._unregistrations = new Map();
460 unregistrations.forEach(unregistration => {
461 this._unregistrations.set(unregistration.method, unregistration);
462 });
463 }
464 get isAttached() {
465 return !!this._connection;
466 }
467 attach(connection) {
468 this._connection = connection;
469 }
470 add(unregistration) {
471 this._unregistrations.set(unregistration.method, unregistration);
472 }
473 dispose() {
474 let unregistrations = [];
475 for (let unregistration of this._unregistrations.values()) {
476 unregistrations.push(unregistration);
477 }
478 let params = {
479 unregisterations: unregistrations
480 };
481 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
482 this._connection.console.info(`Bulk unregistration failed.`);
483 });
484 }
485 disposeSingle(arg) {
486 const method = Is.string(arg) ? arg : arg.method;
487 const unregistration = this._unregistrations.get(method);
488 if (!unregistration) {
489 return false;
490 }
491 let params = {
492 unregisterations: [unregistration]
493 };
494 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
495 this._unregistrations.delete(method);
496 }, (_error) => {
497 this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);
498 });
499 return true;
500 }
501}
502class RemoteClientImpl {
503 attach(connection) {
504 this._connection = connection;
505 }
506 get connection() {
507 if (!this._connection) {
508 throw new Error('Remote is not attached to a connection yet.');
509 }
510 return this._connection;
511 }
512 initialize(_capabilities) {
513 }
514 fillServerCapabilities(_capabilities) {
515 }
516 register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
517 if (typeOrRegistrations instanceof BulkRegistrationImpl) {
518 return this.registerMany(typeOrRegistrations);
519 }
520 else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
521 return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
522 }
523 else {
524 return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
525 }
526 }
527 registerSingle1(unregistration, type, registerOptions) {
528 const method = Is.string(type) ? type : type.method;
529 const id = UUID.generateUuid();
530 let params = {
531 registrations: [{ id, method, registerOptions: registerOptions || {} }]
532 };
533 if (!unregistration.isAttached) {
534 unregistration.attach(this._connection);
535 }
536 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
537 unregistration.add({ id: id, method: method });
538 return unregistration;
539 }, (_error) => {
540 this.connection.console.info(`Registering request handler for ${method} failed.`);
541 return Promise.reject(_error);
542 });
543 }
544 registerSingle2(type, registerOptions) {
545 const method = Is.string(type) ? type : type.method;
546 const id = UUID.generateUuid();
547 let params = {
548 registrations: [{ id, method, registerOptions: registerOptions || {} }]
549 };
550 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
551 return vscode_languageserver_protocol_1.Disposable.create(() => {
552 this.unregisterSingle(id, method);
553 });
554 }, (_error) => {
555 this.connection.console.info(`Registering request handler for ${method} failed.`);
556 return Promise.reject(_error);
557 });
558 }
559 unregisterSingle(id, method) {
560 let params = {
561 unregisterations: [{ id, method }]
562 };
563 return this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
564 this.connection.console.info(`Unregistering request handler for ${id} failed.`);
565 });
566 }
567 registerMany(registrations) {
568 let params = registrations.asRegistrationParams();
569 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
570 return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
571 }, (_error) => {
572 this.connection.console.info(`Bulk registration failed.`);
573 return Promise.reject(_error);
574 });
575 }
576}
577class _RemoteWorkspaceImpl {
578 constructor() {
579 }
580 attach(connection) {
581 this._connection = connection;
582 }
583 get connection() {
584 if (!this._connection) {
585 throw new Error('Remote is not attached to a connection yet.');
586 }
587 return this._connection;
588 }
589 initialize(_capabilities) {
590 }
591 fillServerCapabilities(_capabilities) {
592 }
593 applyEdit(paramOrEdit) {
594 function isApplyWorkspaceEditParams(value) {
595 return value && !!value.edit;
596 }
597 let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
598 return this._connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
599 }
600}
601const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));
602class TelemetryImpl {
603 constructor() {
604 }
605 attach(connection) {
606 this._connection = connection;
607 }
608 get connection() {
609 if (!this._connection) {
610 throw new Error('Remote is not attached to a connection yet.');
611 }
612 return this._connection;
613 }
614 initialize(_capabilities) {
615 }
616 fillServerCapabilities(_capabilities) {
617 }
618 logEvent(data) {
619 this._connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
620 }
621}
622class TracerImpl {
623 constructor() {
624 this._trace = vscode_languageserver_protocol_1.Trace.Off;
625 }
626 attach(connection) {
627 this._connection = connection;
628 }
629 get connection() {
630 if (!this._connection) {
631 throw new Error('Remote is not attached to a connection yet.');
632 }
633 return this._connection;
634 }
635 initialize(_capabilities) {
636 }
637 fillServerCapabilities(_capabilities) {
638 }
639 set trace(value) {
640 this._trace = value;
641 }
642 log(message, verbose) {
643 if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
644 return;
645 }
646 this._connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
647 message: message,
648 verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
649 });
650 }
651}
652class LanguagesImpl {
653 constructor() {
654 }
655 attach(connection) {
656 this._connection = connection;
657 }
658 get connection() {
659 if (!this._connection) {
660 throw new Error('Remote is not attached to a connection yet.');
661 }
662 return this._connection;
663 }
664 initialize(_capabilities) {
665 }
666 fillServerCapabilities(_capabilities) {
667 }
668 attachWorkDoneProgress(params) {
669 return progress_1.attachWorkDone(this.connection, params);
670 }
671 attachPartialResultProgress(_type, params) {
672 return progress_1.attachPartialResult(this.connection, params);
673 }
674}
675exports.LanguagesImpl = LanguagesImpl;
676function combineConsoleFeatures(one, two) {
677 return function (Base) {
678 return two(one(Base));
679 };
680}
681exports.combineConsoleFeatures = combineConsoleFeatures;
682function combineTelemetryFeatures(one, two) {
683 return function (Base) {
684 return two(one(Base));
685 };
686}
687exports.combineTelemetryFeatures = combineTelemetryFeatures;
688function combineTracerFeatures(one, two) {
689 return function (Base) {
690 return two(one(Base));
691 };
692}
693exports.combineTracerFeatures = combineTracerFeatures;
694function combineClientFeatures(one, two) {
695 return function (Base) {
696 return two(one(Base));
697 };
698}
699exports.combineClientFeatures = combineClientFeatures;
700function combineWindowFeatures(one, two) {
701 return function (Base) {
702 return two(one(Base));
703 };
704}
705exports.combineWindowFeatures = combineWindowFeatures;
706function combineWorkspaceFeatures(one, two) {
707 return function (Base) {
708 return two(one(Base));
709 };
710}
711exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
712function combineLanguagesFeatures(one, two) {
713 return function (Base) {
714 return two(one(Base));
715 };
716}
717exports.combineLanguagesFeatures = combineLanguagesFeatures;
718function combineFeatures(one, two) {
719 function combine(one, two, func) {
720 if (one && two) {
721 return func(one, two);
722 }
723 else if (one) {
724 return one;
725 }
726 else {
727 return two;
728 }
729 }
730 let result = {
731 __brand: 'features',
732 console: combine(one.console, two.console, combineConsoleFeatures),
733 tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
734 telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
735 client: combine(one.client, two.client, combineClientFeatures),
736 window: combine(one.window, two.window, combineWindowFeatures),
737 workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
738 };
739 return result;
740}
741exports.combineFeatures = combineFeatures;
742function createConnection(arg1, arg2, arg3, arg4) {
743 let factories;
744 let input;
745 let output;
746 let strategy;
747 if (arg1 !== void 0 && arg1.__brand === 'features') {
748 factories = arg1;
749 arg1 = arg2;
750 arg2 = arg3;
751 arg3 = arg4;
752 }
753 if (vscode_languageserver_protocol_1.ConnectionStrategy.is(arg1)) {
754 strategy = arg1;
755 }
756 else {
757 input = arg1;
758 output = arg2;
759 strategy = arg3;
760 }
761 return _createConnection(input, output, strategy, factories);
762}
763exports.createConnection = createConnection;
764function _createConnection(input, output, strategy, factories) {
765 if (!input && !output && process.argv.length > 2) {
766 let port = void 0;
767 let pipeName = void 0;
768 let argv = process.argv.slice(2);
769 for (let i = 0; i < argv.length; i++) {
770 let arg = argv[i];
771 if (arg === '--node-ipc') {
772 input = new vscode_languageserver_protocol_1.IPCMessageReader(process);
773 output = new vscode_languageserver_protocol_1.IPCMessageWriter(process);
774 break;
775 }
776 else if (arg === '--stdio') {
777 input = process.stdin;
778 output = process.stdout;
779 break;
780 }
781 else if (arg === '--socket') {
782 port = parseInt(argv[i + 1]);
783 break;
784 }
785 else if (arg === '--pipe') {
786 pipeName = argv[i + 1];
787 break;
788 }
789 else {
790 var args = arg.split('=');
791 if (args[0] === '--socket') {
792 port = parseInt(args[1]);
793 break;
794 }
795 else if (args[0] === '--pipe') {
796 pipeName = args[1];
797 break;
798 }
799 }
800 }
801 if (port) {
802 let transport = vscode_languageserver_protocol_1.createServerSocketTransport(port);
803 input = transport[0];
804 output = transport[1];
805 }
806 else if (pipeName) {
807 let transport = vscode_languageserver_protocol_1.createServerPipeTransport(pipeName);
808 input = transport[0];
809 output = transport[1];
810 }
811 }
812 var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\'';
813 if (!input) {
814 throw new Error('Connection input stream is not set. ' + commandLineMessage);
815 }
816 if (!output) {
817 throw new Error('Connection output stream is not set. ' + commandLineMessage);
818 }
819 // Backwards compatibility
820 if (Is.func(input.read) && Is.func(input.on)) {
821 let inputStream = input;
822 inputStream.on('end', () => {
823 process.exit(shutdownReceived ? 0 : 1);
824 });
825 inputStream.on('close', () => {
826 process.exit(shutdownReceived ? 0 : 1);
827 });
828 }
829 const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());
830 const connection = vscode_languageserver_protocol_1.createProtocolConnection(input, output, logger, strategy);
831 logger.rawAttach(connection);
832 const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
833 const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
834 const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
835 const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
836 const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
837 const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());
838 const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages];
839 function asPromise(value) {
840 if (value instanceof Promise) {
841 return value;
842 }
843 else if (Is.thenable(value)) {
844 return new Promise((resolve, reject) => {
845 value.then((resolved) => resolve(resolved), (error) => reject(error));
846 });
847 }
848 else {
849 return Promise.resolve(value);
850 }
851 }
852 let shutdownHandler = undefined;
853 let initializeHandler = undefined;
854 let exitHandler = undefined;
855 let protocolConnection = {
856 listen: () => connection.listen(),
857 sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
858 onRequest: (type, handler) => connection.onRequest(type, handler),
859 sendNotification: (type, param) => {
860 const method = Is.string(type) ? type : type.method;
861 if (arguments.length === 1) {
862 connection.sendNotification(method);
863 }
864 else {
865 connection.sendNotification(method, param);
866 }
867 },
868 onNotification: (type, handler) => connection.onNotification(type, handler),
869 onProgress: connection.onProgress,
870 sendProgress: connection.sendProgress,
871 onInitialize: (handler) => initializeHandler = handler,
872 onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
873 onShutdown: (handler) => shutdownHandler = handler,
874 onExit: (handler) => exitHandler = handler,
875 get console() { return logger; },
876 get telemetry() { return telemetry; },
877 get tracer() { return tracer; },
878 get client() { return client; },
879 get window() { return remoteWindow; },
880 get workspace() { return workspace; },
881 get languages() { return languages; },
882 onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
883 onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
884 __textDocumentSync: undefined,
885 onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
886 onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
887 onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
888 onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
889 onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
890 onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
891 sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
892 onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {
893 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
894 }),
895 onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {
896 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
897 }),
898 onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
899 onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {
900 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
901 }),
902 onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {
903 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
904 }),
905 onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {
906 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
907 }),
908 onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {
909 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
910 }),
911 onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {
912 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
913 }),
914 onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {
915 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
916 }),
917 onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {
918 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
919 }),
920 onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {
921 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
922 }),
923 onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {
924 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
925 }),
926 onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {
927 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
928 }),
929 onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {
930 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
931 }),
932 onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {
933 return handler(params, cancel);
934 }),
935 onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {
936 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
937 }),
938 onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {
939 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
940 }),
941 onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
942 return handler(params, cancel);
943 }),
944 onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {
945 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
946 }),
947 onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {
948 return handler(params, cancel);
949 }),
950 onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {
951 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
952 }),
953 onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {
954 return handler(params, cancel);
955 }),
956 onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {
957 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
958 }),
959 onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {
960 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
961 }),
962 onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {
963 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
964 }),
965 onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {
966 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
967 }),
968 onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {
969 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
970 }),
971 dispose: () => connection.dispose()
972 };
973 for (let remote of allRemotes) {
974 remote.attach(protocolConnection);
975 }
976 connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
977 const processId = params.processId;
978 if (Is.number(processId) && exitTimer === void 0) {
979 // We received a parent process id. Set up a timer to periodically check
980 // if the parent is still alive.
981 setInterval(() => {
982 try {
983 process.kill(processId, 0);
984 }
985 catch (ex) {
986 // Parent process doesn't exist anymore. Exit the server.
987 process.exit(shutdownReceived ? 0 : 1);
988 }
989 }, 3000);
990 }
991 if (Is.string(params.trace)) {
992 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
993 }
994 for (let remote of allRemotes) {
995 remote.initialize(params.capabilities);
996 }
997 if (initializeHandler) {
998 let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, progress_1.attachWorkDone(connection, params), undefined);
999 return asPromise(result).then((value) => {
1000 if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
1001 return value;
1002 }
1003 let result = value;
1004 if (!result) {
1005 result = { capabilities: {} };
1006 }
1007 let capabilities = result.capabilities;
1008 if (!capabilities) {
1009 capabilities = {};
1010 result.capabilities = capabilities;
1011 }
1012 if (capabilities.textDocumentSync === void 0 || capabilities.textDocumentSync === null) {
1013 capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
1014 }
1015 else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
1016 capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
1017 }
1018 for (let remote of allRemotes) {
1019 remote.fillServerCapabilities(capabilities);
1020 }
1021 return result;
1022 });
1023 }
1024 else {
1025 let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
1026 for (let remote of allRemotes) {
1027 remote.fillServerCapabilities(result.capabilities);
1028 }
1029 return result;
1030 }
1031 });
1032 connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
1033 shutdownReceived = true;
1034 if (shutdownHandler) {
1035 return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
1036 }
1037 else {
1038 return undefined;
1039 }
1040 });
1041 connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
1042 try {
1043 if (exitHandler) {
1044 exitHandler();
1045 }
1046 }
1047 finally {
1048 if (shutdownReceived) {
1049 process.exit(0);
1050 }
1051 else {
1052 process.exit(1);
1053 }
1054 }
1055 });
1056 connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
1057 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
1058 });
1059 return protocolConnection;
1060}
1061// Export the protocol currently in proposed state.
1062const callHierarchy_proposed_1 = __webpack_require__(42);
1063const st = __webpack_require__(43);
1064var ProposedFeatures;
1065(function (ProposedFeatures) {
1066 ProposedFeatures.all = {
1067 __brand: 'features',
1068 languages: combineLanguagesFeatures(callHierarchy_proposed_1.CallHierarchyFeature, st.SemanticTokensFeature)
1069 };
1070 ProposedFeatures.SemanticTokensBuilder = st.SemanticTokensBuilder;
1071})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
1072//# sourceMappingURL=main.js.map
1073
1074/***/ }),
1075/* 3 */
1076/***/ (function(module, exports, __webpack_require__) {
1077
1078"use strict";
1079/* --------------------------------------------------------------------------------------------
1080 * Copyright (c) Microsoft Corporation. All rights reserved.
1081 * Licensed under the MIT License. See License.txt in the project root for license information.
1082 * ------------------------------------------------------------------------------------------ */
1083
1084function __export(m) {
1085 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1086}
1087Object.defineProperty(exports, "__esModule", { value: true });
1088const vscode_jsonrpc_1 = __webpack_require__(4);
1089exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
1090exports.ResponseError = vscode_jsonrpc_1.ResponseError;
1091exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
1092exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
1093exports.Disposable = vscode_jsonrpc_1.Disposable;
1094exports.Event = vscode_jsonrpc_1.Event;
1095exports.Emitter = vscode_jsonrpc_1.Emitter;
1096exports.Trace = vscode_jsonrpc_1.Trace;
1097exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
1098exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
1099exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
1100exports.RequestType = vscode_jsonrpc_1.RequestType;
1101exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
1102exports.NotificationType = vscode_jsonrpc_1.NotificationType;
1103exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
1104exports.MessageReader = vscode_jsonrpc_1.MessageReader;
1105exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
1106exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
1107exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
1108exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
1109exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
1110exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
1111exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
1112exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
1113exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
1114exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
1115exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
1116exports.ProgressType = vscode_jsonrpc_1.ProgressType;
1117__export(__webpack_require__(18));
1118__export(__webpack_require__(19));
1119const callHierarchy = __webpack_require__(31);
1120const st = __webpack_require__(32);
1121var Proposed;
1122(function (Proposed) {
1123 let CallHierarchyPrepareRequest;
1124 (function (CallHierarchyPrepareRequest) {
1125 CallHierarchyPrepareRequest.method = callHierarchy.CallHierarchyPrepareRequest.method;
1126 CallHierarchyPrepareRequest.type = callHierarchy.CallHierarchyPrepareRequest.type;
1127 })(CallHierarchyPrepareRequest = Proposed.CallHierarchyPrepareRequest || (Proposed.CallHierarchyPrepareRequest = {}));
1128 let CallHierarchyIncomingCallsRequest;
1129 (function (CallHierarchyIncomingCallsRequest) {
1130 CallHierarchyIncomingCallsRequest.method = callHierarchy.CallHierarchyIncomingCallsRequest.method;
1131 CallHierarchyIncomingCallsRequest.type = callHierarchy.CallHierarchyIncomingCallsRequest.type;
1132 })(CallHierarchyIncomingCallsRequest = Proposed.CallHierarchyIncomingCallsRequest || (Proposed.CallHierarchyIncomingCallsRequest = {}));
1133 let CallHierarchyOutgoingCallsRequest;
1134 (function (CallHierarchyOutgoingCallsRequest) {
1135 CallHierarchyOutgoingCallsRequest.method = callHierarchy.CallHierarchyOutgoingCallsRequest.method;
1136 CallHierarchyOutgoingCallsRequest.type = callHierarchy.CallHierarchyOutgoingCallsRequest.type;
1137 })(CallHierarchyOutgoingCallsRequest = Proposed.CallHierarchyOutgoingCallsRequest || (Proposed.CallHierarchyOutgoingCallsRequest = {}));
1138 Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
1139 Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
1140 Proposed.SemanticTokens = st.SemanticTokens;
1141 let SemanticTokensRequest;
1142 (function (SemanticTokensRequest) {
1143 SemanticTokensRequest.method = st.SemanticTokensRequest.method;
1144 SemanticTokensRequest.type = st.SemanticTokensRequest.type;
1145 })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
1146 let SemanticTokensEditsRequest;
1147 (function (SemanticTokensEditsRequest) {
1148 SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
1149 SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
1150 })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
1151 let SemanticTokensRangeRequest;
1152 (function (SemanticTokensRangeRequest) {
1153 SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
1154 SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
1155 })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
1156})(Proposed = exports.Proposed || (exports.Proposed = {}));
1157function createProtocolConnection(reader, writer, logger, strategy) {
1158 return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
1159}
1160exports.createProtocolConnection = createProtocolConnection;
1161
1162
1163/***/ }),
1164/* 4 */
1165/***/ (function(module, exports, __webpack_require__) {
1166
1167"use strict";
1168/* --------------------------------------------------------------------------------------------
1169 * Copyright (c) Microsoft Corporation. All rights reserved.
1170 * Licensed under the MIT License. See License.txt in the project root for license information.
1171 * ------------------------------------------------------------------------------------------ */
1172/// <reference path="../typings/thenable.d.ts" />
1173
1174function __export(m) {
1175 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1176}
1177Object.defineProperty(exports, "__esModule", { value: true });
1178const Is = __webpack_require__(5);
1179const messages_1 = __webpack_require__(6);
1180exports.RequestType = messages_1.RequestType;
1181exports.RequestType0 = messages_1.RequestType0;
1182exports.RequestType1 = messages_1.RequestType1;
1183exports.RequestType2 = messages_1.RequestType2;
1184exports.RequestType3 = messages_1.RequestType3;
1185exports.RequestType4 = messages_1.RequestType4;
1186exports.RequestType5 = messages_1.RequestType5;
1187exports.RequestType6 = messages_1.RequestType6;
1188exports.RequestType7 = messages_1.RequestType7;
1189exports.RequestType8 = messages_1.RequestType8;
1190exports.RequestType9 = messages_1.RequestType9;
1191exports.ResponseError = messages_1.ResponseError;
1192exports.ErrorCodes = messages_1.ErrorCodes;
1193exports.NotificationType = messages_1.NotificationType;
1194exports.NotificationType0 = messages_1.NotificationType0;
1195exports.NotificationType1 = messages_1.NotificationType1;
1196exports.NotificationType2 = messages_1.NotificationType2;
1197exports.NotificationType3 = messages_1.NotificationType3;
1198exports.NotificationType4 = messages_1.NotificationType4;
1199exports.NotificationType5 = messages_1.NotificationType5;
1200exports.NotificationType6 = messages_1.NotificationType6;
1201exports.NotificationType7 = messages_1.NotificationType7;
1202exports.NotificationType8 = messages_1.NotificationType8;
1203exports.NotificationType9 = messages_1.NotificationType9;
1204const messageReader_1 = __webpack_require__(7);
1205exports.MessageReader = messageReader_1.MessageReader;
1206exports.StreamMessageReader = messageReader_1.StreamMessageReader;
1207exports.IPCMessageReader = messageReader_1.IPCMessageReader;
1208exports.SocketMessageReader = messageReader_1.SocketMessageReader;
1209const messageWriter_1 = __webpack_require__(9);
1210exports.MessageWriter = messageWriter_1.MessageWriter;
1211exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;
1212exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;
1213exports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;
1214const events_1 = __webpack_require__(8);
1215exports.Disposable = events_1.Disposable;
1216exports.Event = events_1.Event;
1217exports.Emitter = events_1.Emitter;
1218const cancellation_1 = __webpack_require__(10);
1219exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
1220exports.CancellationToken = cancellation_1.CancellationToken;
1221const linkedMap_1 = __webpack_require__(11);
1222__export(__webpack_require__(12));
1223__export(__webpack_require__(17));
1224var CancelNotification;
1225(function (CancelNotification) {
1226 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
1227})(CancelNotification || (CancelNotification = {}));
1228var ProgressNotification;
1229(function (ProgressNotification) {
1230 ProgressNotification.type = new messages_1.NotificationType('$/progress');
1231})(ProgressNotification || (ProgressNotification = {}));
1232class ProgressType {
1233 constructor() {
1234 }
1235}
1236exports.ProgressType = ProgressType;
1237exports.NullLogger = Object.freeze({
1238 error: () => { },
1239 warn: () => { },
1240 info: () => { },
1241 log: () => { }
1242});
1243var Trace;
1244(function (Trace) {
1245 Trace[Trace["Off"] = 0] = "Off";
1246 Trace[Trace["Messages"] = 1] = "Messages";
1247 Trace[Trace["Verbose"] = 2] = "Verbose";
1248})(Trace = exports.Trace || (exports.Trace = {}));
1249(function (Trace) {
1250 function fromString(value) {
1251 if (!Is.string(value)) {
1252 return Trace.Off;
1253 }
1254 value = value.toLowerCase();
1255 switch (value) {
1256 case 'off':
1257 return Trace.Off;
1258 case 'messages':
1259 return Trace.Messages;
1260 case 'verbose':
1261 return Trace.Verbose;
1262 default:
1263 return Trace.Off;
1264 }
1265 }
1266 Trace.fromString = fromString;
1267 function toString(value) {
1268 switch (value) {
1269 case Trace.Off:
1270 return 'off';
1271 case Trace.Messages:
1272 return 'messages';
1273 case Trace.Verbose:
1274 return 'verbose';
1275 default:
1276 return 'off';
1277 }
1278 }
1279 Trace.toString = toString;
1280})(Trace = exports.Trace || (exports.Trace = {}));
1281var TraceFormat;
1282(function (TraceFormat) {
1283 TraceFormat["Text"] = "text";
1284 TraceFormat["JSON"] = "json";
1285})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1286(function (TraceFormat) {
1287 function fromString(value) {
1288 value = value.toLowerCase();
1289 if (value === 'json') {
1290 return TraceFormat.JSON;
1291 }
1292 else {
1293 return TraceFormat.Text;
1294 }
1295 }
1296 TraceFormat.fromString = fromString;
1297})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1298var SetTraceNotification;
1299(function (SetTraceNotification) {
1300 SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
1301})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
1302var LogTraceNotification;
1303(function (LogTraceNotification) {
1304 LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
1305})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
1306var ConnectionErrors;
1307(function (ConnectionErrors) {
1308 /**
1309 * The connection is closed.
1310 */
1311 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
1312 /**
1313 * The connection got disposed.
1314 */
1315 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
1316 /**
1317 * The connection is already in listening mode.
1318 */
1319 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
1320})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
1321class ConnectionError extends Error {
1322 constructor(code, message) {
1323 super(message);
1324 this.code = code;
1325 Object.setPrototypeOf(this, ConnectionError.prototype);
1326 }
1327}
1328exports.ConnectionError = ConnectionError;
1329var ConnectionStrategy;
1330(function (ConnectionStrategy) {
1331 function is(value) {
1332 let candidate = value;
1333 return candidate && Is.func(candidate.cancelUndispatched);
1334 }
1335 ConnectionStrategy.is = is;
1336})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
1337var ConnectionState;
1338(function (ConnectionState) {
1339 ConnectionState[ConnectionState["New"] = 1] = "New";
1340 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
1341 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
1342 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
1343})(ConnectionState || (ConnectionState = {}));
1344function _createMessageConnection(messageReader, messageWriter, logger, strategy) {
1345 let sequenceNumber = 0;
1346 let notificationSquenceNumber = 0;
1347 let unknownResponseSquenceNumber = 0;
1348 const version = '2.0';
1349 let starRequestHandler = undefined;
1350 let requestHandlers = Object.create(null);
1351 let starNotificationHandler = undefined;
1352 let notificationHandlers = Object.create(null);
1353 let progressHandlers = new Map();
1354 let timer;
1355 let messageQueue = new linkedMap_1.LinkedMap();
1356 let responsePromises = Object.create(null);
1357 let requestTokens = Object.create(null);
1358 let trace = Trace.Off;
1359 let traceFormat = TraceFormat.Text;
1360 let tracer;
1361 let state = ConnectionState.New;
1362 let errorEmitter = new events_1.Emitter();
1363 let closeEmitter = new events_1.Emitter();
1364 let unhandledNotificationEmitter = new events_1.Emitter();
1365 let unhandledProgressEmitter = new events_1.Emitter();
1366 let disposeEmitter = new events_1.Emitter();
1367 function createRequestQueueKey(id) {
1368 return 'req-' + id.toString();
1369 }
1370 function createResponseQueueKey(id) {
1371 if (id === null) {
1372 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
1373 }
1374 else {
1375 return 'res-' + id.toString();
1376 }
1377 }
1378 function createNotificationQueueKey() {
1379 return 'not-' + (++notificationSquenceNumber).toString();
1380 }
1381 function addMessageToQueue(queue, message) {
1382 if (messages_1.isRequestMessage(message)) {
1383 queue.set(createRequestQueueKey(message.id), message);
1384 }
1385 else if (messages_1.isResponseMessage(message)) {
1386 queue.set(createResponseQueueKey(message.id), message);
1387 }
1388 else {
1389 queue.set(createNotificationQueueKey(), message);
1390 }
1391 }
1392 function cancelUndispatched(_message) {
1393 return undefined;
1394 }
1395 function isListening() {
1396 return state === ConnectionState.Listening;
1397 }
1398 function isClosed() {
1399 return state === ConnectionState.Closed;
1400 }
1401 function isDisposed() {
1402 return state === ConnectionState.Disposed;
1403 }
1404 function closeHandler() {
1405 if (state === ConnectionState.New || state === ConnectionState.Listening) {
1406 state = ConnectionState.Closed;
1407 closeEmitter.fire(undefined);
1408 }
1409 // If the connection is disposed don't sent close events.
1410 }
1411 function readErrorHandler(error) {
1412 errorEmitter.fire([error, undefined, undefined]);
1413 }
1414 function writeErrorHandler(data) {
1415 errorEmitter.fire(data);
1416 }
1417 messageReader.onClose(closeHandler);
1418 messageReader.onError(readErrorHandler);
1419 messageWriter.onClose(closeHandler);
1420 messageWriter.onError(writeErrorHandler);
1421 function triggerMessageQueue() {
1422 if (timer || messageQueue.size === 0) {
1423 return;
1424 }
1425 timer = setImmediate(() => {
1426 timer = undefined;
1427 processMessageQueue();
1428 });
1429 }
1430 function processMessageQueue() {
1431 if (messageQueue.size === 0) {
1432 return;
1433 }
1434 let message = messageQueue.shift();
1435 try {
1436 if (messages_1.isRequestMessage(message)) {
1437 handleRequest(message);
1438 }
1439 else if (messages_1.isNotificationMessage(message)) {
1440 handleNotification(message);
1441 }
1442 else if (messages_1.isResponseMessage(message)) {
1443 handleResponse(message);
1444 }
1445 else {
1446 handleInvalidMessage(message);
1447 }
1448 }
1449 finally {
1450 triggerMessageQueue();
1451 }
1452 }
1453 let callback = (message) => {
1454 try {
1455 // We have received a cancellation message. Check if the message is still in the queue
1456 // and cancel it if allowed to do so.
1457 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
1458 let key = createRequestQueueKey(message.params.id);
1459 let toCancel = messageQueue.get(key);
1460 if (messages_1.isRequestMessage(toCancel)) {
1461 let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
1462 if (response && (response.error !== void 0 || response.result !== void 0)) {
1463 messageQueue.delete(key);
1464 response.id = toCancel.id;
1465 traceSendingResponse(response, message.method, Date.now());
1466 messageWriter.write(response);
1467 return;
1468 }
1469 }
1470 }
1471 addMessageToQueue(messageQueue, message);
1472 }
1473 finally {
1474 triggerMessageQueue();
1475 }
1476 };
1477 function handleRequest(requestMessage) {
1478 if (isDisposed()) {
1479 // we return here silently since we fired an event when the
1480 // connection got disposed.
1481 return;
1482 }
1483 function reply(resultOrError, method, startTime) {
1484 let message = {
1485 jsonrpc: version,
1486 id: requestMessage.id
1487 };
1488 if (resultOrError instanceof messages_1.ResponseError) {
1489 message.error = resultOrError.toJson();
1490 }
1491 else {
1492 message.result = resultOrError === void 0 ? null : resultOrError;
1493 }
1494 traceSendingResponse(message, method, startTime);
1495 messageWriter.write(message);
1496 }
1497 function replyError(error, method, startTime) {
1498 let message = {
1499 jsonrpc: version,
1500 id: requestMessage.id,
1501 error: error.toJson()
1502 };
1503 traceSendingResponse(message, method, startTime);
1504 messageWriter.write(message);
1505 }
1506 function replySuccess(result, method, startTime) {
1507 // The JSON RPC defines that a response must either have a result or an error
1508 // So we can't treat undefined as a valid response result.
1509 if (result === void 0) {
1510 result = null;
1511 }
1512 let message = {
1513 jsonrpc: version,
1514 id: requestMessage.id,
1515 result: result
1516 };
1517 traceSendingResponse(message, method, startTime);
1518 messageWriter.write(message);
1519 }
1520 traceReceivedRequest(requestMessage);
1521 let element = requestHandlers[requestMessage.method];
1522 let type;
1523 let requestHandler;
1524 if (element) {
1525 type = element.type;
1526 requestHandler = element.handler;
1527 }
1528 let startTime = Date.now();
1529 if (requestHandler || starRequestHandler) {
1530 let cancellationSource = new cancellation_1.CancellationTokenSource();
1531 let tokenKey = String(requestMessage.id);
1532 requestTokens[tokenKey] = cancellationSource;
1533 try {
1534 let handlerResult;
1535 if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1536 handlerResult = requestHandler
1537 ? requestHandler(cancellationSource.token)
1538 : starRequestHandler(requestMessage.method, cancellationSource.token);
1539 }
1540 else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {
1541 handlerResult = requestHandler
1542 ? requestHandler(...requestMessage.params, cancellationSource.token)
1543 : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
1544 }
1545 else {
1546 handlerResult = requestHandler
1547 ? requestHandler(requestMessage.params, cancellationSource.token)
1548 : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
1549 }
1550 let promise = handlerResult;
1551 if (!handlerResult) {
1552 delete requestTokens[tokenKey];
1553 replySuccess(handlerResult, requestMessage.method, startTime);
1554 }
1555 else if (promise.then) {
1556 promise.then((resultOrError) => {
1557 delete requestTokens[tokenKey];
1558 reply(resultOrError, requestMessage.method, startTime);
1559 }, error => {
1560 delete requestTokens[tokenKey];
1561 if (error instanceof messages_1.ResponseError) {
1562 replyError(error, requestMessage.method, startTime);
1563 }
1564 else if (error && Is.string(error.message)) {
1565 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1566 }
1567 else {
1568 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1569 }
1570 });
1571 }
1572 else {
1573 delete requestTokens[tokenKey];
1574 reply(handlerResult, requestMessage.method, startTime);
1575 }
1576 }
1577 catch (error) {
1578 delete requestTokens[tokenKey];
1579 if (error instanceof messages_1.ResponseError) {
1580 reply(error, requestMessage.method, startTime);
1581 }
1582 else if (error && Is.string(error.message)) {
1583 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1584 }
1585 else {
1586 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1587 }
1588 }
1589 }
1590 else {
1591 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
1592 }
1593 }
1594 function handleResponse(responseMessage) {
1595 if (isDisposed()) {
1596 // See handle request.
1597 return;
1598 }
1599 if (responseMessage.id === null) {
1600 if (responseMessage.error) {
1601 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
1602 }
1603 else {
1604 logger.error(`Received response message without id. No further error information provided.`);
1605 }
1606 }
1607 else {
1608 let key = String(responseMessage.id);
1609 let responsePromise = responsePromises[key];
1610 traceReceivedResponse(responseMessage, responsePromise);
1611 if (responsePromise) {
1612 delete responsePromises[key];
1613 try {
1614 if (responseMessage.error) {
1615 let error = responseMessage.error;
1616 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
1617 }
1618 else if (responseMessage.result !== void 0) {
1619 responsePromise.resolve(responseMessage.result);
1620 }
1621 else {
1622 throw new Error('Should never happen.');
1623 }
1624 }
1625 catch (error) {
1626 if (error.message) {
1627 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
1628 }
1629 else {
1630 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
1631 }
1632 }
1633 }
1634 }
1635 }
1636 function handleNotification(message) {
1637 if (isDisposed()) {
1638 // See handle request.
1639 return;
1640 }
1641 let type = undefined;
1642 let notificationHandler;
1643 if (message.method === CancelNotification.type.method) {
1644 notificationHandler = (params) => {
1645 let id = params.id;
1646 let source = requestTokens[String(id)];
1647 if (source) {
1648 source.cancel();
1649 }
1650 };
1651 }
1652 else {
1653 let element = notificationHandlers[message.method];
1654 if (element) {
1655 notificationHandler = element.handler;
1656 type = element.type;
1657 }
1658 }
1659 if (notificationHandler || starNotificationHandler) {
1660 try {
1661 traceReceivedNotification(message);
1662 if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1663 notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
1664 }
1665 else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {
1666 notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
1667 }
1668 else {
1669 notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
1670 }
1671 }
1672 catch (error) {
1673 if (error.message) {
1674 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
1675 }
1676 else {
1677 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
1678 }
1679 }
1680 }
1681 else {
1682 unhandledNotificationEmitter.fire(message);
1683 }
1684 }
1685 function handleInvalidMessage(message) {
1686 if (!message) {
1687 logger.error('Received empty message.');
1688 return;
1689 }
1690 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
1691 // Test whether we find an id to reject the promise
1692 let responseMessage = message;
1693 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
1694 let key = String(responseMessage.id);
1695 let responseHandler = responsePromises[key];
1696 if (responseHandler) {
1697 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
1698 }
1699 }
1700 }
1701 function traceSendingRequest(message) {
1702 if (trace === Trace.Off || !tracer) {
1703 return;
1704 }
1705 if (traceFormat === TraceFormat.Text) {
1706 let data = undefined;
1707 if (trace === Trace.Verbose && message.params) {
1708 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1709 }
1710 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
1711 }
1712 else {
1713 logLSPMessage('send-request', message);
1714 }
1715 }
1716 function traceSendingNotification(message) {
1717 if (trace === Trace.Off || !tracer) {
1718 return;
1719 }
1720 if (traceFormat === TraceFormat.Text) {
1721 let data = undefined;
1722 if (trace === Trace.Verbose) {
1723 if (message.params) {
1724 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1725 }
1726 else {
1727 data = 'No parameters provided.\n\n';
1728 }
1729 }
1730 tracer.log(`Sending notification '${message.method}'.`, data);
1731 }
1732 else {
1733 logLSPMessage('send-notification', message);
1734 }
1735 }
1736 function traceSendingResponse(message, method, startTime) {
1737 if (trace === Trace.Off || !tracer) {
1738 return;
1739 }
1740 if (traceFormat === TraceFormat.Text) {
1741 let data = undefined;
1742 if (trace === Trace.Verbose) {
1743 if (message.error && message.error.data) {
1744 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1745 }
1746 else {
1747 if (message.result) {
1748 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1749 }
1750 else if (message.error === void 0) {
1751 data = 'No result returned.\n\n';
1752 }
1753 }
1754 }
1755 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
1756 }
1757 else {
1758 logLSPMessage('send-response', message);
1759 }
1760 }
1761 function traceReceivedRequest(message) {
1762 if (trace === Trace.Off || !tracer) {
1763 return;
1764 }
1765 if (traceFormat === TraceFormat.Text) {
1766 let data = undefined;
1767 if (trace === Trace.Verbose && message.params) {
1768 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1769 }
1770 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
1771 }
1772 else {
1773 logLSPMessage('receive-request', message);
1774 }
1775 }
1776 function traceReceivedNotification(message) {
1777 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
1778 return;
1779 }
1780 if (traceFormat === TraceFormat.Text) {
1781 let data = undefined;
1782 if (trace === Trace.Verbose) {
1783 if (message.params) {
1784 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1785 }
1786 else {
1787 data = 'No parameters provided.\n\n';
1788 }
1789 }
1790 tracer.log(`Received notification '${message.method}'.`, data);
1791 }
1792 else {
1793 logLSPMessage('receive-notification', message);
1794 }
1795 }
1796 function traceReceivedResponse(message, responsePromise) {
1797 if (trace === Trace.Off || !tracer) {
1798 return;
1799 }
1800 if (traceFormat === TraceFormat.Text) {
1801 let data = undefined;
1802 if (trace === Trace.Verbose) {
1803 if (message.error && message.error.data) {
1804 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1805 }
1806 else {
1807 if (message.result) {
1808 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1809 }
1810 else if (message.error === void 0) {
1811 data = 'No result returned.\n\n';
1812 }
1813 }
1814 }
1815 if (responsePromise) {
1816 let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
1817 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
1818 }
1819 else {
1820 tracer.log(`Received response ${message.id} without active response promise.`, data);
1821 }
1822 }
1823 else {
1824 logLSPMessage('receive-response', message);
1825 }
1826 }
1827 function logLSPMessage(type, message) {
1828 if (!tracer || trace === Trace.Off) {
1829 return;
1830 }
1831 const lspMessage = {
1832 isLSPMessage: true,
1833 type,
1834 message,
1835 timestamp: Date.now()
1836 };
1837 tracer.log(lspMessage);
1838 }
1839 function throwIfClosedOrDisposed() {
1840 if (isClosed()) {
1841 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
1842 }
1843 if (isDisposed()) {
1844 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
1845 }
1846 }
1847 function throwIfListening() {
1848 if (isListening()) {
1849 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
1850 }
1851 }
1852 function throwIfNotListening() {
1853 if (!isListening()) {
1854 throw new Error('Call listen() first.');
1855 }
1856 }
1857 function undefinedToNull(param) {
1858 if (param === void 0) {
1859 return null;
1860 }
1861 else {
1862 return param;
1863 }
1864 }
1865 function computeMessageParams(type, params) {
1866 let result;
1867 let numberOfParams = type.numberOfParams;
1868 switch (numberOfParams) {
1869 case 0:
1870 result = null;
1871 break;
1872 case 1:
1873 result = undefinedToNull(params[0]);
1874 break;
1875 default:
1876 result = [];
1877 for (let i = 0; i < params.length && i < numberOfParams; i++) {
1878 result.push(undefinedToNull(params[i]));
1879 }
1880 if (params.length < numberOfParams) {
1881 for (let i = params.length; i < numberOfParams; i++) {
1882 result.push(null);
1883 }
1884 }
1885 break;
1886 }
1887 return result;
1888 }
1889 let connection = {
1890 sendNotification: (type, ...params) => {
1891 throwIfClosedOrDisposed();
1892 let method;
1893 let messageParams;
1894 if (Is.string(type)) {
1895 method = type;
1896 switch (params.length) {
1897 case 0:
1898 messageParams = null;
1899 break;
1900 case 1:
1901 messageParams = params[0];
1902 break;
1903 default:
1904 messageParams = params;
1905 break;
1906 }
1907 }
1908 else {
1909 method = type.method;
1910 messageParams = computeMessageParams(type, params);
1911 }
1912 let notificationMessage = {
1913 jsonrpc: version,
1914 method: method,
1915 params: messageParams
1916 };
1917 traceSendingNotification(notificationMessage);
1918 messageWriter.write(notificationMessage);
1919 },
1920 onNotification: (type, handler) => {
1921 throwIfClosedOrDisposed();
1922 if (Is.func(type)) {
1923 starNotificationHandler = type;
1924 }
1925 else if (handler) {
1926 if (Is.string(type)) {
1927 notificationHandlers[type] = { type: undefined, handler };
1928 }
1929 else {
1930 notificationHandlers[type.method] = { type, handler };
1931 }
1932 }
1933 },
1934 onProgress: (_type, token, handler) => {
1935 if (progressHandlers.has(token)) {
1936 throw new Error(`Progress handler for token ${token} already registered`);
1937 }
1938 progressHandlers.set(token, handler);
1939 return {
1940 dispose: () => {
1941 progressHandlers.delete(token);
1942 }
1943 };
1944 },
1945 sendProgress: (_type, token, value) => {
1946 connection.sendNotification(ProgressNotification.type, { token, value });
1947 },
1948 onUnhandledProgress: unhandledProgressEmitter.event,
1949 sendRequest: (type, ...params) => {
1950 throwIfClosedOrDisposed();
1951 throwIfNotListening();
1952 let method;
1953 let messageParams;
1954 let token = undefined;
1955 if (Is.string(type)) {
1956 method = type;
1957 switch (params.length) {
1958 case 0:
1959 messageParams = null;
1960 break;
1961 case 1:
1962 // The cancellation token is optional so it can also be undefined.
1963 if (cancellation_1.CancellationToken.is(params[0])) {
1964 messageParams = null;
1965 token = params[0];
1966 }
1967 else {
1968 messageParams = undefinedToNull(params[0]);
1969 }
1970 break;
1971 default:
1972 const last = params.length - 1;
1973 if (cancellation_1.CancellationToken.is(params[last])) {
1974 token = params[last];
1975 if (params.length === 2) {
1976 messageParams = undefinedToNull(params[0]);
1977 }
1978 else {
1979 messageParams = params.slice(0, last).map(value => undefinedToNull(value));
1980 }
1981 }
1982 else {
1983 messageParams = params.map(value => undefinedToNull(value));
1984 }
1985 break;
1986 }
1987 }
1988 else {
1989 method = type.method;
1990 messageParams = computeMessageParams(type, params);
1991 let numberOfParams = type.numberOfParams;
1992 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
1993 }
1994 let id = sequenceNumber++;
1995 let result = new Promise((resolve, reject) => {
1996 let requestMessage = {
1997 jsonrpc: version,
1998 id: id,
1999 method: method,
2000 params: messageParams
2001 };
2002 let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };
2003 traceSendingRequest(requestMessage);
2004 try {
2005 messageWriter.write(requestMessage);
2006 }
2007 catch (e) {
2008 // Writing the message failed. So we need to reject the promise.
2009 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
2010 responsePromise = null;
2011 }
2012 if (responsePromise) {
2013 responsePromises[String(id)] = responsePromise;
2014 }
2015 });
2016 if (token) {
2017 token.onCancellationRequested(() => {
2018 connection.sendNotification(CancelNotification.type, { id });
2019 });
2020 }
2021 return result;
2022 },
2023 onRequest: (type, handler) => {
2024 throwIfClosedOrDisposed();
2025 if (Is.func(type)) {
2026 starRequestHandler = type;
2027 }
2028 else if (handler) {
2029 if (Is.string(type)) {
2030 requestHandlers[type] = { type: undefined, handler };
2031 }
2032 else {
2033 requestHandlers[type.method] = { type, handler };
2034 }
2035 }
2036 },
2037 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
2038 let _sendNotification = false;
2039 let _traceFormat = TraceFormat.Text;
2040 if (sendNotificationOrTraceOptions !== void 0) {
2041 if (Is.boolean(sendNotificationOrTraceOptions)) {
2042 _sendNotification = sendNotificationOrTraceOptions;
2043 }
2044 else {
2045 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
2046 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
2047 }
2048 }
2049 trace = _value;
2050 traceFormat = _traceFormat;
2051 if (trace === Trace.Off) {
2052 tracer = undefined;
2053 }
2054 else {
2055 tracer = _tracer;
2056 }
2057 if (_sendNotification && !isClosed() && !isDisposed()) {
2058 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
2059 }
2060 },
2061 onError: errorEmitter.event,
2062 onClose: closeEmitter.event,
2063 onUnhandledNotification: unhandledNotificationEmitter.event,
2064 onDispose: disposeEmitter.event,
2065 dispose: () => {
2066 if (isDisposed()) {
2067 return;
2068 }
2069 state = ConnectionState.Disposed;
2070 disposeEmitter.fire(undefined);
2071 let error = new Error('Connection got disposed.');
2072 Object.keys(responsePromises).forEach((key) => {
2073 responsePromises[key].reject(error);
2074 });
2075 responsePromises = Object.create(null);
2076 requestTokens = Object.create(null);
2077 messageQueue = new linkedMap_1.LinkedMap();
2078 // Test for backwards compatibility
2079 if (Is.func(messageWriter.dispose)) {
2080 messageWriter.dispose();
2081 }
2082 if (Is.func(messageReader.dispose)) {
2083 messageReader.dispose();
2084 }
2085 },
2086 listen: () => {
2087 throwIfClosedOrDisposed();
2088 throwIfListening();
2089 state = ConnectionState.Listening;
2090 messageReader.listen(callback);
2091 },
2092 inspect: () => {
2093 // eslint-disable-next-line no-console
2094 console.log('inspect');
2095 }
2096 };
2097 connection.onNotification(LogTraceNotification.type, (params) => {
2098 if (trace === Trace.Off || !tracer) {
2099 return;
2100 }
2101 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
2102 });
2103 connection.onNotification(ProgressNotification.type, (params) => {
2104 const handler = progressHandlers.get(params.token);
2105 if (handler) {
2106 handler(params.value);
2107 }
2108 else {
2109 unhandledProgressEmitter.fire(params);
2110 }
2111 });
2112 return connection;
2113}
2114function isMessageReader(value) {
2115 return value.listen !== void 0 && value.read === void 0;
2116}
2117function isMessageWriter(value) {
2118 return value.write !== void 0 && value.end === void 0;
2119}
2120function createMessageConnection(input, output, logger, strategy) {
2121 if (!logger) {
2122 logger = exports.NullLogger;
2123 }
2124 let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);
2125 let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);
2126 return _createMessageConnection(reader, writer, logger, strategy);
2127}
2128exports.createMessageConnection = createMessageConnection;
2129
2130
2131/***/ }),
2132/* 5 */
2133/***/ (function(module, exports, __webpack_require__) {
2134
2135"use strict";
2136/* --------------------------------------------------------------------------------------------
2137 * Copyright (c) Microsoft Corporation. All rights reserved.
2138 * Licensed under the MIT License. See License.txt in the project root for license information.
2139 * ------------------------------------------------------------------------------------------ */
2140
2141Object.defineProperty(exports, "__esModule", { value: true });
2142function boolean(value) {
2143 return value === true || value === false;
2144}
2145exports.boolean = boolean;
2146function string(value) {
2147 return typeof value === 'string' || value instanceof String;
2148}
2149exports.string = string;
2150function number(value) {
2151 return typeof value === 'number' || value instanceof Number;
2152}
2153exports.number = number;
2154function error(value) {
2155 return value instanceof Error;
2156}
2157exports.error = error;
2158function func(value) {
2159 return typeof value === 'function';
2160}
2161exports.func = func;
2162function array(value) {
2163 return Array.isArray(value);
2164}
2165exports.array = array;
2166function stringArray(value) {
2167 return array(value) && value.every(elem => string(elem));
2168}
2169exports.stringArray = stringArray;
2170
2171
2172/***/ }),
2173/* 6 */
2174/***/ (function(module, exports, __webpack_require__) {
2175
2176"use strict";
2177/* --------------------------------------------------------------------------------------------
2178 * Copyright (c) Microsoft Corporation. All rights reserved.
2179 * Licensed under the MIT License. See License.txt in the project root for license information.
2180 * ------------------------------------------------------------------------------------------ */
2181
2182Object.defineProperty(exports, "__esModule", { value: true });
2183const is = __webpack_require__(5);
2184/**
2185 * Predefined error codes.
2186 */
2187var ErrorCodes;
2188(function (ErrorCodes) {
2189 // Defined by JSON RPC
2190 ErrorCodes.ParseError = -32700;
2191 ErrorCodes.InvalidRequest = -32600;
2192 ErrorCodes.MethodNotFound = -32601;
2193 ErrorCodes.InvalidParams = -32602;
2194 ErrorCodes.InternalError = -32603;
2195 ErrorCodes.serverErrorStart = -32099;
2196 ErrorCodes.serverErrorEnd = -32000;
2197 ErrorCodes.ServerNotInitialized = -32002;
2198 ErrorCodes.UnknownErrorCode = -32001;
2199 // Defined by the protocol.
2200 ErrorCodes.RequestCancelled = -32800;
2201 ErrorCodes.ContentModified = -32801;
2202 // Defined by VSCode library.
2203 ErrorCodes.MessageWriteError = 1;
2204 ErrorCodes.MessageReadError = 2;
2205})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
2206/**
2207 * An error object return in a response in case a request
2208 * has failed.
2209 */
2210class ResponseError extends Error {
2211 constructor(code, message, data) {
2212 super(message);
2213 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
2214 this.data = data;
2215 Object.setPrototypeOf(this, ResponseError.prototype);
2216 }
2217 toJson() {
2218 return {
2219 code: this.code,
2220 message: this.message,
2221 data: this.data,
2222 };
2223 }
2224}
2225exports.ResponseError = ResponseError;
2226/**
2227 * An abstract implementation of a MessageType.
2228 */
2229class AbstractMessageType {
2230 constructor(_method, _numberOfParams) {
2231 this._method = _method;
2232 this._numberOfParams = _numberOfParams;
2233 }
2234 get method() {
2235 return this._method;
2236 }
2237 get numberOfParams() {
2238 return this._numberOfParams;
2239 }
2240}
2241exports.AbstractMessageType = AbstractMessageType;
2242/**
2243 * Classes to type request response pairs
2244 *
2245 * The type parameter RO will be removed in the next major version
2246 * of the JSON RPC library since it is a LSP concept and doesn't
2247 * belong here. For now it is tagged as default never.
2248 */
2249class RequestType0 extends AbstractMessageType {
2250 constructor(method) {
2251 super(method, 0);
2252 }
2253}
2254exports.RequestType0 = RequestType0;
2255class RequestType extends AbstractMessageType {
2256 constructor(method) {
2257 super(method, 1);
2258 }
2259}
2260exports.RequestType = RequestType;
2261class RequestType1 extends AbstractMessageType {
2262 constructor(method) {
2263 super(method, 1);
2264 }
2265}
2266exports.RequestType1 = RequestType1;
2267class RequestType2 extends AbstractMessageType {
2268 constructor(method) {
2269 super(method, 2);
2270 }
2271}
2272exports.RequestType2 = RequestType2;
2273class RequestType3 extends AbstractMessageType {
2274 constructor(method) {
2275 super(method, 3);
2276 }
2277}
2278exports.RequestType3 = RequestType3;
2279class RequestType4 extends AbstractMessageType {
2280 constructor(method) {
2281 super(method, 4);
2282 }
2283}
2284exports.RequestType4 = RequestType4;
2285class RequestType5 extends AbstractMessageType {
2286 constructor(method) {
2287 super(method, 5);
2288 }
2289}
2290exports.RequestType5 = RequestType5;
2291class RequestType6 extends AbstractMessageType {
2292 constructor(method) {
2293 super(method, 6);
2294 }
2295}
2296exports.RequestType6 = RequestType6;
2297class RequestType7 extends AbstractMessageType {
2298 constructor(method) {
2299 super(method, 7);
2300 }
2301}
2302exports.RequestType7 = RequestType7;
2303class RequestType8 extends AbstractMessageType {
2304 constructor(method) {
2305 super(method, 8);
2306 }
2307}
2308exports.RequestType8 = RequestType8;
2309class RequestType9 extends AbstractMessageType {
2310 constructor(method) {
2311 super(method, 9);
2312 }
2313}
2314exports.RequestType9 = RequestType9;
2315/**
2316 * The type parameter RO will be removed in the next major version
2317 * of the JSON RPC library since it is a LSP concept and doesn't
2318 * belong here. For now it is tagged as default never.
2319 */
2320class NotificationType extends AbstractMessageType {
2321 constructor(method) {
2322 super(method, 1);
2323 this._ = undefined;
2324 }
2325}
2326exports.NotificationType = NotificationType;
2327class NotificationType0 extends AbstractMessageType {
2328 constructor(method) {
2329 super(method, 0);
2330 }
2331}
2332exports.NotificationType0 = NotificationType0;
2333class NotificationType1 extends AbstractMessageType {
2334 constructor(method) {
2335 super(method, 1);
2336 }
2337}
2338exports.NotificationType1 = NotificationType1;
2339class NotificationType2 extends AbstractMessageType {
2340 constructor(method) {
2341 super(method, 2);
2342 }
2343}
2344exports.NotificationType2 = NotificationType2;
2345class NotificationType3 extends AbstractMessageType {
2346 constructor(method) {
2347 super(method, 3);
2348 }
2349}
2350exports.NotificationType3 = NotificationType3;
2351class NotificationType4 extends AbstractMessageType {
2352 constructor(method) {
2353 super(method, 4);
2354 }
2355}
2356exports.NotificationType4 = NotificationType4;
2357class NotificationType5 extends AbstractMessageType {
2358 constructor(method) {
2359 super(method, 5);
2360 }
2361}
2362exports.NotificationType5 = NotificationType5;
2363class NotificationType6 extends AbstractMessageType {
2364 constructor(method) {
2365 super(method, 6);
2366 }
2367}
2368exports.NotificationType6 = NotificationType6;
2369class NotificationType7 extends AbstractMessageType {
2370 constructor(method) {
2371 super(method, 7);
2372 }
2373}
2374exports.NotificationType7 = NotificationType7;
2375class NotificationType8 extends AbstractMessageType {
2376 constructor(method) {
2377 super(method, 8);
2378 }
2379}
2380exports.NotificationType8 = NotificationType8;
2381class NotificationType9 extends AbstractMessageType {
2382 constructor(method) {
2383 super(method, 9);
2384 }
2385}
2386exports.NotificationType9 = NotificationType9;
2387/**
2388 * Tests if the given message is a request message
2389 */
2390function isRequestMessage(message) {
2391 let candidate = message;
2392 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
2393}
2394exports.isRequestMessage = isRequestMessage;
2395/**
2396 * Tests if the given message is a notification message
2397 */
2398function isNotificationMessage(message) {
2399 let candidate = message;
2400 return candidate && is.string(candidate.method) && message.id === void 0;
2401}
2402exports.isNotificationMessage = isNotificationMessage;
2403/**
2404 * Tests if the given message is a response message
2405 */
2406function isResponseMessage(message) {
2407 let candidate = message;
2408 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
2409}
2410exports.isResponseMessage = isResponseMessage;
2411
2412
2413/***/ }),
2414/* 7 */
2415/***/ (function(module, exports, __webpack_require__) {
2416
2417"use strict";
2418/* --------------------------------------------------------------------------------------------
2419 * Copyright (c) Microsoft Corporation. All rights reserved.
2420 * Licensed under the MIT License. See License.txt in the project root for license information.
2421 * ------------------------------------------------------------------------------------------ */
2422
2423Object.defineProperty(exports, "__esModule", { value: true });
2424const events_1 = __webpack_require__(8);
2425const Is = __webpack_require__(5);
2426let DefaultSize = 8192;
2427let CR = Buffer.from('\r', 'ascii')[0];
2428let LF = Buffer.from('\n', 'ascii')[0];
2429let CRLF = '\r\n';
2430class MessageBuffer {
2431 constructor(encoding = 'utf8') {
2432 this.encoding = encoding;
2433 this.index = 0;
2434 this.buffer = Buffer.allocUnsafe(DefaultSize);
2435 }
2436 append(chunk) {
2437 var toAppend = chunk;
2438 if (typeof (chunk) === 'string') {
2439 var str = chunk;
2440 var bufferLen = Buffer.byteLength(str, this.encoding);
2441 toAppend = Buffer.allocUnsafe(bufferLen);
2442 toAppend.write(str, 0, bufferLen, this.encoding);
2443 }
2444 if (this.buffer.length - this.index >= toAppend.length) {
2445 toAppend.copy(this.buffer, this.index, 0, toAppend.length);
2446 }
2447 else {
2448 var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
2449 if (this.index === 0) {
2450 this.buffer = Buffer.allocUnsafe(newSize);
2451 toAppend.copy(this.buffer, 0, 0, toAppend.length);
2452 }
2453 else {
2454 this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
2455 }
2456 }
2457 this.index += toAppend.length;
2458 }
2459 tryReadHeaders() {
2460 let result = undefined;
2461 let current = 0;
2462 while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
2463 current++;
2464 }
2465 // No header / body separator found (e.g CRLFCRLF)
2466 if (current + 3 >= this.index) {
2467 return result;
2468 }
2469 result = Object.create(null);
2470 let headers = this.buffer.toString('ascii', 0, current).split(CRLF);
2471 headers.forEach((header) => {
2472 let index = header.indexOf(':');
2473 if (index === -1) {
2474 throw new Error('Message header must separate key and value using :');
2475 }
2476 let key = header.substr(0, index);
2477 let value = header.substr(index + 1).trim();
2478 result[key] = value;
2479 });
2480 let nextStart = current + 4;
2481 this.buffer = this.buffer.slice(nextStart);
2482 this.index = this.index - nextStart;
2483 return result;
2484 }
2485 tryReadContent(length) {
2486 if (this.index < length) {
2487 return null;
2488 }
2489 let result = this.buffer.toString(this.encoding, 0, length);
2490 let nextStart = length;
2491 this.buffer.copy(this.buffer, 0, nextStart);
2492 this.index = this.index - nextStart;
2493 return result;
2494 }
2495 get numberOfBytes() {
2496 return this.index;
2497 }
2498}
2499var MessageReader;
2500(function (MessageReader) {
2501 function is(value) {
2502 let candidate = value;
2503 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
2504 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
2505 }
2506 MessageReader.is = is;
2507})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
2508class AbstractMessageReader {
2509 constructor() {
2510 this.errorEmitter = new events_1.Emitter();
2511 this.closeEmitter = new events_1.Emitter();
2512 this.partialMessageEmitter = new events_1.Emitter();
2513 }
2514 dispose() {
2515 this.errorEmitter.dispose();
2516 this.closeEmitter.dispose();
2517 }
2518 get onError() {
2519 return this.errorEmitter.event;
2520 }
2521 fireError(error) {
2522 this.errorEmitter.fire(this.asError(error));
2523 }
2524 get onClose() {
2525 return this.closeEmitter.event;
2526 }
2527 fireClose() {
2528 this.closeEmitter.fire(undefined);
2529 }
2530 get onPartialMessage() {
2531 return this.partialMessageEmitter.event;
2532 }
2533 firePartialMessage(info) {
2534 this.partialMessageEmitter.fire(info);
2535 }
2536 asError(error) {
2537 if (error instanceof Error) {
2538 return error;
2539 }
2540 else {
2541 return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2542 }
2543 }
2544}
2545exports.AbstractMessageReader = AbstractMessageReader;
2546class StreamMessageReader extends AbstractMessageReader {
2547 constructor(readable, encoding = 'utf8') {
2548 super();
2549 this.readable = readable;
2550 this.buffer = new MessageBuffer(encoding);
2551 this._partialMessageTimeout = 10000;
2552 }
2553 set partialMessageTimeout(timeout) {
2554 this._partialMessageTimeout = timeout;
2555 }
2556 get partialMessageTimeout() {
2557 return this._partialMessageTimeout;
2558 }
2559 listen(callback) {
2560 this.nextMessageLength = -1;
2561 this.messageToken = 0;
2562 this.partialMessageTimer = undefined;
2563 this.callback = callback;
2564 this.readable.on('data', (data) => {
2565 this.onData(data);
2566 });
2567 this.readable.on('error', (error) => this.fireError(error));
2568 this.readable.on('close', () => this.fireClose());
2569 }
2570 onData(data) {
2571 this.buffer.append(data);
2572 while (true) {
2573 if (this.nextMessageLength === -1) {
2574 let headers = this.buffer.tryReadHeaders();
2575 if (!headers) {
2576 return;
2577 }
2578 let contentLength = headers['Content-Length'];
2579 if (!contentLength) {
2580 throw new Error('Header must provide a Content-Length property.');
2581 }
2582 let length = parseInt(contentLength);
2583 if (isNaN(length)) {
2584 throw new Error('Content-Length value must be a number.');
2585 }
2586 this.nextMessageLength = length;
2587 // Take the encoding form the header. For compatibility
2588 // treat both utf-8 and utf8 as node utf8
2589 }
2590 var msg = this.buffer.tryReadContent(this.nextMessageLength);
2591 if (msg === null) {
2592 /** We haven't received the full message yet. */
2593 this.setPartialMessageTimer();
2594 return;
2595 }
2596 this.clearPartialMessageTimer();
2597 this.nextMessageLength = -1;
2598 this.messageToken++;
2599 var json = JSON.parse(msg);
2600 this.callback(json);
2601 }
2602 }
2603 clearPartialMessageTimer() {
2604 if (this.partialMessageTimer) {
2605 clearTimeout(this.partialMessageTimer);
2606 this.partialMessageTimer = undefined;
2607 }
2608 }
2609 setPartialMessageTimer() {
2610 this.clearPartialMessageTimer();
2611 if (this._partialMessageTimeout <= 0) {
2612 return;
2613 }
2614 this.partialMessageTimer = setTimeout((token, timeout) => {
2615 this.partialMessageTimer = undefined;
2616 if (token === this.messageToken) {
2617 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
2618 this.setPartialMessageTimer();
2619 }
2620 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
2621 }
2622}
2623exports.StreamMessageReader = StreamMessageReader;
2624class IPCMessageReader extends AbstractMessageReader {
2625 constructor(process) {
2626 super();
2627 this.process = process;
2628 let eventEmitter = this.process;
2629 eventEmitter.on('error', (error) => this.fireError(error));
2630 eventEmitter.on('close', () => this.fireClose());
2631 }
2632 listen(callback) {
2633 this.process.on('message', callback);
2634 }
2635}
2636exports.IPCMessageReader = IPCMessageReader;
2637class SocketMessageReader extends StreamMessageReader {
2638 constructor(socket, encoding = 'utf-8') {
2639 super(socket, encoding);
2640 }
2641}
2642exports.SocketMessageReader = SocketMessageReader;
2643
2644
2645/***/ }),
2646/* 8 */
2647/***/ (function(module, exports, __webpack_require__) {
2648
2649"use strict";
2650/* --------------------------------------------------------------------------------------------
2651 * Copyright (c) Microsoft Corporation. All rights reserved.
2652 * Licensed under the MIT License. See License.txt in the project root for license information.
2653 * ------------------------------------------------------------------------------------------ */
2654
2655Object.defineProperty(exports, "__esModule", { value: true });
2656var Disposable;
2657(function (Disposable) {
2658 function create(func) {
2659 return {
2660 dispose: func
2661 };
2662 }
2663 Disposable.create = create;
2664})(Disposable = exports.Disposable || (exports.Disposable = {}));
2665var Event;
2666(function (Event) {
2667 const _disposable = { dispose() { } };
2668 Event.None = function () { return _disposable; };
2669})(Event = exports.Event || (exports.Event = {}));
2670class CallbackList {
2671 add(callback, context = null, bucket) {
2672 if (!this._callbacks) {
2673 this._callbacks = [];
2674 this._contexts = [];
2675 }
2676 this._callbacks.push(callback);
2677 this._contexts.push(context);
2678 if (Array.isArray(bucket)) {
2679 bucket.push({ dispose: () => this.remove(callback, context) });
2680 }
2681 }
2682 remove(callback, context = null) {
2683 if (!this._callbacks) {
2684 return;
2685 }
2686 var foundCallbackWithDifferentContext = false;
2687 for (var i = 0, len = this._callbacks.length; i < len; i++) {
2688 if (this._callbacks[i] === callback) {
2689 if (this._contexts[i] === context) {
2690 // callback & context match => remove it
2691 this._callbacks.splice(i, 1);
2692 this._contexts.splice(i, 1);
2693 return;
2694 }
2695 else {
2696 foundCallbackWithDifferentContext = true;
2697 }
2698 }
2699 }
2700 if (foundCallbackWithDifferentContext) {
2701 throw new Error('When adding a listener with a context, you should remove it with the same context');
2702 }
2703 }
2704 invoke(...args) {
2705 if (!this._callbacks) {
2706 return [];
2707 }
2708 var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
2709 for (var i = 0, len = callbacks.length; i < len; i++) {
2710 try {
2711 ret.push(callbacks[i].apply(contexts[i], args));
2712 }
2713 catch (e) {
2714 // eslint-disable-next-line no-console
2715 console.error(e);
2716 }
2717 }
2718 return ret;
2719 }
2720 isEmpty() {
2721 return !this._callbacks || this._callbacks.length === 0;
2722 }
2723 dispose() {
2724 this._callbacks = undefined;
2725 this._contexts = undefined;
2726 }
2727}
2728class Emitter {
2729 constructor(_options) {
2730 this._options = _options;
2731 }
2732 /**
2733 * For the public to allow to subscribe
2734 * to events from this Emitter
2735 */
2736 get event() {
2737 if (!this._event) {
2738 this._event = (listener, thisArgs, disposables) => {
2739 if (!this._callbacks) {
2740 this._callbacks = new CallbackList();
2741 }
2742 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
2743 this._options.onFirstListenerAdd(this);
2744 }
2745 this._callbacks.add(listener, thisArgs);
2746 let result;
2747 result = {
2748 dispose: () => {
2749 this._callbacks.remove(listener, thisArgs);
2750 result.dispose = Emitter._noop;
2751 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
2752 this._options.onLastListenerRemove(this);
2753 }
2754 }
2755 };
2756 if (Array.isArray(disposables)) {
2757 disposables.push(result);
2758 }
2759 return result;
2760 };
2761 }
2762 return this._event;
2763 }
2764 /**
2765 * To be kept private to fire an event to
2766 * subscribers
2767 */
2768 fire(event) {
2769 if (this._callbacks) {
2770 this._callbacks.invoke.call(this._callbacks, event);
2771 }
2772 }
2773 dispose() {
2774 if (this._callbacks) {
2775 this._callbacks.dispose();
2776 this._callbacks = undefined;
2777 }
2778 }
2779}
2780exports.Emitter = Emitter;
2781Emitter._noop = function () { };
2782
2783
2784/***/ }),
2785/* 9 */
2786/***/ (function(module, exports, __webpack_require__) {
2787
2788"use strict";
2789/* --------------------------------------------------------------------------------------------
2790 * Copyright (c) Microsoft Corporation. All rights reserved.
2791 * Licensed under the MIT License. See License.txt in the project root for license information.
2792 * ------------------------------------------------------------------------------------------ */
2793
2794Object.defineProperty(exports, "__esModule", { value: true });
2795const events_1 = __webpack_require__(8);
2796const Is = __webpack_require__(5);
2797let ContentLength = 'Content-Length: ';
2798let CRLF = '\r\n';
2799var MessageWriter;
2800(function (MessageWriter) {
2801 function is(value) {
2802 let candidate = value;
2803 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
2804 Is.func(candidate.onError) && Is.func(candidate.write);
2805 }
2806 MessageWriter.is = is;
2807})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
2808class AbstractMessageWriter {
2809 constructor() {
2810 this.errorEmitter = new events_1.Emitter();
2811 this.closeEmitter = new events_1.Emitter();
2812 }
2813 dispose() {
2814 this.errorEmitter.dispose();
2815 this.closeEmitter.dispose();
2816 }
2817 get onError() {
2818 return this.errorEmitter.event;
2819 }
2820 fireError(error, message, count) {
2821 this.errorEmitter.fire([this.asError(error), message, count]);
2822 }
2823 get onClose() {
2824 return this.closeEmitter.event;
2825 }
2826 fireClose() {
2827 this.closeEmitter.fire(undefined);
2828 }
2829 asError(error) {
2830 if (error instanceof Error) {
2831 return error;
2832 }
2833 else {
2834 return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2835 }
2836 }
2837}
2838exports.AbstractMessageWriter = AbstractMessageWriter;
2839class StreamMessageWriter extends AbstractMessageWriter {
2840 constructor(writable, encoding = 'utf8') {
2841 super();
2842 this.writable = writable;
2843 this.encoding = encoding;
2844 this.errorCount = 0;
2845 this.writable.on('error', (error) => this.fireError(error));
2846 this.writable.on('close', () => this.fireClose());
2847 }
2848 write(msg) {
2849 let json = JSON.stringify(msg);
2850 let contentLength = Buffer.byteLength(json, this.encoding);
2851 let headers = [
2852 ContentLength, contentLength.toString(), CRLF,
2853 CRLF
2854 ];
2855 try {
2856 // Header must be written in ASCII encoding
2857 this.writable.write(headers.join(''), 'ascii');
2858 // Now write the content. This can be written in any encoding
2859 this.writable.write(json, this.encoding);
2860 this.errorCount = 0;
2861 }
2862 catch (error) {
2863 this.errorCount++;
2864 this.fireError(error, msg, this.errorCount);
2865 }
2866 }
2867}
2868exports.StreamMessageWriter = StreamMessageWriter;
2869class IPCMessageWriter extends AbstractMessageWriter {
2870 constructor(process) {
2871 super();
2872 this.process = process;
2873 this.errorCount = 0;
2874 this.queue = [];
2875 this.sending = false;
2876 let eventEmitter = this.process;
2877 eventEmitter.on('error', (error) => this.fireError(error));
2878 eventEmitter.on('close', () => this.fireClose);
2879 }
2880 write(msg) {
2881 if (!this.sending && this.queue.length === 0) {
2882 // See https://github.com/nodejs/node/issues/7657
2883 this.doWriteMessage(msg);
2884 }
2885 else {
2886 this.queue.push(msg);
2887 }
2888 }
2889 doWriteMessage(msg) {
2890 try {
2891 if (this.process.send) {
2892 this.sending = true;
2893 this.process.send(msg, undefined, undefined, (error) => {
2894 this.sending = false;
2895 if (error) {
2896 this.errorCount++;
2897 this.fireError(error, msg, this.errorCount);
2898 }
2899 else {
2900 this.errorCount = 0;
2901 }
2902 if (this.queue.length > 0) {
2903 this.doWriteMessage(this.queue.shift());
2904 }
2905 });
2906 }
2907 }
2908 catch (error) {
2909 this.errorCount++;
2910 this.fireError(error, msg, this.errorCount);
2911 }
2912 }
2913}
2914exports.IPCMessageWriter = IPCMessageWriter;
2915class SocketMessageWriter extends AbstractMessageWriter {
2916 constructor(socket, encoding = 'utf8') {
2917 super();
2918 this.socket = socket;
2919 this.queue = [];
2920 this.sending = false;
2921 this.encoding = encoding;
2922 this.errorCount = 0;
2923 this.socket.on('error', (error) => this.fireError(error));
2924 this.socket.on('close', () => this.fireClose());
2925 }
2926 dispose() {
2927 super.dispose();
2928 this.socket.destroy();
2929 }
2930 write(msg) {
2931 if (!this.sending && this.queue.length === 0) {
2932 // See https://github.com/nodejs/node/issues/7657
2933 this.doWriteMessage(msg);
2934 }
2935 else {
2936 this.queue.push(msg);
2937 }
2938 }
2939 doWriteMessage(msg) {
2940 let json = JSON.stringify(msg);
2941 let contentLength = Buffer.byteLength(json, this.encoding);
2942 let headers = [
2943 ContentLength, contentLength.toString(), CRLF,
2944 CRLF
2945 ];
2946 try {
2947 // Header must be written in ASCII encoding
2948 this.sending = true;
2949 this.socket.write(headers.join(''), 'ascii', (error) => {
2950 if (error) {
2951 this.handleError(error, msg);
2952 }
2953 try {
2954 // Now write the content. This can be written in any encoding
2955 this.socket.write(json, this.encoding, (error) => {
2956 this.sending = false;
2957 if (error) {
2958 this.handleError(error, msg);
2959 }
2960 else {
2961 this.errorCount = 0;
2962 }
2963 if (this.queue.length > 0) {
2964 this.doWriteMessage(this.queue.shift());
2965 }
2966 });
2967 }
2968 catch (error) {
2969 this.handleError(error, msg);
2970 }
2971 });
2972 }
2973 catch (error) {
2974 this.handleError(error, msg);
2975 }
2976 }
2977 handleError(error, msg) {
2978 this.errorCount++;
2979 this.fireError(error, msg, this.errorCount);
2980 }
2981}
2982exports.SocketMessageWriter = SocketMessageWriter;
2983
2984
2985/***/ }),
2986/* 10 */
2987/***/ (function(module, exports, __webpack_require__) {
2988
2989"use strict";
2990/*---------------------------------------------------------------------------------------------
2991 * Copyright (c) Microsoft Corporation. All rights reserved.
2992 * Licensed under the MIT License. See License.txt in the project root for license information.
2993 *--------------------------------------------------------------------------------------------*/
2994
2995Object.defineProperty(exports, "__esModule", { value: true });
2996const events_1 = __webpack_require__(8);
2997const Is = __webpack_require__(5);
2998var CancellationToken;
2999(function (CancellationToken) {
3000 CancellationToken.None = Object.freeze({
3001 isCancellationRequested: false,
3002 onCancellationRequested: events_1.Event.None
3003 });
3004 CancellationToken.Cancelled = Object.freeze({
3005 isCancellationRequested: true,
3006 onCancellationRequested: events_1.Event.None
3007 });
3008 function is(value) {
3009 let candidate = value;
3010 return candidate && (candidate === CancellationToken.None
3011 || candidate === CancellationToken.Cancelled
3012 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
3013 }
3014 CancellationToken.is = is;
3015})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
3016const shortcutEvent = Object.freeze(function (callback, context) {
3017 let handle = setTimeout(callback.bind(context), 0);
3018 return { dispose() { clearTimeout(handle); } };
3019});
3020class MutableToken {
3021 constructor() {
3022 this._isCancelled = false;
3023 }
3024 cancel() {
3025 if (!this._isCancelled) {
3026 this._isCancelled = true;
3027 if (this._emitter) {
3028 this._emitter.fire(undefined);
3029 this.dispose();
3030 }
3031 }
3032 }
3033 get isCancellationRequested() {
3034 return this._isCancelled;
3035 }
3036 get onCancellationRequested() {
3037 if (this._isCancelled) {
3038 return shortcutEvent;
3039 }
3040 if (!this._emitter) {
3041 this._emitter = new events_1.Emitter();
3042 }
3043 return this._emitter.event;
3044 }
3045 dispose() {
3046 if (this._emitter) {
3047 this._emitter.dispose();
3048 this._emitter = undefined;
3049 }
3050 }
3051}
3052class CancellationTokenSource {
3053 get token() {
3054 if (!this._token) {
3055 // be lazy and create the token only when
3056 // actually needed
3057 this._token = new MutableToken();
3058 }
3059 return this._token;
3060 }
3061 cancel() {
3062 if (!this._token) {
3063 // save an object by returning the default
3064 // cancelled token when cancellation happens
3065 // before someone asks for the token
3066 this._token = CancellationToken.Cancelled;
3067 }
3068 else {
3069 this._token.cancel();
3070 }
3071 }
3072 dispose() {
3073 if (!this._token) {
3074 // ensure to initialize with an empty token if we had none
3075 this._token = CancellationToken.None;
3076 }
3077 else if (this._token instanceof MutableToken) {
3078 // actually dispose
3079 this._token.dispose();
3080 }
3081 }
3082}
3083exports.CancellationTokenSource = CancellationTokenSource;
3084
3085
3086/***/ }),
3087/* 11 */
3088/***/ (function(module, exports, __webpack_require__) {
3089
3090"use strict";
3091
3092/*---------------------------------------------------------------------------------------------
3093 * Copyright (c) Microsoft Corporation. All rights reserved.
3094 * Licensed under the MIT License. See License.txt in the project root for license information.
3095 *--------------------------------------------------------------------------------------------*/
3096Object.defineProperty(exports, "__esModule", { value: true });
3097var Touch;
3098(function (Touch) {
3099 Touch.None = 0;
3100 Touch.First = 1;
3101 Touch.Last = 2;
3102})(Touch = exports.Touch || (exports.Touch = {}));
3103class LinkedMap {
3104 constructor() {
3105 this._map = new Map();
3106 this._head = undefined;
3107 this._tail = undefined;
3108 this._size = 0;
3109 }
3110 clear() {
3111 this._map.clear();
3112 this._head = undefined;
3113 this._tail = undefined;
3114 this._size = 0;
3115 }
3116 isEmpty() {
3117 return !this._head && !this._tail;
3118 }
3119 get size() {
3120 return this._size;
3121 }
3122 has(key) {
3123 return this._map.has(key);
3124 }
3125 get(key) {
3126 const item = this._map.get(key);
3127 if (!item) {
3128 return undefined;
3129 }
3130 return item.value;
3131 }
3132 set(key, value, touch = Touch.None) {
3133 let item = this._map.get(key);
3134 if (item) {
3135 item.value = value;
3136 if (touch !== Touch.None) {
3137 this.touch(item, touch);
3138 }
3139 }
3140 else {
3141 item = { key, value, next: undefined, previous: undefined };
3142 switch (touch) {
3143 case Touch.None:
3144 this.addItemLast(item);
3145 break;
3146 case Touch.First:
3147 this.addItemFirst(item);
3148 break;
3149 case Touch.Last:
3150 this.addItemLast(item);
3151 break;
3152 default:
3153 this.addItemLast(item);
3154 break;
3155 }
3156 this._map.set(key, item);
3157 this._size++;
3158 }
3159 }
3160 delete(key) {
3161 const item = this._map.get(key);
3162 if (!item) {
3163 return false;
3164 }
3165 this._map.delete(key);
3166 this.removeItem(item);
3167 this._size--;
3168 return true;
3169 }
3170 shift() {
3171 if (!this._head && !this._tail) {
3172 return undefined;
3173 }
3174 if (!this._head || !this._tail) {
3175 throw new Error('Invalid list');
3176 }
3177 const item = this._head;
3178 this._map.delete(item.key);
3179 this.removeItem(item);
3180 this._size--;
3181 return item.value;
3182 }
3183 forEach(callbackfn, thisArg) {
3184 let current = this._head;
3185 while (current) {
3186 if (thisArg) {
3187 callbackfn.bind(thisArg)(current.value, current.key, this);
3188 }
3189 else {
3190 callbackfn(current.value, current.key, this);
3191 }
3192 current = current.next;
3193 }
3194 }
3195 forEachReverse(callbackfn, thisArg) {
3196 let current = this._tail;
3197 while (current) {
3198 if (thisArg) {
3199 callbackfn.bind(thisArg)(current.value, current.key, this);
3200 }
3201 else {
3202 callbackfn(current.value, current.key, this);
3203 }
3204 current = current.previous;
3205 }
3206 }
3207 values() {
3208 let result = [];
3209 let current = this._head;
3210 while (current) {
3211 result.push(current.value);
3212 current = current.next;
3213 }
3214 return result;
3215 }
3216 keys() {
3217 let result = [];
3218 let current = this._head;
3219 while (current) {
3220 result.push(current.key);
3221 current = current.next;
3222 }
3223 return result;
3224 }
3225 /* JSON RPC run on es5 which has no Symbol.iterator
3226 public keys(): IterableIterator<K> {
3227 let current = this._head;
3228 let iterator: IterableIterator<K> = {
3229 [Symbol.iterator]() {
3230 return iterator;
3231 },
3232 next():IteratorResult<K> {
3233 if (current) {
3234 let result = { value: current.key, done: false };
3235 current = current.next;
3236 return result;
3237 } else {
3238 return { value: undefined, done: true };
3239 }
3240 }
3241 };
3242 return iterator;
3243 }
3244
3245 public values(): IterableIterator<V> {
3246 let current = this._head;
3247 let iterator: IterableIterator<V> = {
3248 [Symbol.iterator]() {
3249 return iterator;
3250 },
3251 next():IteratorResult<V> {
3252 if (current) {
3253 let result = { value: current.value, done: false };
3254 current = current.next;
3255 return result;
3256 } else {
3257 return { value: undefined, done: true };
3258 }
3259 }
3260 };
3261 return iterator;
3262 }
3263 */
3264 addItemFirst(item) {
3265 // First time Insert
3266 if (!this._head && !this._tail) {
3267 this._tail = item;
3268 }
3269 else if (!this._head) {
3270 throw new Error('Invalid list');
3271 }
3272 else {
3273 item.next = this._head;
3274 this._head.previous = item;
3275 }
3276 this._head = item;
3277 }
3278 addItemLast(item) {
3279 // First time Insert
3280 if (!this._head && !this._tail) {
3281 this._head = item;
3282 }
3283 else if (!this._tail) {
3284 throw new Error('Invalid list');
3285 }
3286 else {
3287 item.previous = this._tail;
3288 this._tail.next = item;
3289 }
3290 this._tail = item;
3291 }
3292 removeItem(item) {
3293 if (item === this._head && item === this._tail) {
3294 this._head = undefined;
3295 this._tail = undefined;
3296 }
3297 else if (item === this._head) {
3298 this._head = item.next;
3299 }
3300 else if (item === this._tail) {
3301 this._tail = item.previous;
3302 }
3303 else {
3304 const next = item.next;
3305 const previous = item.previous;
3306 if (!next || !previous) {
3307 throw new Error('Invalid list');
3308 }
3309 next.previous = previous;
3310 previous.next = next;
3311 }
3312 }
3313 touch(item, touch) {
3314 if (!this._head || !this._tail) {
3315 throw new Error('Invalid list');
3316 }
3317 if ((touch !== Touch.First && touch !== Touch.Last)) {
3318 return;
3319 }
3320 if (touch === Touch.First) {
3321 if (item === this._head) {
3322 return;
3323 }
3324 const next = item.next;
3325 const previous = item.previous;
3326 // Unlink the item
3327 if (item === this._tail) {
3328 // previous must be defined since item was not head but is tail
3329 // So there are more than on item in the map
3330 previous.next = undefined;
3331 this._tail = previous;
3332 }
3333 else {
3334 // Both next and previous are not undefined since item was neither head nor tail.
3335 next.previous = previous;
3336 previous.next = next;
3337 }
3338 // Insert the node at head
3339 item.previous = undefined;
3340 item.next = this._head;
3341 this._head.previous = item;
3342 this._head = item;
3343 }
3344 else if (touch === Touch.Last) {
3345 if (item === this._tail) {
3346 return;
3347 }
3348 const next = item.next;
3349 const previous = item.previous;
3350 // Unlink the item.
3351 if (item === this._head) {
3352 // next must be defined since item was not tail but is head
3353 // So there are more than on item in the map
3354 next.previous = undefined;
3355 this._head = next;
3356 }
3357 else {
3358 // Both next and previous are not undefined since item was neither head nor tail.
3359 next.previous = previous;
3360 previous.next = next;
3361 }
3362 item.next = undefined;
3363 item.previous = this._tail;
3364 this._tail.next = item;
3365 this._tail = item;
3366 }
3367 }
3368}
3369exports.LinkedMap = LinkedMap;
3370
3371
3372/***/ }),
3373/* 12 */
3374/***/ (function(module, exports, __webpack_require__) {
3375
3376"use strict";
3377/* --------------------------------------------------------------------------------------------
3378 * Copyright (c) Microsoft Corporation. All rights reserved.
3379 * Licensed under the MIT License. See License.txt in the project root for license information.
3380 * ------------------------------------------------------------------------------------------ */
3381
3382Object.defineProperty(exports, "__esModule", { value: true });
3383const path_1 = __webpack_require__(13);
3384const os_1 = __webpack_require__(14);
3385const crypto_1 = __webpack_require__(15);
3386const net_1 = __webpack_require__(16);
3387const messageReader_1 = __webpack_require__(7);
3388const messageWriter_1 = __webpack_require__(9);
3389function generateRandomPipeName() {
3390 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
3391 if (process.platform === 'win32') {
3392 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
3393 }
3394 else {
3395 // Mac/Unix: use socket file
3396 return path_1.join(os_1.tmpdir(), `vscode-${randomSuffix}.sock`);
3397 }
3398}
3399exports.generateRandomPipeName = generateRandomPipeName;
3400function createClientPipeTransport(pipeName, encoding = 'utf-8') {
3401 let connectResolve;
3402 let connected = new Promise((resolve, _reject) => {
3403 connectResolve = resolve;
3404 });
3405 return new Promise((resolve, reject) => {
3406 let server = net_1.createServer((socket) => {
3407 server.close();
3408 connectResolve([
3409 new messageReader_1.SocketMessageReader(socket, encoding),
3410 new messageWriter_1.SocketMessageWriter(socket, encoding)
3411 ]);
3412 });
3413 server.on('error', reject);
3414 server.listen(pipeName, () => {
3415 server.removeListener('error', reject);
3416 resolve({
3417 onConnected: () => { return connected; }
3418 });
3419 });
3420 });
3421}
3422exports.createClientPipeTransport = createClientPipeTransport;
3423function createServerPipeTransport(pipeName, encoding = 'utf-8') {
3424 const socket = net_1.createConnection(pipeName);
3425 return [
3426 new messageReader_1.SocketMessageReader(socket, encoding),
3427 new messageWriter_1.SocketMessageWriter(socket, encoding)
3428 ];
3429}
3430exports.createServerPipeTransport = createServerPipeTransport;
3431
3432
3433/***/ }),
3434/* 13 */
3435/***/ (function(module, exports) {
3436
3437module.exports = require("path");
3438
3439/***/ }),
3440/* 14 */
3441/***/ (function(module, exports) {
3442
3443module.exports = require("os");
3444
3445/***/ }),
3446/* 15 */
3447/***/ (function(module, exports) {
3448
3449module.exports = require("crypto");
3450
3451/***/ }),
3452/* 16 */
3453/***/ (function(module, exports) {
3454
3455module.exports = require("net");
3456
3457/***/ }),
3458/* 17 */
3459/***/ (function(module, exports, __webpack_require__) {
3460
3461"use strict";
3462/* --------------------------------------------------------------------------------------------
3463 * Copyright (c) Microsoft Corporation. All rights reserved.
3464 * Licensed under the MIT License. See License.txt in the project root for license information.
3465 * ------------------------------------------------------------------------------------------ */
3466
3467Object.defineProperty(exports, "__esModule", { value: true });
3468const net_1 = __webpack_require__(16);
3469const messageReader_1 = __webpack_require__(7);
3470const messageWriter_1 = __webpack_require__(9);
3471function createClientSocketTransport(port, encoding = 'utf-8') {
3472 let connectResolve;
3473 let connected = new Promise((resolve, _reject) => {
3474 connectResolve = resolve;
3475 });
3476 return new Promise((resolve, reject) => {
3477 let server = net_1.createServer((socket) => {
3478 server.close();
3479 connectResolve([
3480 new messageReader_1.SocketMessageReader(socket, encoding),
3481 new messageWriter_1.SocketMessageWriter(socket, encoding)
3482 ]);
3483 });
3484 server.on('error', reject);
3485 server.listen(port, '127.0.0.1', () => {
3486 server.removeListener('error', reject);
3487 resolve({
3488 onConnected: () => { return connected; }
3489 });
3490 });
3491 });
3492}
3493exports.createClientSocketTransport = createClientSocketTransport;
3494function createServerSocketTransport(port, encoding = 'utf-8') {
3495 const socket = net_1.createConnection(port, '127.0.0.1');
3496 return [
3497 new messageReader_1.SocketMessageReader(socket, encoding),
3498 new messageWriter_1.SocketMessageWriter(socket, encoding)
3499 ];
3500}
3501exports.createServerSocketTransport = createServerSocketTransport;
3502
3503
3504/***/ }),
3505/* 18 */
3506/***/ (function(module, __webpack_exports__, __webpack_require__) {
3507
3508"use strict";
3509__webpack_require__.r(__webpack_exports__);
3510/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
3511/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
3512/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
3513/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
3514/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
3515/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
3516/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
3517/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
3518/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
3519/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
3520/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
3521/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
3522/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
3523/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
3524/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
3525/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
3526/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
3527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
3528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
3529/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
3530/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
3531/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
3532/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
3533/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
3534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
3535/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
3536/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
3537/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
3538/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return CompletionItemTag; });
3539/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
3540/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
3541/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
3542/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
3543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
3544/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
3545/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
3546/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
3547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
3548/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return SymbolTag; });
3549/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
3550/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
3551/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
3552/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
3553/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
3554/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
3555/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
3556/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
3557/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
3558/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
3559/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
3560/* --------------------------------------------------------------------------------------------
3561 * Copyright (c) Microsoft Corporation. All rights reserved.
3562 * Licensed under the MIT License. See License.txt in the project root for license information.
3563 * ------------------------------------------------------------------------------------------ */
3564
3565/**
3566 * The Position namespace provides helper functions to work with
3567 * [Position](#Position) literals.
3568 */
3569var Position;
3570(function (Position) {
3571 /**
3572 * Creates a new Position literal from the given line and character.
3573 * @param line The position's line.
3574 * @param character The position's character.
3575 */
3576 function create(line, character) {
3577 return { line: line, character: character };
3578 }
3579 Position.create = create;
3580 /**
3581 * Checks whether the given liternal conforms to the [Position](#Position) interface.
3582 */
3583 function is(value) {
3584 var candidate = value;
3585 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
3586 }
3587 Position.is = is;
3588})(Position || (Position = {}));
3589/**
3590 * The Range namespace provides helper functions to work with
3591 * [Range](#Range) literals.
3592 */
3593var Range;
3594(function (Range) {
3595 function create(one, two, three, four) {
3596 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
3597 return { start: Position.create(one, two), end: Position.create(three, four) };
3598 }
3599 else if (Position.is(one) && Position.is(two)) {
3600 return { start: one, end: two };
3601 }
3602 else {
3603 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
3604 }
3605 }
3606 Range.create = create;
3607 /**
3608 * Checks whether the given literal conforms to the [Range](#Range) interface.
3609 */
3610 function is(value) {
3611 var candidate = value;
3612 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
3613 }
3614 Range.is = is;
3615})(Range || (Range = {}));
3616/**
3617 * The Location namespace provides helper functions to work with
3618 * [Location](#Location) literals.
3619 */
3620var Location;
3621(function (Location) {
3622 /**
3623 * Creates a Location literal.
3624 * @param uri The location's uri.
3625 * @param range The location's range.
3626 */
3627 function create(uri, range) {
3628 return { uri: uri, range: range };
3629 }
3630 Location.create = create;
3631 /**
3632 * Checks whether the given literal conforms to the [Location](#Location) interface.
3633 */
3634 function is(value) {
3635 var candidate = value;
3636 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
3637 }
3638 Location.is = is;
3639})(Location || (Location = {}));
3640/**
3641 * The LocationLink namespace provides helper functions to work with
3642 * [LocationLink](#LocationLink) literals.
3643 */
3644var LocationLink;
3645(function (LocationLink) {
3646 /**
3647 * Creates a LocationLink literal.
3648 * @param targetUri The definition's uri.
3649 * @param targetRange The full range of the definition.
3650 * @param targetSelectionRange The span of the symbol definition at the target.
3651 * @param originSelectionRange The span of the symbol being defined in the originating source file.
3652 */
3653 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
3654 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
3655 }
3656 LocationLink.create = create;
3657 /**
3658 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
3659 */
3660 function is(value) {
3661 var candidate = value;
3662 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
3663 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
3664 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
3665 }
3666 LocationLink.is = is;
3667})(LocationLink || (LocationLink = {}));
3668/**
3669 * The Color namespace provides helper functions to work with
3670 * [Color](#Color) literals.
3671 */
3672var Color;
3673(function (Color) {
3674 /**
3675 * Creates a new Color literal.
3676 */
3677 function create(red, green, blue, alpha) {
3678 return {
3679 red: red,
3680 green: green,
3681 blue: blue,
3682 alpha: alpha,
3683 };
3684 }
3685 Color.create = create;
3686 /**
3687 * Checks whether the given literal conforms to the [Color](#Color) interface.
3688 */
3689 function is(value) {
3690 var candidate = value;
3691 return Is.number(candidate.red)
3692 && Is.number(candidate.green)
3693 && Is.number(candidate.blue)
3694 && Is.number(candidate.alpha);
3695 }
3696 Color.is = is;
3697})(Color || (Color = {}));
3698/**
3699 * The ColorInformation namespace provides helper functions to work with
3700 * [ColorInformation](#ColorInformation) literals.
3701 */
3702var ColorInformation;
3703(function (ColorInformation) {
3704 /**
3705 * Creates a new ColorInformation literal.
3706 */
3707 function create(range, color) {
3708 return {
3709 range: range,
3710 color: color,
3711 };
3712 }
3713 ColorInformation.create = create;
3714 /**
3715 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3716 */
3717 function is(value) {
3718 var candidate = value;
3719 return Range.is(candidate.range) && Color.is(candidate.color);
3720 }
3721 ColorInformation.is = is;
3722})(ColorInformation || (ColorInformation = {}));
3723/**
3724 * The Color namespace provides helper functions to work with
3725 * [ColorPresentation](#ColorPresentation) literals.
3726 */
3727var ColorPresentation;
3728(function (ColorPresentation) {
3729 /**
3730 * Creates a new ColorInformation literal.
3731 */
3732 function create(label, textEdit, additionalTextEdits) {
3733 return {
3734 label: label,
3735 textEdit: textEdit,
3736 additionalTextEdits: additionalTextEdits,
3737 };
3738 }
3739 ColorPresentation.create = create;
3740 /**
3741 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3742 */
3743 function is(value) {
3744 var candidate = value;
3745 return Is.string(candidate.label)
3746 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
3747 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
3748 }
3749 ColorPresentation.is = is;
3750})(ColorPresentation || (ColorPresentation = {}));
3751/**
3752 * Enum of known range kinds
3753 */
3754var FoldingRangeKind;
3755(function (FoldingRangeKind) {
3756 /**
3757 * Folding range for a comment
3758 */
3759 FoldingRangeKind["Comment"] = "comment";
3760 /**
3761 * Folding range for a imports or includes
3762 */
3763 FoldingRangeKind["Imports"] = "imports";
3764 /**
3765 * Folding range for a region (e.g. `#region`)
3766 */
3767 FoldingRangeKind["Region"] = "region";
3768})(FoldingRangeKind || (FoldingRangeKind = {}));
3769/**
3770 * The folding range namespace provides helper functions to work with
3771 * [FoldingRange](#FoldingRange) literals.
3772 */
3773var FoldingRange;
3774(function (FoldingRange) {
3775 /**
3776 * Creates a new FoldingRange literal.
3777 */
3778 function create(startLine, endLine, startCharacter, endCharacter, kind) {
3779 var result = {
3780 startLine: startLine,
3781 endLine: endLine
3782 };
3783 if (Is.defined(startCharacter)) {
3784 result.startCharacter = startCharacter;
3785 }
3786 if (Is.defined(endCharacter)) {
3787 result.endCharacter = endCharacter;
3788 }
3789 if (Is.defined(kind)) {
3790 result.kind = kind;
3791 }
3792 return result;
3793 }
3794 FoldingRange.create = create;
3795 /**
3796 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
3797 */
3798 function is(value) {
3799 var candidate = value;
3800 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
3801 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
3802 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
3803 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
3804 }
3805 FoldingRange.is = is;
3806})(FoldingRange || (FoldingRange = {}));
3807/**
3808 * The DiagnosticRelatedInformation namespace provides helper functions to work with
3809 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
3810 */
3811var DiagnosticRelatedInformation;
3812(function (DiagnosticRelatedInformation) {
3813 /**
3814 * Creates a new DiagnosticRelatedInformation literal.
3815 */
3816 function create(location, message) {
3817 return {
3818 location: location,
3819 message: message
3820 };
3821 }
3822 DiagnosticRelatedInformation.create = create;
3823 /**
3824 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
3825 */
3826 function is(value) {
3827 var candidate = value;
3828 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
3829 }
3830 DiagnosticRelatedInformation.is = is;
3831})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
3832/**
3833 * The diagnostic's severity.
3834 */
3835var DiagnosticSeverity;
3836(function (DiagnosticSeverity) {
3837 /**
3838 * Reports an error.
3839 */
3840 DiagnosticSeverity.Error = 1;
3841 /**
3842 * Reports a warning.
3843 */
3844 DiagnosticSeverity.Warning = 2;
3845 /**
3846 * Reports an information.
3847 */
3848 DiagnosticSeverity.Information = 3;
3849 /**
3850 * Reports a hint.
3851 */
3852 DiagnosticSeverity.Hint = 4;
3853})(DiagnosticSeverity || (DiagnosticSeverity = {}));
3854/**
3855 * The diagnostic tags.
3856 *
3857 * @since 3.15.0
3858 */
3859var DiagnosticTag;
3860(function (DiagnosticTag) {
3861 /**
3862 * Unused or unnecessary code.
3863 *
3864 * Clients are allowed to render diagnostics with this tag faded out instead of having
3865 * an error squiggle.
3866 */
3867 DiagnosticTag.Unnecessary = 1;
3868 /**
3869 * Deprecated or obsolete code.
3870 *
3871 * Clients are allowed to rendered diagnostics with this tag strike through.
3872 */
3873 DiagnosticTag.Deprecated = 2;
3874})(DiagnosticTag || (DiagnosticTag = {}));
3875/**
3876 * The Diagnostic namespace provides helper functions to work with
3877 * [Diagnostic](#Diagnostic) literals.
3878 */
3879var Diagnostic;
3880(function (Diagnostic) {
3881 /**
3882 * Creates a new Diagnostic literal.
3883 */
3884 function create(range, message, severity, code, source, relatedInformation) {
3885 var result = { range: range, message: message };
3886 if (Is.defined(severity)) {
3887 result.severity = severity;
3888 }
3889 if (Is.defined(code)) {
3890 result.code = code;
3891 }
3892 if (Is.defined(source)) {
3893 result.source = source;
3894 }
3895 if (Is.defined(relatedInformation)) {
3896 result.relatedInformation = relatedInformation;
3897 }
3898 return result;
3899 }
3900 Diagnostic.create = create;
3901 /**
3902 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
3903 */
3904 function is(value) {
3905 var candidate = value;
3906 return Is.defined(candidate)
3907 && Range.is(candidate.range)
3908 && Is.string(candidate.message)
3909 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
3910 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
3911 && (Is.string(candidate.source) || Is.undefined(candidate.source))
3912 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
3913 }
3914 Diagnostic.is = is;
3915})(Diagnostic || (Diagnostic = {}));
3916/**
3917 * The Command namespace provides helper functions to work with
3918 * [Command](#Command) literals.
3919 */
3920var Command;
3921(function (Command) {
3922 /**
3923 * Creates a new Command literal.
3924 */
3925 function create(title, command) {
3926 var args = [];
3927 for (var _i = 2; _i < arguments.length; _i++) {
3928 args[_i - 2] = arguments[_i];
3929 }
3930 var result = { title: title, command: command };
3931 if (Is.defined(args) && args.length > 0) {
3932 result.arguments = args;
3933 }
3934 return result;
3935 }
3936 Command.create = create;
3937 /**
3938 * Checks whether the given literal conforms to the [Command](#Command) interface.
3939 */
3940 function is(value) {
3941 var candidate = value;
3942 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
3943 }
3944 Command.is = is;
3945})(Command || (Command = {}));
3946/**
3947 * The TextEdit namespace provides helper function to create replace,
3948 * insert and delete edits more easily.
3949 */
3950var TextEdit;
3951(function (TextEdit) {
3952 /**
3953 * Creates a replace text edit.
3954 * @param range The range of text to be replaced.
3955 * @param newText The new text.
3956 */
3957 function replace(range, newText) {
3958 return { range: range, newText: newText };
3959 }
3960 TextEdit.replace = replace;
3961 /**
3962 * Creates a insert text edit.
3963 * @param position The position to insert the text at.
3964 * @param newText The text to be inserted.
3965 */
3966 function insert(position, newText) {
3967 return { range: { start: position, end: position }, newText: newText };
3968 }
3969 TextEdit.insert = insert;
3970 /**
3971 * Creates a delete text edit.
3972 * @param range The range of text to be deleted.
3973 */
3974 function del(range) {
3975 return { range: range, newText: '' };
3976 }
3977 TextEdit.del = del;
3978 function is(value) {
3979 var candidate = value;
3980 return Is.objectLiteral(candidate)
3981 && Is.string(candidate.newText)
3982 && Range.is(candidate.range);
3983 }
3984 TextEdit.is = is;
3985})(TextEdit || (TextEdit = {}));
3986/**
3987 * The TextDocumentEdit namespace provides helper function to create
3988 * an edit that manipulates a text document.
3989 */
3990var TextDocumentEdit;
3991(function (TextDocumentEdit) {
3992 /**
3993 * Creates a new `TextDocumentEdit`
3994 */
3995 function create(textDocument, edits) {
3996 return { textDocument: textDocument, edits: edits };
3997 }
3998 TextDocumentEdit.create = create;
3999 function is(value) {
4000 var candidate = value;
4001 return Is.defined(candidate)
4002 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
4003 && Array.isArray(candidate.edits);
4004 }
4005 TextDocumentEdit.is = is;
4006})(TextDocumentEdit || (TextDocumentEdit = {}));
4007var CreateFile;
4008(function (CreateFile) {
4009 function create(uri, options) {
4010 var result = {
4011 kind: 'create',
4012 uri: uri
4013 };
4014 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
4015 result.options = options;
4016 }
4017 return result;
4018 }
4019 CreateFile.create = create;
4020 function is(value) {
4021 var candidate = value;
4022 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
4023 (candidate.options === void 0 ||
4024 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
4025 }
4026 CreateFile.is = is;
4027})(CreateFile || (CreateFile = {}));
4028var RenameFile;
4029(function (RenameFile) {
4030 function create(oldUri, newUri, options) {
4031 var result = {
4032 kind: 'rename',
4033 oldUri: oldUri,
4034 newUri: newUri
4035 };
4036 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
4037 result.options = options;
4038 }
4039 return result;
4040 }
4041 RenameFile.create = create;
4042 function is(value) {
4043 var candidate = value;
4044 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
4045 (candidate.options === void 0 ||
4046 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
4047 }
4048 RenameFile.is = is;
4049})(RenameFile || (RenameFile = {}));
4050var DeleteFile;
4051(function (DeleteFile) {
4052 function create(uri, options) {
4053 var result = {
4054 kind: 'delete',
4055 uri: uri
4056 };
4057 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
4058 result.options = options;
4059 }
4060 return result;
4061 }
4062 DeleteFile.create = create;
4063 function is(value) {
4064 var candidate = value;
4065 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
4066 (candidate.options === void 0 ||
4067 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
4068 }
4069 DeleteFile.is = is;
4070})(DeleteFile || (DeleteFile = {}));
4071var WorkspaceEdit;
4072(function (WorkspaceEdit) {
4073 function is(value) {
4074 var candidate = value;
4075 return candidate &&
4076 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
4077 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
4078 if (Is.string(change.kind)) {
4079 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
4080 }
4081 else {
4082 return TextDocumentEdit.is(change);
4083 }
4084 }));
4085 }
4086 WorkspaceEdit.is = is;
4087})(WorkspaceEdit || (WorkspaceEdit = {}));
4088var TextEditChangeImpl = /** @class */ (function () {
4089 function TextEditChangeImpl(edits) {
4090 this.edits = edits;
4091 }
4092 TextEditChangeImpl.prototype.insert = function (position, newText) {
4093 this.edits.push(TextEdit.insert(position, newText));
4094 };
4095 TextEditChangeImpl.prototype.replace = function (range, newText) {
4096 this.edits.push(TextEdit.replace(range, newText));
4097 };
4098 TextEditChangeImpl.prototype.delete = function (range) {
4099 this.edits.push(TextEdit.del(range));
4100 };
4101 TextEditChangeImpl.prototype.add = function (edit) {
4102 this.edits.push(edit);
4103 };
4104 TextEditChangeImpl.prototype.all = function () {
4105 return this.edits;
4106 };
4107 TextEditChangeImpl.prototype.clear = function () {
4108 this.edits.splice(0, this.edits.length);
4109 };
4110 return TextEditChangeImpl;
4111}());
4112/**
4113 * A workspace change helps constructing changes to a workspace.
4114 */
4115var WorkspaceChange = /** @class */ (function () {
4116 function WorkspaceChange(workspaceEdit) {
4117 var _this = this;
4118 this._textEditChanges = Object.create(null);
4119 if (workspaceEdit) {
4120 this._workspaceEdit = workspaceEdit;
4121 if (workspaceEdit.documentChanges) {
4122 workspaceEdit.documentChanges.forEach(function (change) {
4123 if (TextDocumentEdit.is(change)) {
4124 var textEditChange = new TextEditChangeImpl(change.edits);
4125 _this._textEditChanges[change.textDocument.uri] = textEditChange;
4126 }
4127 });
4128 }
4129 else if (workspaceEdit.changes) {
4130 Object.keys(workspaceEdit.changes).forEach(function (key) {
4131 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
4132 _this._textEditChanges[key] = textEditChange;
4133 });
4134 }
4135 }
4136 }
4137 Object.defineProperty(WorkspaceChange.prototype, "edit", {
4138 /**
4139 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
4140 * use to be returned from a workspace edit operation like rename.
4141 */
4142 get: function () {
4143 return this._workspaceEdit;
4144 },
4145 enumerable: true,
4146 configurable: true
4147 });
4148 WorkspaceChange.prototype.getTextEditChange = function (key) {
4149 if (VersionedTextDocumentIdentifier.is(key)) {
4150 if (!this._workspaceEdit) {
4151 this._workspaceEdit = {
4152 documentChanges: []
4153 };
4154 }
4155 if (!this._workspaceEdit.documentChanges) {
4156 throw new Error('Workspace edit is not configured for document changes.');
4157 }
4158 var textDocument = key;
4159 var result = this._textEditChanges[textDocument.uri];
4160 if (!result) {
4161 var edits = [];
4162 var textDocumentEdit = {
4163 textDocument: textDocument,
4164 edits: edits
4165 };
4166 this._workspaceEdit.documentChanges.push(textDocumentEdit);
4167 result = new TextEditChangeImpl(edits);
4168 this._textEditChanges[textDocument.uri] = result;
4169 }
4170 return result;
4171 }
4172 else {
4173 if (!this._workspaceEdit) {
4174 this._workspaceEdit = {
4175 changes: Object.create(null)
4176 };
4177 }
4178 if (!this._workspaceEdit.changes) {
4179 throw new Error('Workspace edit is not configured for normal text edit changes.');
4180 }
4181 var result = this._textEditChanges[key];
4182 if (!result) {
4183 var edits = [];
4184 this._workspaceEdit.changes[key] = edits;
4185 result = new TextEditChangeImpl(edits);
4186 this._textEditChanges[key] = result;
4187 }
4188 return result;
4189 }
4190 };
4191 WorkspaceChange.prototype.createFile = function (uri, options) {
4192 this.checkDocumentChanges();
4193 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
4194 };
4195 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
4196 this.checkDocumentChanges();
4197 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
4198 };
4199 WorkspaceChange.prototype.deleteFile = function (uri, options) {
4200 this.checkDocumentChanges();
4201 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
4202 };
4203 WorkspaceChange.prototype.checkDocumentChanges = function () {
4204 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
4205 throw new Error('Workspace edit is not configured for document changes.');
4206 }
4207 };
4208 return WorkspaceChange;
4209}());
4210
4211/**
4212 * The TextDocumentIdentifier namespace provides helper functions to work with
4213 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
4214 */
4215var TextDocumentIdentifier;
4216(function (TextDocumentIdentifier) {
4217 /**
4218 * Creates a new TextDocumentIdentifier literal.
4219 * @param uri The document's uri.
4220 */
4221 function create(uri) {
4222 return { uri: uri };
4223 }
4224 TextDocumentIdentifier.create = create;
4225 /**
4226 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
4227 */
4228 function is(value) {
4229 var candidate = value;
4230 return Is.defined(candidate) && Is.string(candidate.uri);
4231 }
4232 TextDocumentIdentifier.is = is;
4233})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
4234/**
4235 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
4236 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
4237 */
4238var VersionedTextDocumentIdentifier;
4239(function (VersionedTextDocumentIdentifier) {
4240 /**
4241 * Creates a new VersionedTextDocumentIdentifier literal.
4242 * @param uri The document's uri.
4243 * @param uri The document's text.
4244 */
4245 function create(uri, version) {
4246 return { uri: uri, version: version };
4247 }
4248 VersionedTextDocumentIdentifier.create = create;
4249 /**
4250 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
4251 */
4252 function is(value) {
4253 var candidate = value;
4254 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
4255 }
4256 VersionedTextDocumentIdentifier.is = is;
4257})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
4258/**
4259 * The TextDocumentItem namespace provides helper functions to work with
4260 * [TextDocumentItem](#TextDocumentItem) literals.
4261 */
4262var TextDocumentItem;
4263(function (TextDocumentItem) {
4264 /**
4265 * Creates a new TextDocumentItem literal.
4266 * @param uri The document's uri.
4267 * @param languageId The document's language identifier.
4268 * @param version The document's version number.
4269 * @param text The document's text.
4270 */
4271 function create(uri, languageId, version, text) {
4272 return { uri: uri, languageId: languageId, version: version, text: text };
4273 }
4274 TextDocumentItem.create = create;
4275 /**
4276 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
4277 */
4278 function is(value) {
4279 var candidate = value;
4280 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
4281 }
4282 TextDocumentItem.is = is;
4283})(TextDocumentItem || (TextDocumentItem = {}));
4284/**
4285 * Describes the content type that a client supports in various
4286 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
4287 *
4288 * Please note that `MarkupKinds` must not start with a `$`. This kinds
4289 * are reserved for internal usage.
4290 */
4291var MarkupKind;
4292(function (MarkupKind) {
4293 /**
4294 * Plain text is supported as a content format
4295 */
4296 MarkupKind.PlainText = 'plaintext';
4297 /**
4298 * Markdown is supported as a content format
4299 */
4300 MarkupKind.Markdown = 'markdown';
4301})(MarkupKind || (MarkupKind = {}));
4302(function (MarkupKind) {
4303 /**
4304 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
4305 */
4306 function is(value) {
4307 var candidate = value;
4308 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
4309 }
4310 MarkupKind.is = is;
4311})(MarkupKind || (MarkupKind = {}));
4312var MarkupContent;
4313(function (MarkupContent) {
4314 /**
4315 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
4316 */
4317 function is(value) {
4318 var candidate = value;
4319 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
4320 }
4321 MarkupContent.is = is;
4322})(MarkupContent || (MarkupContent = {}));
4323/**
4324 * The kind of a completion entry.
4325 */
4326var CompletionItemKind;
4327(function (CompletionItemKind) {
4328 CompletionItemKind.Text = 1;
4329 CompletionItemKind.Method = 2;
4330 CompletionItemKind.Function = 3;
4331 CompletionItemKind.Constructor = 4;
4332 CompletionItemKind.Field = 5;
4333 CompletionItemKind.Variable = 6;
4334 CompletionItemKind.Class = 7;
4335 CompletionItemKind.Interface = 8;
4336 CompletionItemKind.Module = 9;
4337 CompletionItemKind.Property = 10;
4338 CompletionItemKind.Unit = 11;
4339 CompletionItemKind.Value = 12;
4340 CompletionItemKind.Enum = 13;
4341 CompletionItemKind.Keyword = 14;
4342 CompletionItemKind.Snippet = 15;
4343 CompletionItemKind.Color = 16;
4344 CompletionItemKind.File = 17;
4345 CompletionItemKind.Reference = 18;
4346 CompletionItemKind.Folder = 19;
4347 CompletionItemKind.EnumMember = 20;
4348 CompletionItemKind.Constant = 21;
4349 CompletionItemKind.Struct = 22;
4350 CompletionItemKind.Event = 23;
4351 CompletionItemKind.Operator = 24;
4352 CompletionItemKind.TypeParameter = 25;
4353})(CompletionItemKind || (CompletionItemKind = {}));
4354/**
4355 * Defines whether the insert text in a completion item should be interpreted as
4356 * plain text or a snippet.
4357 */
4358var InsertTextFormat;
4359(function (InsertTextFormat) {
4360 /**
4361 * The primary text to be inserted is treated as a plain string.
4362 */
4363 InsertTextFormat.PlainText = 1;
4364 /**
4365 * The primary text to be inserted is treated as a snippet.
4366 *
4367 * A snippet can define tab stops and placeholders with `$1`, `$2`
4368 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4369 * the end of the snippet. Placeholders with equal identifiers are linked,
4370 * that is typing in one will update others too.
4371 *
4372 * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
4373 */
4374 InsertTextFormat.Snippet = 2;
4375})(InsertTextFormat || (InsertTextFormat = {}));
4376/**
4377 * Completion item tags are extra annotations that tweak the rendering of a completion
4378 * item.
4379 *
4380 * @since 3.15.0
4381 */
4382var CompletionItemTag;
4383(function (CompletionItemTag) {
4384 /**
4385 * Render a completion as obsolete, usually using a strike-out.
4386 */
4387 CompletionItemTag.Deprecated = 1;
4388})(CompletionItemTag || (CompletionItemTag = {}));
4389/**
4390 * The CompletionItem namespace provides functions to deal with
4391 * completion items.
4392 */
4393var CompletionItem;
4394(function (CompletionItem) {
4395 /**
4396 * Create a completion item and seed it with a label.
4397 * @param label The completion item's label
4398 */
4399 function create(label) {
4400 return { label: label };
4401 }
4402 CompletionItem.create = create;
4403})(CompletionItem || (CompletionItem = {}));
4404/**
4405 * The CompletionList namespace provides functions to deal with
4406 * completion lists.
4407 */
4408var CompletionList;
4409(function (CompletionList) {
4410 /**
4411 * Creates a new completion list.
4412 *
4413 * @param items The completion items.
4414 * @param isIncomplete The list is not complete.
4415 */
4416 function create(items, isIncomplete) {
4417 return { items: items ? items : [], isIncomplete: !!isIncomplete };
4418 }
4419 CompletionList.create = create;
4420})(CompletionList || (CompletionList = {}));
4421var MarkedString;
4422(function (MarkedString) {
4423 /**
4424 * Creates a marked string from plain text.
4425 *
4426 * @param plainText The plain text.
4427 */
4428 function fromPlainText(plainText) {
4429 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
4430 }
4431 MarkedString.fromPlainText = fromPlainText;
4432 /**
4433 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
4434 */
4435 function is(value) {
4436 var candidate = value;
4437 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
4438 }
4439 MarkedString.is = is;
4440})(MarkedString || (MarkedString = {}));
4441var Hover;
4442(function (Hover) {
4443 /**
4444 * Checks whether the given value conforms to the [Hover](#Hover) interface.
4445 */
4446 function is(value) {
4447 var candidate = value;
4448 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
4449 MarkedString.is(candidate.contents) ||
4450 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
4451 }
4452 Hover.is = is;
4453})(Hover || (Hover = {}));
4454/**
4455 * The ParameterInformation namespace provides helper functions to work with
4456 * [ParameterInformation](#ParameterInformation) literals.
4457 */
4458var ParameterInformation;
4459(function (ParameterInformation) {
4460 /**
4461 * Creates a new parameter information literal.
4462 *
4463 * @param label A label string.
4464 * @param documentation A doc string.
4465 */
4466 function create(label, documentation) {
4467 return documentation ? { label: label, documentation: documentation } : { label: label };
4468 }
4469 ParameterInformation.create = create;
4470})(ParameterInformation || (ParameterInformation = {}));
4471/**
4472 * The SignatureInformation namespace provides helper functions to work with
4473 * [SignatureInformation](#SignatureInformation) literals.
4474 */
4475var SignatureInformation;
4476(function (SignatureInformation) {
4477 function create(label, documentation) {
4478 var parameters = [];
4479 for (var _i = 2; _i < arguments.length; _i++) {
4480 parameters[_i - 2] = arguments[_i];
4481 }
4482 var result = { label: label };
4483 if (Is.defined(documentation)) {
4484 result.documentation = documentation;
4485 }
4486 if (Is.defined(parameters)) {
4487 result.parameters = parameters;
4488 }
4489 else {
4490 result.parameters = [];
4491 }
4492 return result;
4493 }
4494 SignatureInformation.create = create;
4495})(SignatureInformation || (SignatureInformation = {}));
4496/**
4497 * A document highlight kind.
4498 */
4499var DocumentHighlightKind;
4500(function (DocumentHighlightKind) {
4501 /**
4502 * A textual occurrence.
4503 */
4504 DocumentHighlightKind.Text = 1;
4505 /**
4506 * Read-access of a symbol, like reading a variable.
4507 */
4508 DocumentHighlightKind.Read = 2;
4509 /**
4510 * Write-access of a symbol, like writing to a variable.
4511 */
4512 DocumentHighlightKind.Write = 3;
4513})(DocumentHighlightKind || (DocumentHighlightKind = {}));
4514/**
4515 * DocumentHighlight namespace to provide helper functions to work with
4516 * [DocumentHighlight](#DocumentHighlight) literals.
4517 */
4518var DocumentHighlight;
4519(function (DocumentHighlight) {
4520 /**
4521 * Create a DocumentHighlight object.
4522 * @param range The range the highlight applies to.
4523 */
4524 function create(range, kind) {
4525 var result = { range: range };
4526 if (Is.number(kind)) {
4527 result.kind = kind;
4528 }
4529 return result;
4530 }
4531 DocumentHighlight.create = create;
4532})(DocumentHighlight || (DocumentHighlight = {}));
4533/**
4534 * A symbol kind.
4535 */
4536var SymbolKind;
4537(function (SymbolKind) {
4538 SymbolKind.File = 1;
4539 SymbolKind.Module = 2;
4540 SymbolKind.Namespace = 3;
4541 SymbolKind.Package = 4;
4542 SymbolKind.Class = 5;
4543 SymbolKind.Method = 6;
4544 SymbolKind.Property = 7;
4545 SymbolKind.Field = 8;
4546 SymbolKind.Constructor = 9;
4547 SymbolKind.Enum = 10;
4548 SymbolKind.Interface = 11;
4549 SymbolKind.Function = 12;
4550 SymbolKind.Variable = 13;
4551 SymbolKind.Constant = 14;
4552 SymbolKind.String = 15;
4553 SymbolKind.Number = 16;
4554 SymbolKind.Boolean = 17;
4555 SymbolKind.Array = 18;
4556 SymbolKind.Object = 19;
4557 SymbolKind.Key = 20;
4558 SymbolKind.Null = 21;
4559 SymbolKind.EnumMember = 22;
4560 SymbolKind.Struct = 23;
4561 SymbolKind.Event = 24;
4562 SymbolKind.Operator = 25;
4563 SymbolKind.TypeParameter = 26;
4564})(SymbolKind || (SymbolKind = {}));
4565/**
4566 * Symbol tags are extra annotations that tweak the rendering of a symbol.
4567 * @since 3.15
4568 */
4569var SymbolTag;
4570(function (SymbolTag) {
4571 /**
4572 * Render a symbol as obsolete, usually using a strike-out.
4573 */
4574 SymbolTag.Deprecated = 1;
4575})(SymbolTag || (SymbolTag = {}));
4576var SymbolInformation;
4577(function (SymbolInformation) {
4578 /**
4579 * Creates a new symbol information literal.
4580 *
4581 * @param name The name of the symbol.
4582 * @param kind The kind of the symbol.
4583 * @param range The range of the location of the symbol.
4584 * @param uri The resource of the location of symbol, defaults to the current document.
4585 * @param containerName The name of the symbol containing the symbol.
4586 */
4587 function create(name, kind, range, uri, containerName) {
4588 var result = {
4589 name: name,
4590 kind: kind,
4591 location: { uri: uri, range: range }
4592 };
4593 if (containerName) {
4594 result.containerName = containerName;
4595 }
4596 return result;
4597 }
4598 SymbolInformation.create = create;
4599})(SymbolInformation || (SymbolInformation = {}));
4600var DocumentSymbol;
4601(function (DocumentSymbol) {
4602 /**
4603 * Creates a new symbol information literal.
4604 *
4605 * @param name The name of the symbol.
4606 * @param detail The detail of the symbol.
4607 * @param kind The kind of the symbol.
4608 * @param range The range of the symbol.
4609 * @param selectionRange The selectionRange of the symbol.
4610 * @param children Children of the symbol.
4611 */
4612 function create(name, detail, kind, range, selectionRange, children) {
4613 var result = {
4614 name: name,
4615 detail: detail,
4616 kind: kind,
4617 range: range,
4618 selectionRange: selectionRange
4619 };
4620 if (children !== void 0) {
4621 result.children = children;
4622 }
4623 return result;
4624 }
4625 DocumentSymbol.create = create;
4626 /**
4627 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
4628 */
4629 function is(value) {
4630 var candidate = value;
4631 return candidate &&
4632 Is.string(candidate.name) && Is.number(candidate.kind) &&
4633 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
4634 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
4635 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
4636 (candidate.children === void 0 || Array.isArray(candidate.children));
4637 }
4638 DocumentSymbol.is = is;
4639})(DocumentSymbol || (DocumentSymbol = {}));
4640/**
4641 * A set of predefined code action kinds
4642 */
4643var CodeActionKind;
4644(function (CodeActionKind) {
4645 /**
4646 * Empty kind.
4647 */
4648 CodeActionKind.Empty = '';
4649 /**
4650 * Base kind for quickfix actions: 'quickfix'
4651 */
4652 CodeActionKind.QuickFix = 'quickfix';
4653 /**
4654 * Base kind for refactoring actions: 'refactor'
4655 */
4656 CodeActionKind.Refactor = 'refactor';
4657 /**
4658 * Base kind for refactoring extraction actions: 'refactor.extract'
4659 *
4660 * Example extract actions:
4661 *
4662 * - Extract method
4663 * - Extract function
4664 * - Extract variable
4665 * - Extract interface from class
4666 * - ...
4667 */
4668 CodeActionKind.RefactorExtract = 'refactor.extract';
4669 /**
4670 * Base kind for refactoring inline actions: 'refactor.inline'
4671 *
4672 * Example inline actions:
4673 *
4674 * - Inline function
4675 * - Inline variable
4676 * - Inline constant
4677 * - ...
4678 */
4679 CodeActionKind.RefactorInline = 'refactor.inline';
4680 /**
4681 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
4682 *
4683 * Example rewrite actions:
4684 *
4685 * - Convert JavaScript function to class
4686 * - Add or remove parameter
4687 * - Encapsulate field
4688 * - Make method static
4689 * - Move method to base class
4690 * - ...
4691 */
4692 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
4693 /**
4694 * Base kind for source actions: `source`
4695 *
4696 * Source code actions apply to the entire file.
4697 */
4698 CodeActionKind.Source = 'source';
4699 /**
4700 * Base kind for an organize imports source action: `source.organizeImports`
4701 */
4702 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
4703 /**
4704 * Base kind for auto-fix source actions: `source.fixAll`.
4705 *
4706 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
4707 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
4708 *
4709 * @since 3.15.0
4710 */
4711 CodeActionKind.SourceFixAll = 'source.fixAll';
4712})(CodeActionKind || (CodeActionKind = {}));
4713/**
4714 * The CodeActionContext namespace provides helper functions to work with
4715 * [CodeActionContext](#CodeActionContext) literals.
4716 */
4717var CodeActionContext;
4718(function (CodeActionContext) {
4719 /**
4720 * Creates a new CodeActionContext literal.
4721 */
4722 function create(diagnostics, only) {
4723 var result = { diagnostics: diagnostics };
4724 if (only !== void 0 && only !== null) {
4725 result.only = only;
4726 }
4727 return result;
4728 }
4729 CodeActionContext.create = create;
4730 /**
4731 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
4732 */
4733 function is(value) {
4734 var candidate = value;
4735 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
4736 }
4737 CodeActionContext.is = is;
4738})(CodeActionContext || (CodeActionContext = {}));
4739var CodeAction;
4740(function (CodeAction) {
4741 function create(title, commandOrEdit, kind) {
4742 var result = { title: title };
4743 if (Command.is(commandOrEdit)) {
4744 result.command = commandOrEdit;
4745 }
4746 else {
4747 result.edit = commandOrEdit;
4748 }
4749 if (kind !== void 0) {
4750 result.kind = kind;
4751 }
4752 return result;
4753 }
4754 CodeAction.create = create;
4755 function is(value) {
4756 var candidate = value;
4757 return candidate && Is.string(candidate.title) &&
4758 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
4759 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
4760 (candidate.edit !== void 0 || candidate.command !== void 0) &&
4761 (candidate.command === void 0 || Command.is(candidate.command)) &&
4762 (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
4763 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
4764 }
4765 CodeAction.is = is;
4766})(CodeAction || (CodeAction = {}));
4767/**
4768 * The CodeLens namespace provides helper functions to work with
4769 * [CodeLens](#CodeLens) literals.
4770 */
4771var CodeLens;
4772(function (CodeLens) {
4773 /**
4774 * Creates a new CodeLens literal.
4775 */
4776 function create(range, data) {
4777 var result = { range: range };
4778 if (Is.defined(data)) {
4779 result.data = data;
4780 }
4781 return result;
4782 }
4783 CodeLens.create = create;
4784 /**
4785 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
4786 */
4787 function is(value) {
4788 var candidate = value;
4789 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
4790 }
4791 CodeLens.is = is;
4792})(CodeLens || (CodeLens = {}));
4793/**
4794 * The FormattingOptions namespace provides helper functions to work with
4795 * [FormattingOptions](#FormattingOptions) literals.
4796 */
4797var FormattingOptions;
4798(function (FormattingOptions) {
4799 /**
4800 * Creates a new FormattingOptions literal.
4801 */
4802 function create(tabSize, insertSpaces) {
4803 return { tabSize: tabSize, insertSpaces: insertSpaces };
4804 }
4805 FormattingOptions.create = create;
4806 /**
4807 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
4808 */
4809 function is(value) {
4810 var candidate = value;
4811 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
4812 }
4813 FormattingOptions.is = is;
4814})(FormattingOptions || (FormattingOptions = {}));
4815/**
4816 * The DocumentLink namespace provides helper functions to work with
4817 * [DocumentLink](#DocumentLink) literals.
4818 */
4819var DocumentLink;
4820(function (DocumentLink) {
4821 /**
4822 * Creates a new DocumentLink literal.
4823 */
4824 function create(range, target, data) {
4825 return { range: range, target: target, data: data };
4826 }
4827 DocumentLink.create = create;
4828 /**
4829 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
4830 */
4831 function is(value) {
4832 var candidate = value;
4833 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
4834 }
4835 DocumentLink.is = is;
4836})(DocumentLink || (DocumentLink = {}));
4837/**
4838 * The SelectionRange namespace provides helper function to work with
4839 * SelectionRange literals.
4840 */
4841var SelectionRange;
4842(function (SelectionRange) {
4843 /**
4844 * Creates a new SelectionRange
4845 * @param range the range.
4846 * @param parent an optional parent.
4847 */
4848 function create(range, parent) {
4849 return { range: range, parent: parent };
4850 }
4851 SelectionRange.create = create;
4852 function is(value) {
4853 var candidate = value;
4854 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
4855 }
4856 SelectionRange.is = is;
4857})(SelectionRange || (SelectionRange = {}));
4858var EOL = ['\n', '\r\n', '\r'];
4859/**
4860 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
4861 */
4862var TextDocument;
4863(function (TextDocument) {
4864 /**
4865 * Creates a new ITextDocument literal from the given uri and content.
4866 * @param uri The document's uri.
4867 * @param languageId The document's language Id.
4868 * @param content The document's content.
4869 */
4870 function create(uri, languageId, version, content) {
4871 return new FullTextDocument(uri, languageId, version, content);
4872 }
4873 TextDocument.create = create;
4874 /**
4875 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
4876 */
4877 function is(value) {
4878 var candidate = value;
4879 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
4880 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
4881 }
4882 TextDocument.is = is;
4883 function applyEdits(document, edits) {
4884 var text = document.getText();
4885 var sortedEdits = mergeSort(edits, function (a, b) {
4886 var diff = a.range.start.line - b.range.start.line;
4887 if (diff === 0) {
4888 return a.range.start.character - b.range.start.character;
4889 }
4890 return diff;
4891 });
4892 var lastModifiedOffset = text.length;
4893 for (var i = sortedEdits.length - 1; i >= 0; i--) {
4894 var e = sortedEdits[i];
4895 var startOffset = document.offsetAt(e.range.start);
4896 var endOffset = document.offsetAt(e.range.end);
4897 if (endOffset <= lastModifiedOffset) {
4898 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
4899 }
4900 else {
4901 throw new Error('Overlapping edit');
4902 }
4903 lastModifiedOffset = startOffset;
4904 }
4905 return text;
4906 }
4907 TextDocument.applyEdits = applyEdits;
4908 function mergeSort(data, compare) {
4909 if (data.length <= 1) {
4910 // sorted
4911 return data;
4912 }
4913 var p = (data.length / 2) | 0;
4914 var left = data.slice(0, p);
4915 var right = data.slice(p);
4916 mergeSort(left, compare);
4917 mergeSort(right, compare);
4918 var leftIdx = 0;
4919 var rightIdx = 0;
4920 var i = 0;
4921 while (leftIdx < left.length && rightIdx < right.length) {
4922 var ret = compare(left[leftIdx], right[rightIdx]);
4923 if (ret <= 0) {
4924 // smaller_equal -> take left to preserve order
4925 data[i++] = left[leftIdx++];
4926 }
4927 else {
4928 // greater -> take right
4929 data[i++] = right[rightIdx++];
4930 }
4931 }
4932 while (leftIdx < left.length) {
4933 data[i++] = left[leftIdx++];
4934 }
4935 while (rightIdx < right.length) {
4936 data[i++] = right[rightIdx++];
4937 }
4938 return data;
4939 }
4940})(TextDocument || (TextDocument = {}));
4941var FullTextDocument = /** @class */ (function () {
4942 function FullTextDocument(uri, languageId, version, content) {
4943 this._uri = uri;
4944 this._languageId = languageId;
4945 this._version = version;
4946 this._content = content;
4947 this._lineOffsets = undefined;
4948 }
4949 Object.defineProperty(FullTextDocument.prototype, "uri", {
4950 get: function () {
4951 return this._uri;
4952 },
4953 enumerable: true,
4954 configurable: true
4955 });
4956 Object.defineProperty(FullTextDocument.prototype, "languageId", {
4957 get: function () {
4958 return this._languageId;
4959 },
4960 enumerable: true,
4961 configurable: true
4962 });
4963 Object.defineProperty(FullTextDocument.prototype, "version", {
4964 get: function () {
4965 return this._version;
4966 },
4967 enumerable: true,
4968 configurable: true
4969 });
4970 FullTextDocument.prototype.getText = function (range) {
4971 if (range) {
4972 var start = this.offsetAt(range.start);
4973 var end = this.offsetAt(range.end);
4974 return this._content.substring(start, end);
4975 }
4976 return this._content;
4977 };
4978 FullTextDocument.prototype.update = function (event, version) {
4979 this._content = event.text;
4980 this._version = version;
4981 this._lineOffsets = undefined;
4982 };
4983 FullTextDocument.prototype.getLineOffsets = function () {
4984 if (this._lineOffsets === undefined) {
4985 var lineOffsets = [];
4986 var text = this._content;
4987 var isLineStart = true;
4988 for (var i = 0; i < text.length; i++) {
4989 if (isLineStart) {
4990 lineOffsets.push(i);
4991 isLineStart = false;
4992 }
4993 var ch = text.charAt(i);
4994 isLineStart = (ch === '\r' || ch === '\n');
4995 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
4996 i++;
4997 }
4998 }
4999 if (isLineStart && text.length > 0) {
5000 lineOffsets.push(text.length);
5001 }
5002 this._lineOffsets = lineOffsets;
5003 }
5004 return this._lineOffsets;
5005 };
5006 FullTextDocument.prototype.positionAt = function (offset) {
5007 offset = Math.max(Math.min(offset, this._content.length), 0);
5008 var lineOffsets = this.getLineOffsets();
5009 var low = 0, high = lineOffsets.length;
5010 if (high === 0) {
5011 return Position.create(0, offset);
5012 }
5013 while (low < high) {
5014 var mid = Math.floor((low + high) / 2);
5015 if (lineOffsets[mid] > offset) {
5016 high = mid;
5017 }
5018 else {
5019 low = mid + 1;
5020 }
5021 }
5022 // low is the least x for which the line offset is larger than the current offset
5023 // or array.length if no line offset is larger than the current offset
5024 var line = low - 1;
5025 return Position.create(line, offset - lineOffsets[line]);
5026 };
5027 FullTextDocument.prototype.offsetAt = function (position) {
5028 var lineOffsets = this.getLineOffsets();
5029 if (position.line >= lineOffsets.length) {
5030 return this._content.length;
5031 }
5032 else if (position.line < 0) {
5033 return 0;
5034 }
5035 var lineOffset = lineOffsets[position.line];
5036 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
5037 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
5038 };
5039 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
5040 get: function () {
5041 return this.getLineOffsets().length;
5042 },
5043 enumerable: true,
5044 configurable: true
5045 });
5046 return FullTextDocument;
5047}());
5048var Is;
5049(function (Is) {
5050 var toString = Object.prototype.toString;
5051 function defined(value) {
5052 return typeof value !== 'undefined';
5053 }
5054 Is.defined = defined;
5055 function undefined(value) {
5056 return typeof value === 'undefined';
5057 }
5058 Is.undefined = undefined;
5059 function boolean(value) {
5060 return value === true || value === false;
5061 }
5062 Is.boolean = boolean;
5063 function string(value) {
5064 return toString.call(value) === '[object String]';
5065 }
5066 Is.string = string;
5067 function number(value) {
5068 return toString.call(value) === '[object Number]';
5069 }
5070 Is.number = number;
5071 function func(value) {
5072 return toString.call(value) === '[object Function]';
5073 }
5074 Is.func = func;
5075 function objectLiteral(value) {
5076 // Strictly speaking class instances pass this check as well. Since the LSP
5077 // doesn't use classes we ignore this for now. If we do we need to add something
5078 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
5079 return value !== null && typeof value === 'object';
5080 }
5081 Is.objectLiteral = objectLiteral;
5082 function typedArray(value, check) {
5083 return Array.isArray(value) && value.every(check);
5084 }
5085 Is.typedArray = typedArray;
5086})(Is || (Is = {}));
5087
5088
5089/***/ }),
5090/* 19 */
5091/***/ (function(module, exports, __webpack_require__) {
5092
5093"use strict";
5094/* --------------------------------------------------------------------------------------------
5095 * Copyright (c) Microsoft Corporation. All rights reserved.
5096 * Licensed under the MIT License. See License.txt in the project root for license information.
5097 * ------------------------------------------------------------------------------------------ */
5098
5099Object.defineProperty(exports, "__esModule", { value: true });
5100const Is = __webpack_require__(20);
5101const vscode_jsonrpc_1 = __webpack_require__(4);
5102const messages_1 = __webpack_require__(21);
5103const protocol_implementation_1 = __webpack_require__(22);
5104exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
5105const protocol_typeDefinition_1 = __webpack_require__(23);
5106exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
5107const protocol_workspaceFolders_1 = __webpack_require__(24);
5108exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
5109exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
5110const protocol_configuration_1 = __webpack_require__(25);
5111exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
5112const protocol_colorProvider_1 = __webpack_require__(26);
5113exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
5114exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
5115const protocol_foldingRange_1 = __webpack_require__(27);
5116exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
5117const protocol_declaration_1 = __webpack_require__(28);
5118exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
5119const protocol_selectionRange_1 = __webpack_require__(29);
5120exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
5121const protocol_progress_1 = __webpack_require__(30);
5122exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
5123exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
5124exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
5125// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5126let __noDynamicImport;
5127/**
5128 * The DocumentFilter namespace provides helper functions to work with
5129 * [DocumentFilter](#DocumentFilter) literals.
5130 */
5131var DocumentFilter;
5132(function (DocumentFilter) {
5133 function is(value) {
5134 const candidate = value;
5135 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
5136 }
5137 DocumentFilter.is = is;
5138})(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
5139/**
5140 * The DocumentSelector namespace provides helper functions to work with
5141 * [DocumentSelector](#DocumentSelector)s.
5142 */
5143var DocumentSelector;
5144(function (DocumentSelector) {
5145 function is(value) {
5146 if (!Array.isArray(value)) {
5147 return false;
5148 }
5149 for (let elem of value) {
5150 if (!Is.string(elem) && !DocumentFilter.is(elem)) {
5151 return false;
5152 }
5153 }
5154 return true;
5155 }
5156 DocumentSelector.is = is;
5157})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
5158/**
5159 * The `client/registerCapability` request is sent from the server to the client to register a new capability
5160 * handler on the client side.
5161 */
5162var RegistrationRequest;
5163(function (RegistrationRequest) {
5164 RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
5165})(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
5166/**
5167 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
5168 * handler on the client side.
5169 */
5170var UnregistrationRequest;
5171(function (UnregistrationRequest) {
5172 UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
5173})(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
5174var ResourceOperationKind;
5175(function (ResourceOperationKind) {
5176 /**
5177 * Supports creating new files and folders.
5178 */
5179 ResourceOperationKind.Create = 'create';
5180 /**
5181 * Supports renaming existing files and folders.
5182 */
5183 ResourceOperationKind.Rename = 'rename';
5184 /**
5185 * Supports deleting existing files and folders.
5186 */
5187 ResourceOperationKind.Delete = 'delete';
5188})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
5189var FailureHandlingKind;
5190(function (FailureHandlingKind) {
5191 /**
5192 * Applying the workspace change is simply aborted if one of the changes provided
5193 * fails. All operations executed before the failing operation stay executed.
5194 */
5195 FailureHandlingKind.Abort = 'abort';
5196 /**
5197 * All operations are executed transactional. That means they either all
5198 * succeed or no changes at all are applied to the workspace.
5199 */
5200 FailureHandlingKind.Transactional = 'transactional';
5201 /**
5202 * If the workspace edit contains only textual file changes they are executed transactional.
5203 * If resource changes (create, rename or delete file) are part of the change the failure
5204 * handling startegy is abort.
5205 */
5206 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
5207 /**
5208 * The client tries to undo the operations already executed. But there is no
5209 * guarantee that this is succeeding.
5210 */
5211 FailureHandlingKind.Undo = 'undo';
5212})(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
5213/**
5214 * The StaticRegistrationOptions namespace provides helper functions to work with
5215 * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
5216 */
5217var StaticRegistrationOptions;
5218(function (StaticRegistrationOptions) {
5219 function hasId(value) {
5220 const candidate = value;
5221 return candidate && Is.string(candidate.id) && candidate.id.length > 0;
5222 }
5223 StaticRegistrationOptions.hasId = hasId;
5224})(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
5225/**
5226 * The TextDocumentRegistrationOptions namespace provides helper functions to work with
5227 * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
5228 */
5229var TextDocumentRegistrationOptions;
5230(function (TextDocumentRegistrationOptions) {
5231 function is(value) {
5232 const candidate = value;
5233 return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
5234 }
5235 TextDocumentRegistrationOptions.is = is;
5236})(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
5237/**
5238 * The WorkDoneProgressOptions namespace provides helper functions to work with
5239 * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
5240 */
5241var WorkDoneProgressOptions;
5242(function (WorkDoneProgressOptions) {
5243 function is(value) {
5244 const candidate = value;
5245 return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
5246 }
5247 WorkDoneProgressOptions.is = is;
5248 function hasWorkDoneProgress(value) {
5249 const candidate = value;
5250 return candidate && Is.boolean(candidate.workDoneProgress);
5251 }
5252 WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
5253})(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
5254/**
5255 * The initialize request is sent from the client to the server.
5256 * It is sent once as the request after starting up the server.
5257 * The requests parameter is of type [InitializeParams](#InitializeParams)
5258 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
5259 * resolves to such.
5260 */
5261var InitializeRequest;
5262(function (InitializeRequest) {
5263 InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
5264})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
5265/**
5266 * Known error codes for an `InitializeError`;
5267 */
5268var InitializeError;
5269(function (InitializeError) {
5270 /**
5271 * If the protocol version provided by the client can't be handled by the server.
5272 * @deprecated This initialize error got replaced by client capabilities. There is
5273 * no version handshake in version 3.0x
5274 */
5275 InitializeError.unknownProtocolVersion = 1;
5276})(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
5277/**
5278 * The intialized notification is sent from the client to the
5279 * server after the client is fully initialized and the server
5280 * is allowed to send requests from the server to the client.
5281 */
5282var InitializedNotification;
5283(function (InitializedNotification) {
5284 InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
5285})(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
5286//---- Shutdown Method ----
5287/**
5288 * A shutdown request is sent from the client to the server.
5289 * It is sent once when the client decides to shutdown the
5290 * server. The only notification that is sent after a shutdown request
5291 * is the exit event.
5292 */
5293var ShutdownRequest;
5294(function (ShutdownRequest) {
5295 ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
5296})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
5297//---- Exit Notification ----
5298/**
5299 * The exit event is sent from the client to the server to
5300 * ask the server to exit its process.
5301 */
5302var ExitNotification;
5303(function (ExitNotification) {
5304 ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
5305})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
5306/**
5307 * The configuration change notification is sent from the client to the server
5308 * when the client's configuration has changed. The notification contains
5309 * the changed configuration as defined by the language client.
5310 */
5311var DidChangeConfigurationNotification;
5312(function (DidChangeConfigurationNotification) {
5313 DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
5314})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
5315//---- Message show and log notifications ----
5316/**
5317 * The message type
5318 */
5319var MessageType;
5320(function (MessageType) {
5321 /**
5322 * An error message.
5323 */
5324 MessageType.Error = 1;
5325 /**
5326 * A warning message.
5327 */
5328 MessageType.Warning = 2;
5329 /**
5330 * An information message.
5331 */
5332 MessageType.Info = 3;
5333 /**
5334 * A log message.
5335 */
5336 MessageType.Log = 4;
5337})(MessageType = exports.MessageType || (exports.MessageType = {}));
5338/**
5339 * The show message notification is sent from a server to a client to ask
5340 * the client to display a particular message in the user interface.
5341 */
5342var ShowMessageNotification;
5343(function (ShowMessageNotification) {
5344 ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
5345})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
5346/**
5347 * The show message request is sent from the server to the client to show a message
5348 * and a set of options actions to the user.
5349 */
5350var ShowMessageRequest;
5351(function (ShowMessageRequest) {
5352 ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
5353})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
5354/**
5355 * The log message notification is sent from the server to the client to ask
5356 * the client to log a particular message.
5357 */
5358var LogMessageNotification;
5359(function (LogMessageNotification) {
5360 LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
5361})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
5362//---- Telemetry notification
5363/**
5364 * The telemetry event notification is sent from the server to the client to ask
5365 * the client to log telemetry data.
5366 */
5367var TelemetryEventNotification;
5368(function (TelemetryEventNotification) {
5369 TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
5370})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
5371/**
5372 * Defines how the host (editor) should sync
5373 * document changes to the language server.
5374 */
5375var TextDocumentSyncKind;
5376(function (TextDocumentSyncKind) {
5377 /**
5378 * Documents should not be synced at all.
5379 */
5380 TextDocumentSyncKind.None = 0;
5381 /**
5382 * Documents are synced by always sending the full content
5383 * of the document.
5384 */
5385 TextDocumentSyncKind.Full = 1;
5386 /**
5387 * Documents are synced by sending the full content on open.
5388 * After that only incremental updates to the document are
5389 * send.
5390 */
5391 TextDocumentSyncKind.Incremental = 2;
5392})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
5393/**
5394 * The document open notification is sent from the client to the server to signal
5395 * newly opened text documents. The document's truth is now managed by the client
5396 * and the server must not try to read the document's truth using the document's
5397 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
5398 * mean that its content is presented in an editor. An open notification must not
5399 * be sent more than once without a corresponding close notification send before.
5400 * This means open and close notification must be balanced and the max open count
5401 * is one.
5402 */
5403var DidOpenTextDocumentNotification;
5404(function (DidOpenTextDocumentNotification) {
5405 DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
5406 DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
5407})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
5408/**
5409 * The document change notification is sent from the client to the server to signal
5410 * changes to a text document.
5411 */
5412var DidChangeTextDocumentNotification;
5413(function (DidChangeTextDocumentNotification) {
5414 DidChangeTextDocumentNotification.method = 'textDocument/didChange';
5415 DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
5416})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
5417/**
5418 * The document close notification is sent from the client to the server when
5419 * the document got closed in the client. The document's truth now exists where
5420 * the document's uri points to (e.g. if the document's uri is a file uri the
5421 * truth now exists on disk). As with the open notification the close notification
5422 * is about managing the document's content. Receiving a close notification
5423 * doesn't mean that the document was open in an editor before. A close
5424 * notification requires a previous open notification to be sent.
5425 */
5426var DidCloseTextDocumentNotification;
5427(function (DidCloseTextDocumentNotification) {
5428 DidCloseTextDocumentNotification.method = 'textDocument/didClose';
5429 DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
5430})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
5431/**
5432 * The document save notification is sent from the client to the server when
5433 * the document got saved in the client.
5434 */
5435var DidSaveTextDocumentNotification;
5436(function (DidSaveTextDocumentNotification) {
5437 DidSaveTextDocumentNotification.method = 'textDocument/didSave';
5438 DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
5439})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
5440/**
5441 * Represents reasons why a text document is saved.
5442 */
5443var TextDocumentSaveReason;
5444(function (TextDocumentSaveReason) {
5445 /**
5446 * Manually triggered, e.g. by the user pressing save, by starting debugging,
5447 * or by an API call.
5448 */
5449 TextDocumentSaveReason.Manual = 1;
5450 /**
5451 * Automatic after a delay.
5452 */
5453 TextDocumentSaveReason.AfterDelay = 2;
5454 /**
5455 * When the editor lost focus.
5456 */
5457 TextDocumentSaveReason.FocusOut = 3;
5458})(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
5459/**
5460 * A document will save notification is sent from the client to the server before
5461 * the document is actually saved.
5462 */
5463var WillSaveTextDocumentNotification;
5464(function (WillSaveTextDocumentNotification) {
5465 WillSaveTextDocumentNotification.method = 'textDocument/willSave';
5466 WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
5467})(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
5468/**
5469 * A document will save request is sent from the client to the server before
5470 * the document is actually saved. The request can return an array of TextEdits
5471 * which will be applied to the text document before it is saved. Please note that
5472 * clients might drop results if computing the text edits took too long or if a
5473 * server constantly fails on this request. This is done to keep the save fast and
5474 * reliable.
5475 */
5476var WillSaveTextDocumentWaitUntilRequest;
5477(function (WillSaveTextDocumentWaitUntilRequest) {
5478 WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
5479 WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
5480})(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
5481/**
5482 * The watched files notification is sent from the client to the server when
5483 * the client detects changes to file watched by the language client.
5484 */
5485var DidChangeWatchedFilesNotification;
5486(function (DidChangeWatchedFilesNotification) {
5487 DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
5488})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
5489/**
5490 * The file event type
5491 */
5492var FileChangeType;
5493(function (FileChangeType) {
5494 /**
5495 * The file got created.
5496 */
5497 FileChangeType.Created = 1;
5498 /**
5499 * The file got changed.
5500 */
5501 FileChangeType.Changed = 2;
5502 /**
5503 * The file got deleted.
5504 */
5505 FileChangeType.Deleted = 3;
5506})(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
5507var WatchKind;
5508(function (WatchKind) {
5509 /**
5510 * Interested in create events.
5511 */
5512 WatchKind.Create = 1;
5513 /**
5514 * Interested in change events
5515 */
5516 WatchKind.Change = 2;
5517 /**
5518 * Interested in delete events
5519 */
5520 WatchKind.Delete = 4;
5521})(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
5522/**
5523 * Diagnostics notification are sent from the server to the client to signal
5524 * results of validation runs.
5525 */
5526var PublishDiagnosticsNotification;
5527(function (PublishDiagnosticsNotification) {
5528 PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
5529})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
5530/**
5531 * How a completion was triggered
5532 */
5533var CompletionTriggerKind;
5534(function (CompletionTriggerKind) {
5535 /**
5536 * Completion was triggered by typing an identifier (24x7 code
5537 * complete), manual invocation (e.g Ctrl+Space) or via API.
5538 */
5539 CompletionTriggerKind.Invoked = 1;
5540 /**
5541 * Completion was triggered by a trigger character specified by
5542 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
5543 */
5544 CompletionTriggerKind.TriggerCharacter = 2;
5545 /**
5546 * Completion was re-triggered as current completion list is incomplete
5547 */
5548 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
5549})(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
5550/**
5551 * Request to request completion at a given text document position. The request's
5552 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
5553 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
5554 * or a Thenable that resolves to such.
5555 *
5556 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
5557 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
5558 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
5559 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
5560 */
5561var CompletionRequest;
5562(function (CompletionRequest) {
5563 CompletionRequest.method = 'textDocument/completion';
5564 CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
5565 /** @deprecated Use CompletionRequest.type */
5566 CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5567})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
5568/**
5569 * Request to resolve additional information for a given completion item.The request's
5570 * parameter is of type [CompletionItem](#CompletionItem) the response
5571 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
5572 */
5573var CompletionResolveRequest;
5574(function (CompletionResolveRequest) {
5575 CompletionResolveRequest.method = 'completionItem/resolve';
5576 CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
5577})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
5578/**
5579 * Request to request hover information at a given text document position. The request's
5580 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
5581 * type [Hover](#Hover) or a Thenable that resolves to such.
5582 */
5583var HoverRequest;
5584(function (HoverRequest) {
5585 HoverRequest.method = 'textDocument/hover';
5586 HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
5587})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
5588/**
5589 * How a signature help was triggered.
5590 *
5591 * @since 3.15.0
5592 */
5593var SignatureHelpTriggerKind;
5594(function (SignatureHelpTriggerKind) {
5595 /**
5596 * Signature help was invoked manually by the user or by a command.
5597 */
5598 SignatureHelpTriggerKind.Invoked = 1;
5599 /**
5600 * Signature help was triggered by a trigger character.
5601 */
5602 SignatureHelpTriggerKind.TriggerCharacter = 2;
5603 /**
5604 * Signature help was triggered by the cursor moving or by the document content changing.
5605 */
5606 SignatureHelpTriggerKind.ContentChange = 3;
5607})(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
5608var SignatureHelpRequest;
5609(function (SignatureHelpRequest) {
5610 SignatureHelpRequest.method = 'textDocument/signatureHelp';
5611 SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
5612})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
5613/**
5614 * A request to resolve the definition location of a symbol at a given text
5615 * document position. The request's parameter is of type [TextDocumentPosition]
5616 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
5617 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
5618 * to such.
5619 */
5620var DefinitionRequest;
5621(function (DefinitionRequest) {
5622 DefinitionRequest.method = 'textDocument/definition';
5623 DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
5624 /** @deprecated Use DefinitionRequest.type */
5625 DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5626})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
5627/**
5628 * A request to resolve project-wide references for the symbol denoted
5629 * by the given text document position. The request's parameter is of
5630 * type [ReferenceParams](#ReferenceParams) the response is of type
5631 * [Location[]](#Location) or a Thenable that resolves to such.
5632 */
5633var ReferencesRequest;
5634(function (ReferencesRequest) {
5635 ReferencesRequest.method = 'textDocument/references';
5636 ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
5637 /** @deprecated Use ReferencesRequest.type */
5638 ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5639})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
5640/**
5641 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
5642 * text document position. The request's parameter is of type [TextDocumentPosition]
5643 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
5644 * (#DocumentHighlight) or a Thenable that resolves to such.
5645 */
5646var DocumentHighlightRequest;
5647(function (DocumentHighlightRequest) {
5648 DocumentHighlightRequest.method = 'textDocument/documentHighlight';
5649 DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
5650 /** @deprecated Use DocumentHighlightRequest.type */
5651 DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5652})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
5653/**
5654 * A request to list all symbols found in a given text document. The request's
5655 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
5656 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
5657 * that resolves to such.
5658 */
5659var DocumentSymbolRequest;
5660(function (DocumentSymbolRequest) {
5661 DocumentSymbolRequest.method = 'textDocument/documentSymbol';
5662 DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
5663 /** @deprecated Use DocumentSymbolRequest.type */
5664 DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5665})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
5666/**
5667 * A request to provide commands for the given text document and range.
5668 */
5669var CodeActionRequest;
5670(function (CodeActionRequest) {
5671 CodeActionRequest.method = 'textDocument/codeAction';
5672 CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
5673 /** @deprecated Use CodeActionRequest.type */
5674 CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5675})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
5676/**
5677 * A request to list project-wide symbols matching the query string given
5678 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
5679 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
5680 * resolves to such.
5681 */
5682var WorkspaceSymbolRequest;
5683(function (WorkspaceSymbolRequest) {
5684 WorkspaceSymbolRequest.method = 'workspace/symbol';
5685 WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
5686 /** @deprecated Use WorkspaceSymbolRequest.type */
5687 WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5688})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
5689/**
5690 * A request to provide code lens for the given text document.
5691 */
5692var CodeLensRequest;
5693(function (CodeLensRequest) {
5694 CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
5695 /** @deprecated Use CodeLensRequest.type */
5696 CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5697})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
5698/**
5699 * A request to resolve a command for a given code lens.
5700 */
5701var CodeLensResolveRequest;
5702(function (CodeLensResolveRequest) {
5703 CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
5704})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
5705/**
5706 * A request to provide document links
5707 */
5708var DocumentLinkRequest;
5709(function (DocumentLinkRequest) {
5710 DocumentLinkRequest.method = 'textDocument/documentLink';
5711 DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
5712 /** @deprecated Use DocumentLinkRequest.type */
5713 DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5714})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
5715/**
5716 * Request to resolve additional information for a given document link. The request's
5717 * parameter is of type [DocumentLink](#DocumentLink) the response
5718 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
5719 */
5720var DocumentLinkResolveRequest;
5721(function (DocumentLinkResolveRequest) {
5722 DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
5723})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
5724/**
5725 * A request to to format a whole document.
5726 */
5727var DocumentFormattingRequest;
5728(function (DocumentFormattingRequest) {
5729 DocumentFormattingRequest.method = 'textDocument/formatting';
5730 DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
5731})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
5732/**
5733 * A request to to format a range in a document.
5734 */
5735var DocumentRangeFormattingRequest;
5736(function (DocumentRangeFormattingRequest) {
5737 DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
5738 DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
5739})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
5740/**
5741 * A request to format a document on type.
5742 */
5743var DocumentOnTypeFormattingRequest;
5744(function (DocumentOnTypeFormattingRequest) {
5745 DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
5746 DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
5747})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
5748/**
5749 * A request to rename a symbol.
5750 */
5751var RenameRequest;
5752(function (RenameRequest) {
5753 RenameRequest.method = 'textDocument/rename';
5754 RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
5755})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
5756/**
5757 * A request to test and perform the setup necessary for a rename.
5758 */
5759var PrepareRenameRequest;
5760(function (PrepareRenameRequest) {
5761 PrepareRenameRequest.method = 'textDocument/prepareRename';
5762 PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
5763})(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
5764/**
5765 * A request send from the client to the server to execute a command. The request might return
5766 * a workspace edit which the client will apply to the workspace.
5767 */
5768var ExecuteCommandRequest;
5769(function (ExecuteCommandRequest) {
5770 ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
5771})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
5772/**
5773 * A request sent from the server to the client to modified certain resources.
5774 */
5775var ApplyWorkspaceEditRequest;
5776(function (ApplyWorkspaceEditRequest) {
5777 ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
5778})(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
5779
5780
5781/***/ }),
5782/* 20 */
5783/***/ (function(module, exports, __webpack_require__) {
5784
5785"use strict";
5786/* --------------------------------------------------------------------------------------------
5787 * Copyright (c) Microsoft Corporation. All rights reserved.
5788 * Licensed under the MIT License. See License.txt in the project root for license information.
5789 * ------------------------------------------------------------------------------------------ */
5790
5791Object.defineProperty(exports, "__esModule", { value: true });
5792function boolean(value) {
5793 return value === true || value === false;
5794}
5795exports.boolean = boolean;
5796function string(value) {
5797 return typeof value === 'string' || value instanceof String;
5798}
5799exports.string = string;
5800function number(value) {
5801 return typeof value === 'number' || value instanceof Number;
5802}
5803exports.number = number;
5804function error(value) {
5805 return value instanceof Error;
5806}
5807exports.error = error;
5808function func(value) {
5809 return typeof value === 'function';
5810}
5811exports.func = func;
5812function array(value) {
5813 return Array.isArray(value);
5814}
5815exports.array = array;
5816function stringArray(value) {
5817 return array(value) && value.every(elem => string(elem));
5818}
5819exports.stringArray = stringArray;
5820function typedArray(value, check) {
5821 return Array.isArray(value) && value.every(check);
5822}
5823exports.typedArray = typedArray;
5824function objectLiteral(value) {
5825 // Strictly speaking class instances pass this check as well. Since the LSP
5826 // doesn't use classes we ignore this for now. If we do we need to add something
5827 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
5828 return value !== null && typeof value === 'object';
5829}
5830exports.objectLiteral = objectLiteral;
5831
5832
5833/***/ }),
5834/* 21 */
5835/***/ (function(module, exports, __webpack_require__) {
5836
5837"use strict";
5838/* --------------------------------------------------------------------------------------------
5839 * Copyright (c) Microsoft Corporation. All rights reserved.
5840 * Licensed under the MIT License. See License.txt in the project root for license information.
5841 * ------------------------------------------------------------------------------------------ */
5842
5843Object.defineProperty(exports, "__esModule", { value: true });
5844const vscode_jsonrpc_1 = __webpack_require__(4);
5845class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
5846 constructor(method) {
5847 super(method);
5848 }
5849}
5850exports.ProtocolRequestType0 = ProtocolRequestType0;
5851class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
5852 constructor(method) {
5853 super(method);
5854 }
5855}
5856exports.ProtocolRequestType = ProtocolRequestType;
5857class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
5858 constructor(method) {
5859 super(method);
5860 }
5861}
5862exports.ProtocolNotificationType = ProtocolNotificationType;
5863class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
5864 constructor(method) {
5865 super(method);
5866 }
5867}
5868exports.ProtocolNotificationType0 = ProtocolNotificationType0;
5869
5870
5871/***/ }),
5872/* 22 */
5873/***/ (function(module, exports, __webpack_require__) {
5874
5875"use strict";
5876/* --------------------------------------------------------------------------------------------
5877 * Copyright (c) Microsoft Corporation. All rights reserved.
5878 * Licensed under the MIT License. See License.txt in the project root for license information.
5879 * ------------------------------------------------------------------------------------------ */
5880
5881Object.defineProperty(exports, "__esModule", { value: true });
5882const vscode_jsonrpc_1 = __webpack_require__(4);
5883const messages_1 = __webpack_require__(21);
5884// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5885let __noDynamicImport;
5886/**
5887 * A request to resolve the implementation locations of a symbol at a given text
5888 * document position. The request's parameter is of type [TextDocumentPositioParams]
5889 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5890 * Thenable that resolves to such.
5891 */
5892var ImplementationRequest;
5893(function (ImplementationRequest) {
5894 ImplementationRequest.method = 'textDocument/implementation';
5895 ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
5896 /** @deprecated Use ImplementationRequest.type */
5897 ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5898})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
5899
5900
5901/***/ }),
5902/* 23 */
5903/***/ (function(module, exports, __webpack_require__) {
5904
5905"use strict";
5906/* --------------------------------------------------------------------------------------------
5907 * Copyright (c) Microsoft Corporation. All rights reserved.
5908 * Licensed under the MIT License. See License.txt in the project root for license information.
5909 * ------------------------------------------------------------------------------------------ */
5910
5911Object.defineProperty(exports, "__esModule", { value: true });
5912const vscode_jsonrpc_1 = __webpack_require__(4);
5913const messages_1 = __webpack_require__(21);
5914// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5915let __noDynamicImport;
5916/**
5917 * A request to resolve the type definition locations of a symbol at a given text
5918 * document position. The request's parameter is of type [TextDocumentPositioParams]
5919 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5920 * Thenable that resolves to such.
5921 */
5922var TypeDefinitionRequest;
5923(function (TypeDefinitionRequest) {
5924 TypeDefinitionRequest.method = 'textDocument/typeDefinition';
5925 TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
5926 /** @deprecated Use TypeDefinitionRequest.type */
5927 TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5928})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
5929
5930
5931/***/ }),
5932/* 24 */
5933/***/ (function(module, exports, __webpack_require__) {
5934
5935"use strict";
5936/* --------------------------------------------------------------------------------------------
5937 * Copyright (c) Microsoft Corporation. All rights reserved.
5938 * Licensed under the MIT License. See License.txt in the project root for license information.
5939 * ------------------------------------------------------------------------------------------ */
5940
5941Object.defineProperty(exports, "__esModule", { value: true });
5942const messages_1 = __webpack_require__(21);
5943/**
5944 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
5945 */
5946var WorkspaceFoldersRequest;
5947(function (WorkspaceFoldersRequest) {
5948 WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
5949})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
5950/**
5951 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
5952 * folder configuration changes.
5953 */
5954var DidChangeWorkspaceFoldersNotification;
5955(function (DidChangeWorkspaceFoldersNotification) {
5956 DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
5957})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
5958
5959
5960/***/ }),
5961/* 25 */
5962/***/ (function(module, exports, __webpack_require__) {
5963
5964"use strict";
5965/* --------------------------------------------------------------------------------------------
5966 * Copyright (c) Microsoft Corporation. All rights reserved.
5967 * Licensed under the MIT License. See License.txt in the project root for license information.
5968 * ------------------------------------------------------------------------------------------ */
5969
5970Object.defineProperty(exports, "__esModule", { value: true });
5971const messages_1 = __webpack_require__(21);
5972/**
5973 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
5974 * configuration setting.
5975 *
5976 * This pull model replaces the old push model were the client signaled configuration change via an
5977 * event. If the server still needs to react to configuration changes (since the server caches the
5978 * result of `workspace/configuration` requests) the server should register for an empty configuration
5979 * change event and empty the cache if such an event is received.
5980 */
5981var ConfigurationRequest;
5982(function (ConfigurationRequest) {
5983 ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
5984})(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
5985
5986
5987/***/ }),
5988/* 26 */
5989/***/ (function(module, exports, __webpack_require__) {
5990
5991"use strict";
5992/* --------------------------------------------------------------------------------------------
5993 * Copyright (c) Microsoft Corporation. All rights reserved.
5994 * Licensed under the MIT License. See License.txt in the project root for license information.
5995 * ------------------------------------------------------------------------------------------ */
5996
5997Object.defineProperty(exports, "__esModule", { value: true });
5998const vscode_jsonrpc_1 = __webpack_require__(4);
5999const messages_1 = __webpack_require__(21);
6000/**
6001 * A request to list all color symbols found in a given text document. The request's
6002 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
6003 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6004 * that resolves to such.
6005 */
6006var DocumentColorRequest;
6007(function (DocumentColorRequest) {
6008 DocumentColorRequest.method = 'textDocument/documentColor';
6009 DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
6010 /** @deprecated Use DocumentColorRequest.type */
6011 DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6012})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
6013/**
6014 * A request to list all presentation for a color. The request's
6015 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
6016 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6017 * that resolves to such.
6018 */
6019var ColorPresentationRequest;
6020(function (ColorPresentationRequest) {
6021 ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
6022})(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
6023
6024
6025/***/ }),
6026/* 27 */
6027/***/ (function(module, exports, __webpack_require__) {
6028
6029"use strict";
6030
6031/*---------------------------------------------------------------------------------------------
6032 * Copyright (c) Microsoft Corporation. All rights reserved.
6033 * Licensed under the MIT License. See License.txt in the project root for license information.
6034 *--------------------------------------------------------------------------------------------*/
6035Object.defineProperty(exports, "__esModule", { value: true });
6036const vscode_jsonrpc_1 = __webpack_require__(4);
6037const messages_1 = __webpack_require__(21);
6038/**
6039 * Enum of known range kinds
6040 */
6041var FoldingRangeKind;
6042(function (FoldingRangeKind) {
6043 /**
6044 * Folding range for a comment
6045 */
6046 FoldingRangeKind["Comment"] = "comment";
6047 /**
6048 * Folding range for a imports or includes
6049 */
6050 FoldingRangeKind["Imports"] = "imports";
6051 /**
6052 * Folding range for a region (e.g. `#region`)
6053 */
6054 FoldingRangeKind["Region"] = "region";
6055})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
6056/**
6057 * A request to provide folding ranges in a document. The request's
6058 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
6059 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
6060 * that resolves to such.
6061 */
6062var FoldingRangeRequest;
6063(function (FoldingRangeRequest) {
6064 FoldingRangeRequest.method = 'textDocument/foldingRange';
6065 FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
6066 /** @deprecated Use FoldingRangeRequest.type */
6067 FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6068})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
6069
6070
6071/***/ }),
6072/* 28 */
6073/***/ (function(module, exports, __webpack_require__) {
6074
6075"use strict";
6076/* --------------------------------------------------------------------------------------------
6077 * Copyright (c) Microsoft Corporation. All rights reserved.
6078 * Licensed under the MIT License. See License.txt in the project root for license information.
6079 * ------------------------------------------------------------------------------------------ */
6080
6081Object.defineProperty(exports, "__esModule", { value: true });
6082const vscode_jsonrpc_1 = __webpack_require__(4);
6083const messages_1 = __webpack_require__(21);
6084// @ts-ignore: to avoid inlining LocatioLink as dynamic import
6085let __noDynamicImport;
6086/**
6087 * A request to resolve the type definition locations of a symbol at a given text
6088 * document position. The request's parameter is of type [TextDocumentPositioParams]
6089 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
6090 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
6091 * to such.
6092 */
6093var DeclarationRequest;
6094(function (DeclarationRequest) {
6095 DeclarationRequest.method = 'textDocument/declaration';
6096 DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
6097 /** @deprecated Use DeclarationRequest.type */
6098 DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6099})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
6100
6101
6102/***/ }),
6103/* 29 */
6104/***/ (function(module, exports, __webpack_require__) {
6105
6106"use strict";
6107
6108/*---------------------------------------------------------------------------------------------
6109 * Copyright (c) Microsoft Corporation. All rights reserved.
6110 * Licensed under the MIT License. See License.txt in the project root for license information.
6111 *--------------------------------------------------------------------------------------------*/
6112Object.defineProperty(exports, "__esModule", { value: true });
6113const vscode_jsonrpc_1 = __webpack_require__(4);
6114const messages_1 = __webpack_require__(21);
6115/**
6116 * A request to provide selection ranges in a document. The request's
6117 * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
6118 * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
6119 * that resolves to such.
6120 */
6121var SelectionRangeRequest;
6122(function (SelectionRangeRequest) {
6123 SelectionRangeRequest.method = 'textDocument/selectionRange';
6124 SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
6125 /** @deprecated Use SelectionRangeRequest.type */
6126 SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6127})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
6128
6129
6130/***/ }),
6131/* 30 */
6132/***/ (function(module, exports, __webpack_require__) {
6133
6134"use strict";
6135/* --------------------------------------------------------------------------------------------
6136 * Copyright (c) Microsoft Corporation. All rights reserved.
6137 * Licensed under the MIT License. See License.txt in the project root for license information.
6138 * ------------------------------------------------------------------------------------------ */
6139
6140Object.defineProperty(exports, "__esModule", { value: true });
6141const vscode_jsonrpc_1 = __webpack_require__(4);
6142const messages_1 = __webpack_require__(21);
6143var WorkDoneProgress;
6144(function (WorkDoneProgress) {
6145 WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
6146})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
6147/**
6148 * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
6149 * reporting from the server.
6150 */
6151var WorkDoneProgressCreateRequest;
6152(function (WorkDoneProgressCreateRequest) {
6153 WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
6154})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
6155/**
6156 * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
6157 * initiated on the server side.
6158 */
6159var WorkDoneProgressCancelNotification;
6160(function (WorkDoneProgressCancelNotification) {
6161 WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
6162})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
6163
6164
6165/***/ }),
6166/* 31 */
6167/***/ (function(module, exports, __webpack_require__) {
6168
6169"use strict";
6170/* --------------------------------------------------------------------------------------------
6171 * Copyright (c) TypeFox and others. All rights reserved.
6172 * Licensed under the MIT License. See License.txt in the project root for license information.
6173 * ------------------------------------------------------------------------------------------ */
6174
6175Object.defineProperty(exports, "__esModule", { value: true });
6176const messages_1 = __webpack_require__(21);
6177/**
6178 * A request to result a `CallHierarchyItem` in a document at a given position.
6179 * Can be used as an input to a incoming or outgoing call hierarchy.
6180 *
6181 * @since 3.16.0 - Proposed state
6182 */
6183var CallHierarchyPrepareRequest;
6184(function (CallHierarchyPrepareRequest) {
6185 CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
6186 CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
6187})(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
6188/**
6189 * A request to resolve the incoming calls for a given `CallHierarchyItem`.
6190 *
6191 * @since 3.16.0 - Proposed state
6192 */
6193var CallHierarchyIncomingCallsRequest;
6194(function (CallHierarchyIncomingCallsRequest) {
6195 CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
6196 CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
6197})(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
6198/**
6199 * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
6200 *
6201 * @since 3.16.0 - Proposed state
6202 */
6203var CallHierarchyOutgoingCallsRequest;
6204(function (CallHierarchyOutgoingCallsRequest) {
6205 CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
6206 CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
6207})(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
6208
6209
6210/***/ }),
6211/* 32 */
6212/***/ (function(module, exports, __webpack_require__) {
6213
6214"use strict";
6215/* --------------------------------------------------------------------------------------------
6216 * Copyright (c) Microsoft Corporation. All rights reserved.
6217 * Licensed under the MIT License. See License.txt in the project root for license information.
6218 * ------------------------------------------------------------------------------------------ */
6219
6220Object.defineProperty(exports, "__esModule", { value: true });
6221const messages_1 = __webpack_require__(21);
6222/**
6223 * A set of predefined token types. This set is not fixed
6224 * an clients can specify additional token types via the
6225 * corresponding client capabilities.
6226 *
6227 * @since 3.16.0 - Proposed state
6228 */
6229var SemanticTokenTypes;
6230(function (SemanticTokenTypes) {
6231 SemanticTokenTypes["comment"] = "comment";
6232 SemanticTokenTypes["keyword"] = "keyword";
6233 SemanticTokenTypes["string"] = "string";
6234 SemanticTokenTypes["number"] = "number";
6235 SemanticTokenTypes["regexp"] = "regexp";
6236 SemanticTokenTypes["operator"] = "operator";
6237 SemanticTokenTypes["namespace"] = "namespace";
6238 SemanticTokenTypes["type"] = "type";
6239 SemanticTokenTypes["struct"] = "struct";
6240 SemanticTokenTypes["class"] = "class";
6241 SemanticTokenTypes["interface"] = "interface";
6242 SemanticTokenTypes["enum"] = "enum";
6243 SemanticTokenTypes["typeParameter"] = "typeParameter";
6244 SemanticTokenTypes["function"] = "function";
6245 SemanticTokenTypes["member"] = "member";
6246 SemanticTokenTypes["property"] = "property";
6247 SemanticTokenTypes["macro"] = "macro";
6248 SemanticTokenTypes["variable"] = "variable";
6249 SemanticTokenTypes["parameter"] = "parameter";
6250 SemanticTokenTypes["label"] = "label";
6251})(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
6252/**
6253 * A set of predefined token modifiers. This set is not fixed
6254 * an clients can specify additional token types via the
6255 * corresponding client capabilities.
6256 *
6257 * @since 3.16.0 - Proposed state
6258 */
6259var SemanticTokenModifiers;
6260(function (SemanticTokenModifiers) {
6261 SemanticTokenModifiers["documentation"] = "documentation";
6262 SemanticTokenModifiers["declaration"] = "declaration";
6263 SemanticTokenModifiers["definition"] = "definition";
6264 SemanticTokenModifiers["reference"] = "reference";
6265 SemanticTokenModifiers["static"] = "static";
6266 SemanticTokenModifiers["abstract"] = "abstract";
6267 SemanticTokenModifiers["deprecated"] = "deprecated";
6268 SemanticTokenModifiers["async"] = "async";
6269 SemanticTokenModifiers["volatile"] = "volatile";
6270 SemanticTokenModifiers["readonly"] = "readonly";
6271})(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
6272/**
6273 * @since 3.16.0 - Proposed state
6274 */
6275var SemanticTokens;
6276(function (SemanticTokens) {
6277 function is(value) {
6278 const candidate = value;
6279 return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
6280 Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
6281 }
6282 SemanticTokens.is = is;
6283})(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
6284/**
6285 * @since 3.16.0 - Proposed state
6286 */
6287var SemanticTokensRequest;
6288(function (SemanticTokensRequest) {
6289 SemanticTokensRequest.method = 'textDocument/semanticTokens';
6290 SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
6291})(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
6292/**
6293 * @since 3.16.0 - Proposed state
6294 */
6295var SemanticTokensEditsRequest;
6296(function (SemanticTokensEditsRequest) {
6297 SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
6298 SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
6299})(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
6300/**
6301 * @since 3.16.0 - Proposed state
6302 */
6303var SemanticTokensRangeRequest;
6304(function (SemanticTokensRangeRequest) {
6305 SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
6306 SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
6307})(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
6308
6309
6310/***/ }),
6311/* 33 */
6312/***/ (function(module, exports, __webpack_require__) {
6313
6314"use strict";
6315/* --------------------------------------------------------------------------------------------
6316 * Copyright (c) Microsoft Corporation. All rights reserved.
6317 * Licensed under the MIT License. See License.txt in the project root for license information.
6318 * ------------------------------------------------------------------------------------------ */
6319
6320Object.defineProperty(exports, "__esModule", { value: true });
6321const vscode_languageserver_protocol_1 = __webpack_require__(3);
6322const Is = __webpack_require__(34);
6323exports.ConfigurationFeature = (Base) => {
6324 return class extends Base {
6325 getConfiguration(arg) {
6326 if (!arg) {
6327 return this._getConfiguration({});
6328 }
6329 else if (Is.string(arg)) {
6330 return this._getConfiguration({ section: arg });
6331 }
6332 else {
6333 return this._getConfiguration(arg);
6334 }
6335 }
6336 _getConfiguration(arg) {
6337 let params = {
6338 items: Array.isArray(arg) ? arg : [arg]
6339 };
6340 return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
6341 return Array.isArray(arg) ? result : result[0];
6342 });
6343 }
6344 };
6345};
6346//# sourceMappingURL=configuration.js.map
6347
6348/***/ }),
6349/* 34 */
6350/***/ (function(module, exports, __webpack_require__) {
6351
6352"use strict";
6353/* --------------------------------------------------------------------------------------------
6354 * Copyright (c) Microsoft Corporation. All rights reserved.
6355 * Licensed under the MIT License. See License.txt in the project root for license information.
6356 * ------------------------------------------------------------------------------------------ */
6357
6358Object.defineProperty(exports, "__esModule", { value: true });
6359function boolean(value) {
6360 return value === true || value === false;
6361}
6362exports.boolean = boolean;
6363function string(value) {
6364 return typeof value === 'string' || value instanceof String;
6365}
6366exports.string = string;
6367function number(value) {
6368 return typeof value === 'number' || value instanceof Number;
6369}
6370exports.number = number;
6371function error(value) {
6372 return value instanceof Error;
6373}
6374exports.error = error;
6375function func(value) {
6376 return typeof value === 'function';
6377}
6378exports.func = func;
6379function array(value) {
6380 return Array.isArray(value);
6381}
6382exports.array = array;
6383function stringArray(value) {
6384 return array(value) && value.every(elem => string(elem));
6385}
6386exports.stringArray = stringArray;
6387function typedArray(value, check) {
6388 return Array.isArray(value) && value.every(check);
6389}
6390exports.typedArray = typedArray;
6391function thenable(value) {
6392 return value && func(value.then);
6393}
6394exports.thenable = thenable;
6395//# sourceMappingURL=is.js.map
6396
6397/***/ }),
6398/* 35 */
6399/***/ (function(module, exports, __webpack_require__) {
6400
6401"use strict";
6402/* --------------------------------------------------------------------------------------------
6403 * Copyright (c) Microsoft Corporation. All rights reserved.
6404 * Licensed under the MIT License. See License.txt in the project root for license information.
6405 * ------------------------------------------------------------------------------------------ */
6406
6407Object.defineProperty(exports, "__esModule", { value: true });
6408const vscode_languageserver_protocol_1 = __webpack_require__(3);
6409exports.WorkspaceFoldersFeature = (Base) => {
6410 return class extends Base {
6411 initialize(capabilities) {
6412 let workspaceCapabilities = capabilities.workspace;
6413 if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
6414 this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
6415 this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
6416 this._onDidChangeWorkspaceFolders.fire(params.event);
6417 });
6418 }
6419 }
6420 getWorkspaceFolders() {
6421 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
6422 }
6423 get onDidChangeWorkspaceFolders() {
6424 if (!this._onDidChangeWorkspaceFolders) {
6425 throw new Error('Client doesn\'t support sending workspace folder change events.');
6426 }
6427 if (!this._unregistration) {
6428 this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
6429 }
6430 return this._onDidChangeWorkspaceFolders.event;
6431 }
6432 };
6433};
6434//# sourceMappingURL=workspaceFolders.js.map
6435
6436/***/ }),
6437/* 36 */
6438/***/ (function(module, exports, __webpack_require__) {
6439
6440"use strict";
6441/* --------------------------------------------------------------------------------------------
6442 * Copyright (c) Microsoft Corporation. All rights reserved.
6443 * Licensed under the MIT License. See License.txt in the project root for license information.
6444 * ------------------------------------------------------------------------------------------ */
6445
6446Object.defineProperty(exports, "__esModule", { value: true });
6447const vscode_languageserver_protocol_1 = __webpack_require__(3);
6448const uuid_1 = __webpack_require__(37);
6449class WorkDoneProgressImpl {
6450 constructor(_connection, _token) {
6451 this._connection = _connection;
6452 this._token = _token;
6453 WorkDoneProgressImpl.Instances.set(this._token, this);
6454 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
6455 }
6456 get token() {
6457 return this._source.token;
6458 }
6459 begin(title, percentage, message, cancellable) {
6460 let param = {
6461 kind: 'begin',
6462 title,
6463 percentage,
6464 message,
6465 cancellable
6466 };
6467 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
6468 }
6469 report(arg0, arg1) {
6470 let param = {
6471 kind: 'report'
6472 };
6473 if (typeof arg0 === 'number') {
6474 param.percentage = arg0;
6475 if (arg1 !== undefined) {
6476 param.message = arg1;
6477 }
6478 }
6479 else {
6480 param.message = arg0;
6481 }
6482 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
6483 }
6484 done() {
6485 WorkDoneProgressImpl.Instances.delete(this._token);
6486 this._source.dispose();
6487 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' });
6488 }
6489 cancel() {
6490 this._source.cancel();
6491 }
6492}
6493WorkDoneProgressImpl.Instances = new Map();
6494class NullProgress {
6495 constructor() {
6496 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
6497 }
6498 get token() {
6499 return this._source.token;
6500 }
6501 begin() {
6502 }
6503 report() {
6504 }
6505 done() {
6506 }
6507}
6508function attachWorkDone(connection, params) {
6509 if (params === undefined || params.workDoneToken === undefined) {
6510 return new NullProgress();
6511 }
6512 const token = params.workDoneToken;
6513 delete params.workDoneToken;
6514 return new WorkDoneProgressImpl(connection, token);
6515}
6516exports.attachWorkDone = attachWorkDone;
6517exports.ProgressFeature = (Base) => {
6518 return class extends Base {
6519 initialize(capabilities) {
6520 var _a;
6521 if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) {
6522 this._progressSupported = true;
6523 this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
6524 let progress = WorkDoneProgressImpl.Instances.get(params.token);
6525 if (progress !== undefined) {
6526 progress.cancel();
6527 }
6528 });
6529 }
6530 }
6531 attachWorkDoneProgress(token) {
6532 if (token === undefined) {
6533 return new NullProgress();
6534 }
6535 else {
6536 return new WorkDoneProgressImpl(this.connection, token);
6537 }
6538 }
6539 createWorkDoneProgress() {
6540 if (this._progressSupported) {
6541 const token = uuid_1.generateUuid();
6542 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
6543 const result = new WorkDoneProgressImpl(this.connection, token);
6544 return result;
6545 });
6546 }
6547 else {
6548 return Promise.resolve(new NullProgress());
6549 }
6550 }
6551 };
6552};
6553var ResultProgress;
6554(function (ResultProgress) {
6555 ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType();
6556})(ResultProgress || (ResultProgress = {}));
6557class ResultProgressImpl {
6558 constructor(_connection, _token) {
6559 this._connection = _connection;
6560 this._token = _token;
6561 }
6562 report(data) {
6563 this._connection.sendProgress(ResultProgress.type, this._token, data);
6564 }
6565}
6566function attachPartialResult(connection, params) {
6567 if (params === undefined || params.partialResultToken === undefined) {
6568 return undefined;
6569 }
6570 const token = params.partialResultToken;
6571 delete params.partialResultToken;
6572 return new ResultProgressImpl(connection, token);
6573}
6574exports.attachPartialResult = attachPartialResult;
6575//# sourceMappingURL=progress.js.map
6576
6577/***/ }),
6578/* 37 */
6579/***/ (function(module, exports, __webpack_require__) {
6580
6581"use strict";
6582/*---------------------------------------------------------------------------------------------
6583 * Copyright (c) Microsoft Corporation. All rights reserved.
6584 * Licensed under the MIT License. See License.txt in the project root for license information.
6585 *--------------------------------------------------------------------------------------------*/
6586
6587Object.defineProperty(exports, "__esModule", { value: true });
6588class ValueUUID {
6589 constructor(_value) {
6590 this._value = _value;
6591 // empty
6592 }
6593 asHex() {
6594 return this._value;
6595 }
6596 equals(other) {
6597 return this.asHex() === other.asHex();
6598 }
6599}
6600class V4UUID extends ValueUUID {
6601 constructor() {
6602 super([
6603 V4UUID._randomHex(),
6604 V4UUID._randomHex(),
6605 V4UUID._randomHex(),
6606 V4UUID._randomHex(),
6607 V4UUID._randomHex(),
6608 V4UUID._randomHex(),
6609 V4UUID._randomHex(),
6610 V4UUID._randomHex(),
6611 '-',
6612 V4UUID._randomHex(),
6613 V4UUID._randomHex(),
6614 V4UUID._randomHex(),
6615 V4UUID._randomHex(),
6616 '-',
6617 '4',
6618 V4UUID._randomHex(),
6619 V4UUID._randomHex(),
6620 V4UUID._randomHex(),
6621 '-',
6622 V4UUID._oneOf(V4UUID._timeHighBits),
6623 V4UUID._randomHex(),
6624 V4UUID._randomHex(),
6625 V4UUID._randomHex(),
6626 '-',
6627 V4UUID._randomHex(),
6628 V4UUID._randomHex(),
6629 V4UUID._randomHex(),
6630 V4UUID._randomHex(),
6631 V4UUID._randomHex(),
6632 V4UUID._randomHex(),
6633 V4UUID._randomHex(),
6634 V4UUID._randomHex(),
6635 V4UUID._randomHex(),
6636 V4UUID._randomHex(),
6637 V4UUID._randomHex(),
6638 V4UUID._randomHex(),
6639 ].join(''));
6640 }
6641 static _oneOf(array) {
6642 return array[Math.floor(array.length * Math.random())];
6643 }
6644 static _randomHex() {
6645 return V4UUID._oneOf(V4UUID._chars);
6646 }
6647}
6648V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
6649V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
6650/**
6651 * An empty UUID that contains only zeros.
6652 */
6653exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
6654function v4() {
6655 return new V4UUID();
6656}
6657exports.v4 = v4;
6658const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
6659function isUUID(value) {
6660 return _UUIDPattern.test(value);
6661}
6662exports.isUUID = isUUID;
6663/**
6664 * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
6665 * @param value A uuid string.
6666 */
6667function parse(value) {
6668 if (!isUUID(value)) {
6669 throw new Error('invalid uuid');
6670 }
6671 return new ValueUUID(value);
6672}
6673exports.parse = parse;
6674function generateUuid() {
6675 return v4().asHex();
6676}
6677exports.generateUuid = generateUuid;
6678//# sourceMappingURL=uuid.js.map
6679
6680/***/ }),
6681/* 38 */
6682/***/ (function(module, exports, __webpack_require__) {
6683
6684"use strict";
6685/* --------------------------------------------------------------------------------------------
6686 * Copyright (c) Microsoft Corporation. All rights reserved.
6687 * Licensed under the MIT License. See License.txt in the project root for license information.
6688 * ------------------------------------------------------------------------------------------ */
6689
6690Object.defineProperty(exports, "__esModule", { value: true });
6691const url = __webpack_require__(39);
6692const path = __webpack_require__(13);
6693const fs = __webpack_require__(40);
6694const child_process_1 = __webpack_require__(41);
6695/**
6696 * @deprecated Use the `vscode-uri` npm module which provides a more
6697 * complete implementation of handling VS Code URIs.
6698 */
6699function uriToFilePath(uri) {
6700 let parsed = url.parse(uri);
6701 if (parsed.protocol !== 'file:' || !parsed.path) {
6702 return undefined;
6703 }
6704 let segments = parsed.path.split('/');
6705 for (var i = 0, len = segments.length; i < len; i++) {
6706 segments[i] = decodeURIComponent(segments[i]);
6707 }
6708 if (process.platform === 'win32' && segments.length > 1) {
6709 let first = segments[0];
6710 let second = segments[1];
6711 // Do we have a drive letter and we started with a / which is the
6712 // case if the first segement is empty (see split above)
6713 if (first.length === 0 && second.length > 1 && second[1] === ':') {
6714 // Remove first slash
6715 segments.shift();
6716 }
6717 }
6718 return path.normalize(segments.join('/'));
6719}
6720exports.uriToFilePath = uriToFilePath;
6721function isWindows() {
6722 return process.platform === 'win32';
6723}
6724function resolve(moduleName, nodePath, cwd, tracer) {
6725 const nodePathKey = 'NODE_PATH';
6726 const app = [
6727 'var p = process;',
6728 'p.on(\'message\',function(m){',
6729 'if(m.c===\'e\'){',
6730 'p.exit(0);',
6731 '}',
6732 'else if(m.c===\'rs\'){',
6733 'try{',
6734 'var r=require.resolve(m.a);',
6735 'p.send({c:\'r\',s:true,r:r});',
6736 '}',
6737 'catch(err){',
6738 'p.send({c:\'r\',s:false});',
6739 '}',
6740 '}',
6741 '});'
6742 ].join('');
6743 return new Promise((resolve, reject) => {
6744 let env = process.env;
6745 let newEnv = Object.create(null);
6746 Object.keys(env).forEach(key => newEnv[key] = env[key]);
6747 if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) {
6748 if (newEnv[nodePathKey]) {
6749 newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
6750 }
6751 else {
6752 newEnv[nodePathKey] = nodePath;
6753 }
6754 if (tracer) {
6755 tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
6756 }
6757 }
6758 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
6759 try {
6760 let cp = child_process_1.fork('', [], {
6761 cwd: cwd,
6762 env: newEnv,
6763 execArgv: ['-e', app]
6764 });
6765 if (cp.pid === void 0) {
6766 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
6767 return;
6768 }
6769 cp.on('error', (error) => {
6770 reject(error);
6771 });
6772 cp.on('message', (message) => {
6773 if (message.c === 'r') {
6774 cp.send({ c: 'e' });
6775 if (message.s) {
6776 resolve(message.r);
6777 }
6778 else {
6779 reject(new Error(`Failed to resolve module: ${moduleName}`));
6780 }
6781 }
6782 });
6783 let message = {
6784 c: 'rs',
6785 a: moduleName
6786 };
6787 cp.send(message);
6788 }
6789 catch (error) {
6790 reject(error);
6791 }
6792 });
6793}
6794exports.resolve = resolve;
6795/**
6796 * Resolve the global npm package path.
6797 * @deprecated Since this depends on the used package manager and their version the best is that servers
6798 * implement this themselves since they know best what kind of package managers to support.
6799 * @param tracer the tracer to use
6800 */
6801function resolveGlobalNodePath(tracer) {
6802 let npmCommand = 'npm';
6803 const env = Object.create(null);
6804 Object.keys(process.env).forEach(key => env[key] = process.env[key]);
6805 env['NO_UPDATE_NOTIFIER'] = 'true';
6806 const options = {
6807 encoding: 'utf8',
6808 env
6809 };
6810 if (isWindows()) {
6811 npmCommand = 'npm.cmd';
6812 options.shell = true;
6813 }
6814 let handler = () => { };
6815 try {
6816 process.on('SIGPIPE', handler);
6817 let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
6818 if (!stdout) {
6819 if (tracer) {
6820 tracer(`'npm config get prefix' didn't return a value.`);
6821 }
6822 return undefined;
6823 }
6824 let prefix = stdout.trim();
6825 if (tracer) {
6826 tracer(`'npm config get prefix' value is: ${prefix}`);
6827 }
6828 if (prefix.length > 0) {
6829 if (isWindows()) {
6830 return path.join(prefix, 'node_modules');
6831 }
6832 else {
6833 return path.join(prefix, 'lib', 'node_modules');
6834 }
6835 }
6836 return undefined;
6837 }
6838 catch (err) {
6839 return undefined;
6840 }
6841 finally {
6842 process.removeListener('SIGPIPE', handler);
6843 }
6844}
6845exports.resolveGlobalNodePath = resolveGlobalNodePath;
6846/*
6847 * Resolve the global yarn pakage path.
6848 * @deprecated Since this depends on the used package manager and their version the best is that servers
6849 * implement this themselves since they know best what kind of package managers to support.
6850 * @param tracer the tracer to use
6851 */
6852function resolveGlobalYarnPath(tracer) {
6853 let yarnCommand = 'yarn';
6854 let options = {
6855 encoding: 'utf8'
6856 };
6857 if (isWindows()) {
6858 yarnCommand = 'yarn.cmd';
6859 options.shell = true;
6860 }
6861 let handler = () => { };
6862 try {
6863 process.on('SIGPIPE', handler);
6864 let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
6865 let stdout = results.stdout;
6866 if (!stdout) {
6867 if (tracer) {
6868 tracer(`'yarn global dir' didn't return a value.`);
6869 if (results.stderr) {
6870 tracer(results.stderr);
6871 }
6872 }
6873 return undefined;
6874 }
6875 let lines = stdout.trim().split(/\r?\n/);
6876 for (let line of lines) {
6877 try {
6878 let yarn = JSON.parse(line);
6879 if (yarn.type === 'log') {
6880 return path.join(yarn.data, 'node_modules');
6881 }
6882 }
6883 catch (e) {
6884 // Do nothing. Ignore the line
6885 }
6886 }
6887 return undefined;
6888 }
6889 catch (err) {
6890 return undefined;
6891 }
6892 finally {
6893 process.removeListener('SIGPIPE', handler);
6894 }
6895}
6896exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
6897var FileSystem;
6898(function (FileSystem) {
6899 let _isCaseSensitive = undefined;
6900 function isCaseSensitive() {
6901 if (_isCaseSensitive !== void 0) {
6902 return _isCaseSensitive;
6903 }
6904 if (process.platform === 'win32') {
6905 _isCaseSensitive = false;
6906 }
6907 else {
6908 // convert current file name to upper case / lower case and check if file exists
6909 // (guards against cases when name is already all uppercase or lowercase)
6910 _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
6911 }
6912 return _isCaseSensitive;
6913 }
6914 FileSystem.isCaseSensitive = isCaseSensitive;
6915 function isParent(parent, child) {
6916 if (isCaseSensitive()) {
6917 return path.normalize(child).indexOf(path.normalize(parent)) === 0;
6918 }
6919 else {
6920 return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
6921 }
6922 }
6923 FileSystem.isParent = isParent;
6924})(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
6925function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
6926 if (nodePath) {
6927 if (!path.isAbsolute(nodePath)) {
6928 nodePath = path.join(workspaceRoot, nodePath);
6929 }
6930 return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
6931 if (FileSystem.isParent(nodePath, value)) {
6932 return value;
6933 }
6934 else {
6935 return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
6936 }
6937 }).then(undefined, (_error) => {
6938 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6939 });
6940 }
6941 else {
6942 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6943 }
6944}
6945exports.resolveModulePath = resolveModulePath;
6946//# sourceMappingURL=files.js.map
6947
6948/***/ }),
6949/* 39 */
6950/***/ (function(module, exports) {
6951
6952module.exports = require("url");
6953
6954/***/ }),
6955/* 40 */
6956/***/ (function(module, exports) {
6957
6958module.exports = require("fs");
6959
6960/***/ }),
6961/* 41 */
6962/***/ (function(module, exports) {
6963
6964module.exports = require("child_process");
6965
6966/***/ }),
6967/* 42 */
6968/***/ (function(module, exports, __webpack_require__) {
6969
6970"use strict";
6971/* --------------------------------------------------------------------------------------------
6972 * Copyright (c) Microsoft Corporation. All rights reserved.
6973 * Licensed under the MIT License. See License.txt in the project root for license information.
6974 * ------------------------------------------------------------------------------------------ */
6975
6976Object.defineProperty(exports, "__esModule", { value: true });
6977const vscode_languageserver_protocol_1 = __webpack_require__(3);
6978exports.CallHierarchyFeature = (Base) => {
6979 return class extends Base {
6980 get callHierarchy() {
6981 return {
6982 onPrepare: (handler) => {
6983 this.connection.onRequest(vscode_languageserver_protocol_1.Proposed.CallHierarchyPrepareRequest.type, (params, cancel) => {
6984 return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
6985 });
6986 },
6987 onIncomingCalls: (handler) => {
6988 const type = vscode_languageserver_protocol_1.Proposed.CallHierarchyIncomingCallsRequest.type;
6989 this.connection.onRequest(type, (params, cancel) => {
6990 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
6991 });
6992 },
6993 onOutgoingCalls: (handler) => {
6994 const type = vscode_languageserver_protocol_1.Proposed.CallHierarchyOutgoingCallsRequest.type;
6995 this.connection.onRequest(type, (params, cancel) => {
6996 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
6997 });
6998 }
6999 };
7000 }
7001 };
7002};
7003//# sourceMappingURL=callHierarchy.proposed.js.map
7004
7005/***/ }),
7006/* 43 */
7007/***/ (function(module, exports, __webpack_require__) {
7008
7009"use strict";
7010/* --------------------------------------------------------------------------------------------
7011 * Copyright (c) Microsoft Corporation. All rights reserved.
7012 * Licensed under the MIT License. See License.txt in the project root for license information.
7013 * ------------------------------------------------------------------------------------------ */
7014
7015Object.defineProperty(exports, "__esModule", { value: true });
7016const vscode_languageserver_protocol_1 = __webpack_require__(3);
7017exports.SemanticTokensFeature = (Base) => {
7018 return class extends Base {
7019 get semanticTokens() {
7020 return {
7021 on: (handler) => {
7022 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRequest.type;
7023 this.connection.onRequest(type, (params, cancel) => {
7024 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7025 });
7026 },
7027 onEdits: (handler) => {
7028 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensEditsRequest.type;
7029 this.connection.onRequest(type, (params, cancel) => {
7030 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7031 });
7032 },
7033 onRange: (handler) => {
7034 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRangeRequest.type;
7035 this.connection.onRequest(type, (params, cancel) => {
7036 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
7037 });
7038 }
7039 };
7040 }
7041 };
7042};
7043class SemanticTokensBuilder {
7044 constructor() {
7045 this._prevData = undefined;
7046 this.initialize();
7047 }
7048 initialize() {
7049 this._id = Date.now();
7050 this._prevLine = 0;
7051 this._prevChar = 0;
7052 this._data = [];
7053 this._dataLen = 0;
7054 }
7055 push(line, char, length, tokenType, tokenModifiers) {
7056 let pushLine = line;
7057 let pushChar = char;
7058 if (this._dataLen > 0) {
7059 pushLine -= this._prevLine;
7060 if (pushLine === 0) {
7061 pushChar -= this._prevChar;
7062 }
7063 }
7064 this._data[this._dataLen++] = pushLine;
7065 this._data[this._dataLen++] = pushChar;
7066 this._data[this._dataLen++] = length;
7067 this._data[this._dataLen++] = tokenType;
7068 this._data[this._dataLen++] = tokenModifiers;
7069 this._prevLine = line;
7070 this._prevChar = char;
7071 }
7072 get id() {
7073 return this._id.toString();
7074 }
7075 previousResult(id) {
7076 if (this.id === id) {
7077 this._prevData = this._data;
7078 }
7079 this.initialize();
7080 }
7081 build() {
7082 this._prevData = undefined;
7083 return {
7084 resultId: this.id,
7085 data: this._data
7086 };
7087 }
7088 canBuildEdits() {
7089 return this._prevData !== undefined;
7090 }
7091 buildEdits() {
7092 if (this._prevData !== undefined) {
7093 const prevDataLength = this._prevData.length;
7094 const dataLength = this._data.length;
7095 let startIndex = 0;
7096 while (startIndex < dataLength && startIndex < prevDataLength && this._prevData[startIndex] === this._data[startIndex]) {
7097 startIndex++;
7098 }
7099 if (startIndex < dataLength && startIndex < prevDataLength) {
7100 // Find end index
7101 let endIndex = 0;
7102 while (endIndex < dataLength && endIndex < prevDataLength && this._prevData[prevDataLength - 1 - endIndex] === this._data[dataLength - 1 - endIndex]) {
7103 endIndex++;
7104 }
7105 const newData = this._data.slice(startIndex, dataLength - endIndex);
7106 const result = {
7107 resultId: this.id,
7108 edits: [
7109 { start: startIndex, deleteCount: prevDataLength - endIndex - startIndex, data: newData }
7110 ]
7111 };
7112 return result;
7113 }
7114 else if (startIndex < dataLength) {
7115 return { resultId: this.id, edits: [
7116 { start: startIndex, deleteCount: 0, data: this._data.slice(startIndex) }
7117 ] };
7118 }
7119 else if (startIndex < prevDataLength) {
7120 return { resultId: this.id, edits: [
7121 { start: startIndex, deleteCount: prevDataLength - startIndex }
7122 ] };
7123 }
7124 else {
7125 return { resultId: this.id, edits: [] };
7126 }
7127 }
7128 else {
7129 return this.build();
7130 }
7131 }
7132}
7133exports.SemanticTokensBuilder = SemanticTokensBuilder;
7134//# sourceMappingURL=sematicTokens.proposed.js.map
7135
7136/***/ }),
7137/* 44 */
7138/***/ (function(module, exports, __webpack_require__) {
7139
7140"use strict";
7141
7142Object.defineProperty(exports, "__esModule", { value: true });
7143exports.sortTexts = {
7144 one: "00001",
7145 two: "00002",
7146 three: "00003",
7147 four: "00004",
7148};
7149exports.projectRootPatterns = [".git", "autoload", "plugin"];
7150
7151
7152/***/ }),
7153/* 45 */,
7154/* 46 */
7155/***/ (function(module, exports, __webpack_require__) {
7156
7157"use strict";
7158
7159var __assign = (this && this.__assign) || function () {
7160 __assign = Object.assign || function(t) {
7161 for (var s, i = 1, n = arguments.length; i < n; i++) {
7162 s = arguments[i];
7163 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7164 t[p] = s[p];
7165 }
7166 return t;
7167 };
7168 return __assign.apply(this, arguments);
7169};
7170var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7171 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7172 return new (P || (P = Promise))(function (resolve, reject) {
7173 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7174 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7175 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7176 step((generator = generator.apply(thisArg, _arguments || [])).next());
7177 });
7178};
7179var __generator = (this && this.__generator) || function (thisArg, body) {
7180 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
7181 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
7182 function verb(n) { return function (v) { return step([n, v]); }; }
7183 function step(op) {
7184 if (f) throw new TypeError("Generator is already executing.");
7185 while (_) try {
7186 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;
7187 if (y = 0, t) op = [op[0] & 2, t.value];
7188 switch (op[0]) {
7189 case 0: case 1: t = op; break;
7190 case 4: _.label++; return { value: op[1], done: false };
7191 case 5: _.label++; y = op[1]; op = [0]; continue;
7192 case 7: op = _.ops.pop(); _.trys.pop(); continue;
7193 default:
7194 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
7195 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
7196 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
7197 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
7198 if (t[2]) _.ops.pop();
7199 _.trys.pop(); continue;
7200 }
7201 op = body.call(thisArg, _);
7202 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
7203 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7204 }
7205};
7206var __spreadArrays = (this && this.__spreadArrays) || function () {
7207 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
7208 for (var r = Array(s), k = 0, i = 0; i < il; i++)
7209 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
7210 r[k] = a[j];
7211 return r;
7212};
7213var __importDefault = (this && this.__importDefault) || function (mod) {
7214 return (mod && mod.__esModule) ? mod : { "default": mod };
7215};
7216Object.defineProperty(exports, "__esModule", { value: true });
7217var child_process_1 = __webpack_require__(41);
7218var findup_1 = __importDefault(__webpack_require__(47));
7219var fs_1 = __importDefault(__webpack_require__(40));
7220var path_1 = __importDefault(__webpack_require__(13));
7221var vscode_languageserver_1 = __webpack_require__(2);
7222var vimparser_1 = __webpack_require__(52);
7223var patterns_1 = __webpack_require__(54);
7224function isSomeMatchPattern(patterns, line) {
7225 return patterns.some(function (p) { return p.test(line); });
7226}
7227exports.isSomeMatchPattern = isSomeMatchPattern;
7228function executeFile(input, command, args, option) {
7229 return new Promise(function (resolve, reject) {
7230 var stdout = "";
7231 var stderr = "";
7232 var error;
7233 var isPassAsText = false;
7234 args = (args || []).map(function (arg) {
7235 if (/%text/.test(arg)) {
7236 isPassAsText = true;
7237 return arg.replace(/%text/g, input.toString());
7238 }
7239 return arg;
7240 });
7241 var cp = child_process_1.spawn(command, args, option);
7242 cp.stdout.on("data", function (data) {
7243 stdout += data;
7244 });
7245 cp.stderr.on("data", function (data) {
7246 stderr += data;
7247 });
7248 cp.on("error", function (err) {
7249 error = err;
7250 reject(error);
7251 });
7252 cp.on("close", function (code) {
7253 if (!error) {
7254 resolve({ code: code, stdout: stdout, stderr: stderr });
7255 }
7256 });
7257 // error will occur when cp get error
7258 if (!isPassAsText) {
7259 input.pipe(cp.stdin).on("error", function () { return; });
7260 }
7261 });
7262}
7263exports.executeFile = executeFile;
7264// cover cb type async function to promise
7265function pcb(cb) {
7266 return function () {
7267 var args = [];
7268 for (var _i = 0; _i < arguments.length; _i++) {
7269 args[_i] = arguments[_i];
7270 }
7271 return new Promise(function (resolve) {
7272 cb.apply(void 0, __spreadArrays(args, [function () {
7273 var params = [];
7274 for (var _i = 0; _i < arguments.length; _i++) {
7275 params[_i] = arguments[_i];
7276 }
7277 resolve(params);
7278 }]));
7279 });
7280 };
7281}
7282exports.pcb = pcb;
7283// find work dirname by root patterns
7284function findProjectRoot(filePath, rootPatterns) {
7285 return __awaiter(this, void 0, void 0, function () {
7286 var dirname, patterns, dirCandidate, _i, patterns_2, pattern, _a, err, dir;
7287 return __generator(this, function (_b) {
7288 switch (_b.label) {
7289 case 0:
7290 dirname = path_1.default.dirname(filePath);
7291 patterns = [].concat(rootPatterns);
7292 dirCandidate = "";
7293 _i = 0, patterns_2 = patterns;
7294 _b.label = 1;
7295 case 1:
7296 if (!(_i < patterns_2.length)) return [3 /*break*/, 4];
7297 pattern = patterns_2[_i];
7298 return [4 /*yield*/, pcb(findup_1.default)(dirname, pattern)];
7299 case 2:
7300 _a = _b.sent(), err = _a[0], dir = _a[1];
7301 if (!err && dir && dir !== "/" && dir.length > dirCandidate.length) {
7302 dirCandidate = dir;
7303 }
7304 _b.label = 3;
7305 case 3:
7306 _i++;
7307 return [3 /*break*/, 1];
7308 case 4:
7309 if (dirCandidate.length) {
7310 return [2 /*return*/, dirCandidate];
7311 }
7312 return [2 /*return*/, dirname];
7313 }
7314 });
7315 });
7316}
7317exports.findProjectRoot = findProjectRoot;
7318function markupSnippets(snippets) {
7319 return [
7320 "```vim",
7321 snippets.replace(/\$\{[0-9]+(:([^}]+))?\}/g, "$2"),
7322 "```",
7323 ].join("\n");
7324}
7325exports.markupSnippets = markupSnippets;
7326function getWordFromPosition(doc, position) {
7327 if (!doc) {
7328 return;
7329 }
7330 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)));
7331 // not keyword position
7332 if (!character || !patterns_1.keywordPattern.test(character)) {
7333 return;
7334 }
7335 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)));
7336 // comment line
7337 if (patterns_1.commentPattern.test(currentLine)) {
7338 return;
7339 }
7340 var preSegment = currentLine.slice(0, position.character);
7341 var nextSegment = currentLine.slice(position.character);
7342 var wordLeft = preSegment.match(patterns_1.wordPrePattern);
7343 var wordRight = nextSegment.match(patterns_1.wordNextPattern);
7344 var word = "" + (wordLeft && wordLeft[1] || "") + (wordRight && wordRight[1] || "");
7345 return {
7346 word: word,
7347 left: wordLeft && wordLeft[1] || "",
7348 right: wordRight && wordRight[1] || "",
7349 wordLeft: wordLeft && wordLeft[1]
7350 ? preSegment.replace(new RegExp(wordLeft[1] + "$"), word)
7351 : "" + preSegment + word,
7352 wordRight: wordRight && wordRight[1]
7353 ? nextSegment.replace(new RegExp("^" + wordRight[1]), word)
7354 : "" + word + nextSegment,
7355 };
7356}
7357exports.getWordFromPosition = getWordFromPosition;
7358// parse vim buffer
7359function handleParse(textDoc) {
7360 return __awaiter(this, void 0, void 0, function () {
7361 var text, tokens, node;
7362 return __generator(this, function (_a) {
7363 text = textDoc instanceof Object ? textDoc.getText() : textDoc;
7364 tokens = new vimparser_1.StringReader(text.split(/\r\n|\r|\n/));
7365 try {
7366 node = new vimparser_1.VimLParser(true).parse(tokens);
7367 return [2 /*return*/, [node, ""]];
7368 }
7369 catch (error) {
7370 return [2 /*return*/, [null, error]];
7371 }
7372 return [2 /*return*/];
7373 });
7374 });
7375}
7376exports.handleParse = handleParse;
7377// remove snippets of completionItem
7378function removeSnippets(completionItems) {
7379 if (completionItems === void 0) { completionItems = []; }
7380 return completionItems.map(function (item) {
7381 if (item.insertTextFormat === vscode_languageserver_1.InsertTextFormat.Snippet) {
7382 return __assign(__assign({}, item), { insertText: item.label, insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText });
7383 }
7384 return item;
7385 });
7386}
7387exports.removeSnippets = removeSnippets;
7388exports.isSymbolLink = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
7389 return __generator(this, function (_a) {
7390 return [2 /*return*/, new Promise(function (resolve) {
7391 fs_1.default.lstat(filePath, function (err, stats) {
7392 resolve({
7393 err: err,
7394 stats: stats && stats.isSymbolicLink(),
7395 });
7396 });
7397 })];
7398 });
7399}); };
7400exports.getRealPath = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
7401 var _a, err, stats;
7402 return __generator(this, function (_b) {
7403 switch (_b.label) {
7404 case 0: return [4 /*yield*/, exports.isSymbolLink(filePath)];
7405 case 1:
7406 _a = _b.sent(), err = _a.err, stats = _a.stats;
7407 if (!err && stats) {
7408 return [2 /*return*/, new Promise(function (resolve) {
7409 fs_1.default.realpath(filePath, function (error, realPath) {
7410 if (error) {
7411 return resolve(filePath);
7412 }
7413 resolve(realPath);
7414 });
7415 })];
7416 }
7417 return [2 /*return*/, filePath];
7418 }
7419 });
7420}); };
7421
7422
7423/***/ }),
7424/* 47 */
7425/***/ (function(module, exports, __webpack_require__) {
7426
7427var fs = __webpack_require__(40),
7428 Path = __webpack_require__(13),
7429 util = __webpack_require__(48),
7430 colors = __webpack_require__(49),
7431 EE = __webpack_require__(51).EventEmitter,
7432 fsExists = fs.exists ? fs.exists : Path.exists,
7433 fsExistsSync = fs.existsSync ? fs.existsSync : Path.existsSync;
7434
7435module.exports = function(dir, iterator, options, callback){
7436 return FindUp(dir, iterator, options, callback);
7437};
7438
7439function FindUp(dir, iterator, options, callback){
7440 if (!(this instanceof FindUp)) {
7441 return new FindUp(dir, iterator, options, callback);
7442 }
7443 if(typeof options === 'function'){
7444 callback = options;
7445 options = {};
7446 }
7447 options = options || {};
7448
7449 EE.call(this);
7450 this.found = false;
7451 this.stopPlease = false;
7452 var self = this;
7453
7454 if(typeof iterator === 'string'){
7455 var file = iterator;
7456 iterator = function(dir, cb){
7457 return fsExists(Path.join(dir, file), cb);
7458 };
7459 }
7460
7461 if(callback) {
7462 this.on('found', function(dir){
7463 if(options.verbose) console.log(('found '+ dir ).green);
7464 callback(null, dir);
7465 self.stop();
7466 });
7467
7468 this.on('end', function(){
7469 if(options.verbose) console.log('end'.grey);
7470 if(!self.found) callback(new Error('not found'));
7471 });
7472
7473 this.on('error', function(err){
7474 if(options.verbose) console.log('error'.red, err);
7475 callback(err);
7476 });
7477 }
7478
7479 this._find(dir, iterator, options, callback);
7480}
7481util.inherits(FindUp, EE);
7482
7483FindUp.prototype._find = function(dir, iterator, options, callback){
7484 var self = this;
7485
7486 iterator(dir, function(exists){
7487 if(options.verbose) console.log(('traverse '+ dir).grey);
7488 if(exists) {
7489 self.found = true;
7490 self.emit('found', dir);
7491 }
7492
7493 var parentDir = Path.join(dir, '..');
7494 if (self.stopPlease) return self.emit('end');
7495 if (dir === parentDir) return self.emit('end');
7496 if(dir.indexOf('../../') !== -1 ) return self.emit('error', new Error(dir + ' is not correct.'));
7497 self._find(parentDir, iterator, options, callback);
7498 });
7499};
7500
7501FindUp.prototype.stop = function(){
7502 this.stopPlease = true;
7503};
7504
7505module.exports.FindUp = FindUp;
7506
7507module.exports.sync = function(dir, iteratorSync){
7508 if(typeof iteratorSync === 'string'){
7509 var file = iteratorSync;
7510 iteratorSync = function(dir){
7511 return fsExistsSync(Path.join(dir, file));
7512 };
7513 }
7514 var initialDir = dir;
7515 while(dir !== Path.join(dir, '..')){
7516 if(dir.indexOf('../../') !== -1 ) throw new Error(initialDir + ' is not correct.');
7517 if(iteratorSync(dir)) return dir;
7518 dir = Path.join(dir, '..');
7519 }
7520 throw new Error('not found');
7521};
7522
7523
7524/***/ }),
7525/* 48 */
7526/***/ (function(module, exports) {
7527
7528module.exports = require("util");
7529
7530/***/ }),
7531/* 49 */
7532/***/ (function(module, exports, __webpack_require__) {
7533
7534/*
7535colors.js
7536
7537Copyright (c) 2010
7538
7539Marak Squires
7540Alexis Sellier (cloudhead)
7541
7542Permission is hereby granted, free of charge, to any person obtaining a copy
7543of this software and associated documentation files (the "Software"), to deal
7544in the Software without restriction, including without limitation the rights
7545to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7546copies of the Software, and to permit persons to whom the Software is
7547furnished to do so, subject to the following conditions:
7548
7549The above copyright notice and this permission notice shall be included in
7550all copies or substantial portions of the Software.
7551
7552THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7553IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7554FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7555AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7556LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
7557OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
7558THE SOFTWARE.
7559
7560*/
7561
7562var isHeadless = false;
7563
7564if (typeof module !== 'undefined') {
7565 isHeadless = true;
7566}
7567
7568if (!isHeadless) {
7569 var exports = {};
7570 var module = {};
7571 var colors = exports;
7572 exports.mode = "browser";
7573} else {
7574 exports.mode = "console";
7575}
7576
7577//
7578// Prototypes the string object to have additional method calls that add terminal colors
7579//
7580var addProperty = function (color, func) {
7581 exports[color] = function (str) {
7582 return func.apply(str);
7583 };
7584 String.prototype.__defineGetter__(color, func);
7585};
7586
7587function stylize(str, style) {
7588
7589 var styles;
7590
7591 if (exports.mode === 'console') {
7592 styles = {
7593 //styles
7594 'bold' : ['\x1B[1m', '\x1B[22m'],
7595 'italic' : ['\x1B[3m', '\x1B[23m'],
7596 'underline' : ['\x1B[4m', '\x1B[24m'],
7597 'inverse' : ['\x1B[7m', '\x1B[27m'],
7598 'strikethrough' : ['\x1B[9m', '\x1B[29m'],
7599 //text colors
7600 //grayscale
7601 'white' : ['\x1B[37m', '\x1B[39m'],
7602 'grey' : ['\x1B[90m', '\x1B[39m'],
7603 'black' : ['\x1B[30m', '\x1B[39m'],
7604 //colors
7605 'blue' : ['\x1B[34m', '\x1B[39m'],
7606 'cyan' : ['\x1B[36m', '\x1B[39m'],
7607 'green' : ['\x1B[32m', '\x1B[39m'],
7608 'magenta' : ['\x1B[35m', '\x1B[39m'],
7609 'red' : ['\x1B[31m', '\x1B[39m'],
7610 'yellow' : ['\x1B[33m', '\x1B[39m'],
7611 //background colors
7612 //grayscale
7613 'whiteBG' : ['\x1B[47m', '\x1B[49m'],
7614 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'],
7615 'blackBG' : ['\x1B[40m', '\x1B[49m'],
7616 //colors
7617 'blueBG' : ['\x1B[44m', '\x1B[49m'],
7618 'cyanBG' : ['\x1B[46m', '\x1B[49m'],
7619 'greenBG' : ['\x1B[42m', '\x1B[49m'],
7620 'magentaBG' : ['\x1B[45m', '\x1B[49m'],
7621 'redBG' : ['\x1B[41m', '\x1B[49m'],
7622 'yellowBG' : ['\x1B[43m', '\x1B[49m']
7623 };
7624 } else if (exports.mode === 'browser') {
7625 styles = {
7626 //styles
7627 'bold' : ['<b>', '</b>'],
7628 'italic' : ['<i>', '</i>'],
7629 'underline' : ['<u>', '</u>'],
7630 'inverse' : ['<span style="background-color:black;color:white;">', '</span>'],
7631 'strikethrough' : ['<del>', '</del>'],
7632 //text colors
7633 //grayscale
7634 'white' : ['<span style="color:white;">', '</span>'],
7635 'grey' : ['<span style="color:gray;">', '</span>'],
7636 'black' : ['<span style="color:black;">', '</span>'],
7637 //colors
7638 'blue' : ['<span style="color:blue;">', '</span>'],
7639 'cyan' : ['<span style="color:cyan;">', '</span>'],
7640 'green' : ['<span style="color:green;">', '</span>'],
7641 'magenta' : ['<span style="color:magenta;">', '</span>'],
7642 'red' : ['<span style="color:red;">', '</span>'],
7643 'yellow' : ['<span style="color:yellow;">', '</span>'],
7644 //background colors
7645 //grayscale
7646 'whiteBG' : ['<span style="background-color:white;">', '</span>'],
7647 'greyBG' : ['<span style="background-color:gray;">', '</span>'],
7648 'blackBG' : ['<span style="background-color:black;">', '</span>'],
7649 //colors
7650 'blueBG' : ['<span style="background-color:blue;">', '</span>'],
7651 'cyanBG' : ['<span style="background-color:cyan;">', '</span>'],
7652 'greenBG' : ['<span style="background-color:green;">', '</span>'],
7653 'magentaBG' : ['<span style="background-color:magenta;">', '</span>'],
7654 'redBG' : ['<span style="background-color:red;">', '</span>'],
7655 'yellowBG' : ['<span style="background-color:yellow;">', '</span>']
7656 };
7657 } else if (exports.mode === 'none') {
7658 return str + '';
7659 } else {
7660 console.log('unsupported mode, try "browser", "console" or "none"');
7661 }
7662 return styles[style][0] + str + styles[style][1];
7663}
7664
7665function applyTheme(theme) {
7666
7667 //
7668 // Remark: This is a list of methods that exist
7669 // on String that you should not overwrite.
7670 //
7671 var stringPrototypeBlacklist = [
7672 '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
7673 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
7674 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
7675 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
7676 ];
7677
7678 Object.keys(theme).forEach(function (prop) {
7679 if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
7680 console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
7681 }
7682 else {
7683 if (typeof(theme[prop]) === 'string') {
7684 addProperty(prop, function () {
7685 return exports[theme[prop]](this);
7686 });
7687 }
7688 else {
7689 addProperty(prop, function () {
7690 var ret = this;
7691 for (var t = 0; t < theme[prop].length; t++) {
7692 ret = exports[theme[prop][t]](ret);
7693 }
7694 return ret;
7695 });
7696 }
7697 }
7698 });
7699}
7700
7701
7702//
7703// Iterate through all default styles and colors
7704//
7705var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG'];
7706x.forEach(function (style) {
7707
7708 // __defineGetter__ at the least works in more browsers
7709 // http://robertnyman.com/javascript/javascript-getters-setters.html
7710 // Object.defineProperty only works in Chrome
7711 addProperty(style, function () {
7712 return stylize(this, style);
7713 });
7714});
7715
7716function sequencer(map) {
7717 return function () {
7718 if (!isHeadless) {
7719 return this.replace(/( )/, '$1');
7720 }
7721 var exploded = this.split(""), i = 0;
7722 exploded = exploded.map(map);
7723 return exploded.join("");
7724 };
7725}
7726
7727var rainbowMap = (function () {
7728 var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
7729 return function (letter, i, exploded) {
7730 if (letter === " ") {
7731 return letter;
7732 } else {
7733 return stylize(letter, rainbowColors[i++ % rainbowColors.length]);
7734 }
7735 };
7736})();
7737
7738exports.themes = {};
7739
7740exports.addSequencer = function (name, map) {
7741 addProperty(name, sequencer(map));
7742};
7743
7744exports.addSequencer('rainbow', rainbowMap);
7745exports.addSequencer('zebra', function (letter, i, exploded) {
7746 return i % 2 === 0 ? letter : letter.inverse;
7747});
7748
7749exports.setTheme = function (theme) {
7750 if (typeof theme === 'string') {
7751 try {
7752 exports.themes[theme] = __webpack_require__(50)(theme);
7753 applyTheme(exports.themes[theme]);
7754 return exports.themes[theme];
7755 } catch (err) {
7756 console.log(err);
7757 return err;
7758 }
7759 } else {
7760 applyTheme(theme);
7761 }
7762};
7763
7764
7765addProperty('stripColors', function () {
7766 return ("" + this).replace(/\x1B\[\d+m/g, '');
7767});
7768
7769// please no
7770function zalgo(text, options) {
7771 var soul = {
7772 "up" : [
7773 '̍', '̎', '̄', '̅',
7774 '̿', '̑', '̆', '̐',
7775 '͒', '͗', '͑', '̇',
7776 '̈', '̊', '͂', '̓',
7777 '̈', '͊', '͋', '͌',
7778 '̃', '̂', '̌', '͐',
7779 '̀', '́', '̋', '̏',
7780 '̒', '̓', '̔', '̽',
7781 '̉', 'ͣ', 'ͤ', 'ͥ',
7782 'ͦ', 'ͧ', 'ͨ', 'ͩ',
7783 'ͪ', 'ͫ', 'ͬ', 'ͭ',
7784 'ͮ', 'ͯ', '̾', '͛',
7785 '͆', '̚'
7786 ],
7787 "down" : [
7788 '̖', '̗', '̘', '̙',
7789 '̜', '̝', '̞', '̟',
7790 '̠', '̤', '̥', '̦',
7791 '̩', '̪', '̫', '̬',
7792 '̭', '̮', '̯', '̰',
7793 '̱', '̲', '̳', '̹',
7794 '̺', '̻', '̼', 'ͅ',
7795 '͇', '͈', '͉', '͍',
7796 '͎', '͓', '͔', '͕',
7797 '͖', '͙', '͚', '̣'
7798 ],
7799 "mid" : [
7800 '̕', '̛', '̀', '́',
7801 '͘', '̡', '̢', '̧',
7802 '̨', '̴', '̵', '̶',
7803 '͜', '͝', '͞',
7804 '͟', '͠', '͢', '̸',
7805 '̷', '͡', ' ҉'
7806 ]
7807 },
7808 all = [].concat(soul.up, soul.down, soul.mid),
7809 zalgo = {};
7810
7811 function randomNumber(range) {
7812 var r = Math.floor(Math.random() * range);
7813 return r;
7814 }
7815
7816 function is_char(character) {
7817 var bool = false;
7818 all.filter(function (i) {
7819 bool = (i === character);
7820 });
7821 return bool;
7822 }
7823
7824 function heComes(text, options) {
7825 var result = '', counts, l;
7826 options = options || {};
7827 options["up"] = options["up"] || true;
7828 options["mid"] = options["mid"] || true;
7829 options["down"] = options["down"] || true;
7830 options["size"] = options["size"] || "maxi";
7831 text = text.split('');
7832 for (l in text) {
7833 if (is_char(l)) {
7834 continue;
7835 }
7836 result = result + text[l];
7837 counts = {"up" : 0, "down" : 0, "mid" : 0};
7838 switch (options.size) {
7839 case 'mini':
7840 counts.up = randomNumber(8);
7841 counts.min = randomNumber(2);
7842 counts.down = randomNumber(8);
7843 break;
7844 case 'maxi':
7845 counts.up = randomNumber(16) + 3;
7846 counts.min = randomNumber(4) + 1;
7847 counts.down = randomNumber(64) + 3;
7848 break;
7849 default:
7850 counts.up = randomNumber(8) + 1;
7851 counts.mid = randomNumber(6) / 2;
7852 counts.down = randomNumber(8) + 1;
7853 break;
7854 }
7855
7856 var arr = ["up", "mid", "down"];
7857 for (var d in arr) {
7858 var index = arr[d];
7859 for (var i = 0 ; i <= counts[index]; i++) {
7860 if (options[index]) {
7861 result = result + soul[index][randomNumber(soul[index].length)];
7862 }
7863 }
7864 }
7865 }
7866 return result;
7867 }
7868 return heComes(text);
7869}
7870
7871
7872// don't summon zalgo
7873addProperty('zalgo', function () {
7874 return zalgo(this);
7875});
7876
7877
7878/***/ }),
7879/* 50 */
7880/***/ (function(module, exports) {
7881
7882function webpackEmptyContext(req) {
7883 var e = new Error("Cannot find module '" + req + "'");
7884 e.code = 'MODULE_NOT_FOUND';
7885 throw e;
7886}
7887webpackEmptyContext.keys = function() { return []; };
7888webpackEmptyContext.resolve = webpackEmptyContext;
7889module.exports = webpackEmptyContext;
7890webpackEmptyContext.id = 50;
7891
7892/***/ }),
7893/* 51 */
7894/***/ (function(module, exports) {
7895
7896module.exports = require("events");
7897
7898/***/ }),
7899/* 52 */
7900/***/ (function(module, exports, __webpack_require__) {
7901
7902/* WEBPACK VAR INJECTION */(function(module) {//!/usr/bin/env nodejs
7903// usage: nodejs vimlparser.js [--neovim] foo.vim
7904
7905var fs = __webpack_require__(40);
7906var util = __webpack_require__(48);
7907
7908function main() {
7909 var neovim = false;
7910 var fpath = ''
7911 var args = process.argv;
7912 if (args.length == 4) {
7913 if (args[2] == '--neovim') {
7914 neovim = true;
7915 }
7916 fpath = args[3];
7917 } else if (args.length == 3) {
7918 neovim = false;
7919 fpath = args[2]
7920 }
7921 var r = new StringReader(viml_readfile(fpath));
7922 var p = new VimLParser(neovim);
7923 var c = new Compiler();
7924 try {
7925 var lines = c.compile(p.parse(r));
7926 for (var i in lines) {
7927 process.stdout.write(lines[i] + "\n");
7928 }
7929 } catch (e) {
7930 process.stdout.write(e + '\n');
7931 }
7932}
7933
7934var pat_vim2js = {
7935 "[0-9a-zA-Z]" : "[0-9a-zA-Z]",
7936 "[@*!=><&~#]" : "[@*!=><&~#]",
7937 "\\<ARGOPT\\>" : "\\bARGOPT\\b",
7938 "\\<BANG\\>" : "\\bBANG\\b",
7939 "\\<EDITCMD\\>" : "\\bEDITCMD\\b",
7940 "\\<NOTRLCOM\\>" : "\\bNOTRLCOM\\b",
7941 "\\<TRLBAR\\>" : "\\bTRLBAR\\b",
7942 "\\<USECTRLV\\>" : "\\bUSECTRLV\\b",
7943 "\\<USERCMD\\>" : "\\bUSERCMD\\b",
7944 "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>" : "\\b(XFILE|FILES|FILE1)\\b",
7945 "\\S" : "\\S",
7946 "\\a" : "[A-Za-z]",
7947 "\\d" : "\\d",
7948 "\\h" : "[A-Za-z_]",
7949 "\\s" : "\\s",
7950 "\\v^d%[elete][lp]$" : "^d(elete|elet|ele|el|e)[lp]$",
7951 "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])" : "^s(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])",
7952 "\\w" : "[0-9A-Za-z_]",
7953 "\\w\\|[:#]" : "[0-9A-Za-z_]|[:#]",
7954 "\\x" : "[0-9A-Fa-f]",
7955 "^++" : "^\+\+",
7956 "^++bad=\\(keep\\|drop\\|.\\)\\>" : "^\\+\\+bad=(keep|drop|.)\\b",
7957 "^++bad=drop" : "^\\+\\+bad=drop",
7958 "^++bad=keep" : "^\\+\\+bad=keep",
7959 "^++bin\\>" : "^\\+\\+bin\\b",
7960 "^++edit\\>" : "^\\+\\+edit\\b",
7961 "^++enc=\\S" : "^\\+\\+enc=\\S",
7962 "^++encoding=\\S" : "^\\+\\+encoding=\\S",
7963 "^++ff=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+ff=(dos|unix|mac)\\b",
7964 "^++fileformat=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+fileformat=(dos|unix|mac)\\b",
7965 "^++nobin\\>" : "^\\+\\+nobin\\b",
7966 "^[A-Z]" : "^[A-Z]",
7967 "^\\$\\w\\+" : "^\\$[0-9A-Za-z_]+",
7968 "^\\(!\\|global\\|vglobal\\)$" : "^(!|global|vglobal)$",
7969 "^\\(WHILE\\|FOR\\)$" : "^(WHILE|FOR)$",
7970 "^\\(vimgrep\\|vimgrepadd\\|lvimgrep\\|lvimgrepadd\\)$" : "^(vimgrep|vimgrepadd|lvimgrep|lvimgrepadd)$",
7971 "^\\d" : "^\\d",
7972 "^\\h" : "^[A-Za-z_]",
7973 "^\\s" : "^\\s",
7974 "^\\s*\\\\" : "^\\s*\\\\",
7975 "^[ \\t]$" : "^[ \\t]$",
7976 "^[A-Za-z]$" : "^[A-Za-z]$",
7977 "^[0-9A-Za-z]$" : "^[0-9A-Za-z]$",
7978 "^[0-9]$" : "^[0-9]$",
7979 "^[0-9A-Fa-f]$" : "^[0-9A-Fa-f]$",
7980 "^[0-9A-Za-z_]$" : "^[0-9A-Za-z_]$",
7981 "^[A-Za-z_]$" : "^[A-Za-z_]$",
7982 "^[0-9A-Za-z_:#]$" : "^[0-9A-Za-z_:#]$",
7983 "^[A-Za-z_][0-9A-Za-z_]*$" : "^[A-Za-z_][0-9A-Za-z_]*$",
7984 "^[A-Z]$" : "^[A-Z]$",
7985 "^[a-z]$" : "^[a-z]$",
7986 "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$" : "^[vgslabwt]:$|^([vgslabwt]:)?[A-Za-z_][0-9A-Za-z_#]*$",
7987 "^[0-7]$" : "^[0-7]$",
7988 "^[0-9A-Fa-f][0-9A-Fa-f]$" : "^[0-9A-Fa-f][0-9A-Fa-f]$",
7989 "^\\.[0-9A-Fa-f]$" : "^\\.[0-9A-Fa-f]$",
7990 "^[0-9A-Fa-f][^0-9A-Fa-f]$" : "^[0-9A-Fa-f][^0-9A-Fa-f]$",
7991}
7992
7993function viml_add(lst, item) {
7994 lst.push(item);
7995}
7996
7997function viml_call(func, args) {
7998 return func.apply(null, args);
7999}
8000
8001function viml_char2nr(c) {
8002 return c.charCodeAt(0);
8003}
8004
8005function viml_empty(obj) {
8006 return obj.length == 0;
8007}
8008
8009function viml_equalci(a, b) {
8010 return a.toLowerCase() == b.toLowerCase();
8011}
8012
8013function viml_eqreg(s, reg) {
8014 var mx = new RegExp(pat_vim2js[reg]);
8015 return mx.exec(s) != null;
8016}
8017
8018function viml_eqregh(s, reg) {
8019 var mx = new RegExp(pat_vim2js[reg]);
8020 return mx.exec(s) != null;
8021}
8022
8023function viml_eqregq(s, reg) {
8024 var mx = new RegExp(pat_vim2js[reg], "i");
8025 return mx.exec(s) != null;
8026}
8027
8028function viml_escape(s, chars) {
8029 var r = '';
8030 for (var i = 0; i < s.length; ++i) {
8031 if (chars.indexOf(s.charAt(i)) != -1) {
8032 r = r + "\\" + s.charAt(i);
8033 } else {
8034 r = r + s.charAt(i);
8035 }
8036 }
8037 return r;
8038}
8039
8040function viml_extend(obj, item) {
8041 obj.push.apply(obj, item);
8042}
8043
8044function viml_insert(lst, item) {
8045 var idx = arguments.length >= 3 ? arguments[2] : 0;
8046 lst.splice(0, 0, item);
8047}
8048
8049function viml_join(lst, sep) {
8050 return lst.join(sep);
8051}
8052
8053function viml_keys(obj) {
8054 return Object.keys(obj);
8055}
8056
8057function viml_len(obj) {
8058 if (typeof obj === 'string') {
8059 var len = 0;
8060 for (var i = 0; i < obj.length; i++) {
8061 var c = obj.charCodeAt(i);
8062 len += c < 128 ? 1 : ((c > 127) && (c < 2048)) ? 2 : 3;
8063 }
8064 return len;
8065 }
8066 return obj.length;
8067}
8068
8069function viml_printf() {
8070 var a000 = Array.prototype.slice.call(arguments, 0);
8071 if (a000.length == 1) {
8072 return a000[0];
8073 } else {
8074 return util.format.apply(null, a000);
8075 }
8076}
8077
8078function viml_range(start) {
8079 var end = arguments.length >= 2 ? arguments[1] : null;
8080 if (end == null) {
8081 var x = [];
8082 for (var i = 0; i < start; ++i) {
8083 x.push(i);
8084 }
8085 return x;
8086 } else {
8087 var x = []
8088 for (var i = start; i <= end; ++i) {
8089 x.push(i);
8090 }
8091 return x;
8092 }
8093}
8094
8095function viml_readfile(path) {
8096 // FIXME: newline?
8097 return fs.readFileSync(path, 'utf-8').split(/\r\n|\r|\n/);
8098}
8099
8100function viml_remove(lst, idx) {
8101 lst.splice(idx, 1);
8102}
8103
8104function viml_split(s, sep) {
8105 if (sep == "\\zs") {
8106 return s.split("");
8107 }
8108 throw "NotImplemented";
8109}
8110
8111function viml_str2nr(s) {
8112 var base = arguments.length >= 2 ? arguments[1] : 10;
8113 return parseInt(s, base);
8114}
8115
8116function viml_string(obj) {
8117 return obj.toString();
8118}
8119
8120function viml_has_key(obj, key) {
8121 return obj[key] !== undefined;
8122}
8123
8124function viml_stridx(a, b) {
8125 return a.indexOf(b);
8126}
8127
8128var NIL = [];
8129var TRUE = 1;
8130var FALSE = 0;
8131var NODE_TOPLEVEL = 1;
8132var NODE_COMMENT = 2;
8133var NODE_EXCMD = 3;
8134var NODE_FUNCTION = 4;
8135var NODE_ENDFUNCTION = 5;
8136var NODE_DELFUNCTION = 6;
8137var NODE_RETURN = 7;
8138var NODE_EXCALL = 8;
8139var NODE_LET = 9;
8140var NODE_UNLET = 10;
8141var NODE_LOCKVAR = 11;
8142var NODE_UNLOCKVAR = 12;
8143var NODE_IF = 13;
8144var NODE_ELSEIF = 14;
8145var NODE_ELSE = 15;
8146var NODE_ENDIF = 16;
8147var NODE_WHILE = 17;
8148var NODE_ENDWHILE = 18;
8149var NODE_FOR = 19;
8150var NODE_ENDFOR = 20;
8151var NODE_CONTINUE = 21;
8152var NODE_BREAK = 22;
8153var NODE_TRY = 23;
8154var NODE_CATCH = 24;
8155var NODE_FINALLY = 25;
8156var NODE_ENDTRY = 26;
8157var NODE_THROW = 27;
8158var NODE_ECHO = 28;
8159var NODE_ECHON = 29;
8160var NODE_ECHOHL = 30;
8161var NODE_ECHOMSG = 31;
8162var NODE_ECHOERR = 32;
8163var NODE_EXECUTE = 33;
8164var NODE_TERNARY = 34;
8165var NODE_OR = 35;
8166var NODE_AND = 36;
8167var NODE_EQUAL = 37;
8168var NODE_EQUALCI = 38;
8169var NODE_EQUALCS = 39;
8170var NODE_NEQUAL = 40;
8171var NODE_NEQUALCI = 41;
8172var NODE_NEQUALCS = 42;
8173var NODE_GREATER = 43;
8174var NODE_GREATERCI = 44;
8175var NODE_GREATERCS = 45;
8176var NODE_GEQUAL = 46;
8177var NODE_GEQUALCI = 47;
8178var NODE_GEQUALCS = 48;
8179var NODE_SMALLER = 49;
8180var NODE_SMALLERCI = 50;
8181var NODE_SMALLERCS = 51;
8182var NODE_SEQUAL = 52;
8183var NODE_SEQUALCI = 53;
8184var NODE_SEQUALCS = 54;
8185var NODE_MATCH = 55;
8186var NODE_MATCHCI = 56;
8187var NODE_MATCHCS = 57;
8188var NODE_NOMATCH = 58;
8189var NODE_NOMATCHCI = 59;
8190var NODE_NOMATCHCS = 60;
8191var NODE_IS = 61;
8192var NODE_ISCI = 62;
8193var NODE_ISCS = 63;
8194var NODE_ISNOT = 64;
8195var NODE_ISNOTCI = 65;
8196var NODE_ISNOTCS = 66;
8197var NODE_ADD = 67;
8198var NODE_SUBTRACT = 68;
8199var NODE_CONCAT = 69;
8200var NODE_MULTIPLY = 70;
8201var NODE_DIVIDE = 71;
8202var NODE_REMAINDER = 72;
8203var NODE_NOT = 73;
8204var NODE_MINUS = 74;
8205var NODE_PLUS = 75;
8206var NODE_SUBSCRIPT = 76;
8207var NODE_SLICE = 77;
8208var NODE_CALL = 78;
8209var NODE_DOT = 79;
8210var NODE_NUMBER = 80;
8211var NODE_STRING = 81;
8212var NODE_LIST = 82;
8213var NODE_DICT = 83;
8214var NODE_OPTION = 85;
8215var NODE_IDENTIFIER = 86;
8216var NODE_CURLYNAME = 87;
8217var NODE_ENV = 88;
8218var NODE_REG = 89;
8219var NODE_CURLYNAMEPART = 90;
8220var NODE_CURLYNAMEEXPR = 91;
8221var NODE_LAMBDA = 92;
8222var NODE_BLOB = 93;
8223var NODE_CONST = 94;
8224var NODE_EVAL = 95;
8225var NODE_HEREDOC = 96;
8226var NODE_METHOD = 97;
8227var TOKEN_EOF = 1;
8228var TOKEN_EOL = 2;
8229var TOKEN_SPACE = 3;
8230var TOKEN_OROR = 4;
8231var TOKEN_ANDAND = 5;
8232var TOKEN_EQEQ = 6;
8233var TOKEN_EQEQCI = 7;
8234var TOKEN_EQEQCS = 8;
8235var TOKEN_NEQ = 9;
8236var TOKEN_NEQCI = 10;
8237var TOKEN_NEQCS = 11;
8238var TOKEN_GT = 12;
8239var TOKEN_GTCI = 13;
8240var TOKEN_GTCS = 14;
8241var TOKEN_GTEQ = 15;
8242var TOKEN_GTEQCI = 16;
8243var TOKEN_GTEQCS = 17;
8244var TOKEN_LT = 18;
8245var TOKEN_LTCI = 19;
8246var TOKEN_LTCS = 20;
8247var TOKEN_LTEQ = 21;
8248var TOKEN_LTEQCI = 22;
8249var TOKEN_LTEQCS = 23;
8250var TOKEN_MATCH = 24;
8251var TOKEN_MATCHCI = 25;
8252var TOKEN_MATCHCS = 26;
8253var TOKEN_NOMATCH = 27;
8254var TOKEN_NOMATCHCI = 28;
8255var TOKEN_NOMATCHCS = 29;
8256var TOKEN_IS = 30;
8257var TOKEN_ISCI = 31;
8258var TOKEN_ISCS = 32;
8259var TOKEN_ISNOT = 33;
8260var TOKEN_ISNOTCI = 34;
8261var TOKEN_ISNOTCS = 35;
8262var TOKEN_PLUS = 36;
8263var TOKEN_MINUS = 37;
8264var TOKEN_DOT = 38;
8265var TOKEN_STAR = 39;
8266var TOKEN_SLASH = 40;
8267var TOKEN_PERCENT = 41;
8268var TOKEN_NOT = 42;
8269var TOKEN_QUESTION = 43;
8270var TOKEN_COLON = 44;
8271var TOKEN_POPEN = 45;
8272var TOKEN_PCLOSE = 46;
8273var TOKEN_SQOPEN = 47;
8274var TOKEN_SQCLOSE = 48;
8275var TOKEN_COPEN = 49;
8276var TOKEN_CCLOSE = 50;
8277var TOKEN_COMMA = 51;
8278var TOKEN_NUMBER = 52;
8279var TOKEN_SQUOTE = 53;
8280var TOKEN_DQUOTE = 54;
8281var TOKEN_OPTION = 55;
8282var TOKEN_IDENTIFIER = 56;
8283var TOKEN_ENV = 57;
8284var TOKEN_REG = 58;
8285var TOKEN_EQ = 59;
8286var TOKEN_OR = 60;
8287var TOKEN_SEMICOLON = 61;
8288var TOKEN_BACKTICK = 62;
8289var TOKEN_DOTDOTDOT = 63;
8290var TOKEN_SHARP = 64;
8291var TOKEN_ARROW = 65;
8292var TOKEN_BLOB = 66;
8293var TOKEN_LITCOPEN = 67;
8294var TOKEN_DOTDOT = 68;
8295var TOKEN_HEREDOC = 69;
8296var MAX_FUNC_ARGS = 20;
8297function isalpha(c) {
8298 return viml_eqregh(c, "^[A-Za-z]$");
8299}
8300
8301function isalnum(c) {
8302 return viml_eqregh(c, "^[0-9A-Za-z]$");
8303}
8304
8305function isdigit(c) {
8306 return viml_eqregh(c, "^[0-9]$");
8307}
8308
8309function isodigit(c) {
8310 return viml_eqregh(c, "^[0-7]$");
8311}
8312
8313function isxdigit(c) {
8314 return viml_eqregh(c, "^[0-9A-Fa-f]$");
8315}
8316
8317function iswordc(c) {
8318 return viml_eqregh(c, "^[0-9A-Za-z_]$");
8319}
8320
8321function iswordc1(c) {
8322 return viml_eqregh(c, "^[A-Za-z_]$");
8323}
8324
8325function iswhite(c) {
8326 return viml_eqregh(c, "^[ \\t]$");
8327}
8328
8329function isnamec(c) {
8330 return viml_eqregh(c, "^[0-9A-Za-z_:#]$");
8331}
8332
8333function isnamec1(c) {
8334 return viml_eqregh(c, "^[A-Za-z_]$");
8335}
8336
8337function isargname(s) {
8338 return viml_eqregh(s, "^[A-Za-z_][0-9A-Za-z_]*$");
8339}
8340
8341function isvarname(s) {
8342 return viml_eqregh(s, "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$");
8343}
8344
8345// FIXME:
8346function isidc(c) {
8347 return viml_eqregh(c, "^[0-9A-Za-z_]$");
8348}
8349
8350function isupper(c) {
8351 return viml_eqregh(c, "^[A-Z]$");
8352}
8353
8354function islower(c) {
8355 return viml_eqregh(c, "^[a-z]$");
8356}
8357
8358function ExArg() {
8359 var ea = {};
8360 ea.forceit = FALSE;
8361 ea.addr_count = 0;
8362 ea.line1 = 0;
8363 ea.line2 = 0;
8364 ea.flags = 0;
8365 ea.do_ecmd_cmd = "";
8366 ea.do_ecmd_lnum = 0;
8367 ea.append = 0;
8368 ea.usefilter = FALSE;
8369 ea.amount = 0;
8370 ea.regname = 0;
8371 ea.force_bin = 0;
8372 ea.read_edit = 0;
8373 ea.force_ff = 0;
8374 ea.force_enc = 0;
8375 ea.bad_char = 0;
8376 ea.linepos = {};
8377 ea.cmdpos = [];
8378 ea.argpos = [];
8379 ea.cmd = {};
8380 ea.modifiers = [];
8381 ea.range = [];
8382 ea.argopt = {};
8383 ea.argcmd = {};
8384 return ea;
8385}
8386
8387// struct node {
8388// int type
8389// pos pos
8390// node left
8391// node right
8392// node cond
8393// node rest
8394// node[] list
8395// node[] rlist
8396// node[] default_args
8397// node[] body
8398// string op
8399// string str
8400// int depth
8401// variant value
8402// }
8403// TOPLEVEL .body
8404// COMMENT .str
8405// EXCMD .ea .str
8406// FUNCTION .ea .body .left .rlist .default_args .attr .endfunction
8407// ENDFUNCTION .ea
8408// DELFUNCTION .ea .left
8409// RETURN .ea .left
8410// EXCALL .ea .left
8411// LET .ea .op .left .list .rest .right
8412// CONST .ea .op .left .list .rest .right
8413// UNLET .ea .list
8414// LOCKVAR .ea .depth .list
8415// UNLOCKVAR .ea .depth .list
8416// IF .ea .body .cond .elseif .else .endif
8417// ELSEIF .ea .body .cond
8418// ELSE .ea .body
8419// ENDIF .ea
8420// WHILE .ea .body .cond .endwhile
8421// ENDWHILE .ea
8422// FOR .ea .body .left .list .rest .right .endfor
8423// ENDFOR .ea
8424// CONTINUE .ea
8425// BREAK .ea
8426// TRY .ea .body .catch .finally .endtry
8427// CATCH .ea .body .pattern
8428// FINALLY .ea .body
8429// ENDTRY .ea
8430// THROW .ea .left
8431// EVAL .ea .left
8432// ECHO .ea .list
8433// ECHON .ea .list
8434// ECHOHL .ea .str
8435// ECHOMSG .ea .list
8436// ECHOERR .ea .list
8437// EXECUTE .ea .list
8438// TERNARY .cond .left .right
8439// OR .left .right
8440// AND .left .right
8441// EQUAL .left .right
8442// EQUALCI .left .right
8443// EQUALCS .left .right
8444// NEQUAL .left .right
8445// NEQUALCI .left .right
8446// NEQUALCS .left .right
8447// GREATER .left .right
8448// GREATERCI .left .right
8449// GREATERCS .left .right
8450// GEQUAL .left .right
8451// GEQUALCI .left .right
8452// GEQUALCS .left .right
8453// SMALLER .left .right
8454// SMALLERCI .left .right
8455// SMALLERCS .left .right
8456// SEQUAL .left .right
8457// SEQUALCI .left .right
8458// SEQUALCS .left .right
8459// MATCH .left .right
8460// MATCHCI .left .right
8461// MATCHCS .left .right
8462// NOMATCH .left .right
8463// NOMATCHCI .left .right
8464// NOMATCHCS .left .right
8465// IS .left .right
8466// ISCI .left .right
8467// ISCS .left .right
8468// ISNOT .left .right
8469// ISNOTCI .left .right
8470// ISNOTCS .left .right
8471// ADD .left .right
8472// SUBTRACT .left .right
8473// CONCAT .left .right
8474// MULTIPLY .left .right
8475// DIVIDE .left .right
8476// REMAINDER .left .right
8477// NOT .left
8478// MINUS .left
8479// PLUS .left
8480// SUBSCRIPT .left .right
8481// SLICE .left .rlist
8482// METHOD .left .right
8483// CALL .left .rlist
8484// DOT .left .right
8485// NUMBER .value
8486// STRING .value
8487// LIST .value
8488// DICT .value
8489// BLOB .value
8490// NESTING .left
8491// OPTION .value
8492// IDENTIFIER .value
8493// CURLYNAME .value
8494// ENV .value
8495// REG .value
8496// CURLYNAMEPART .value
8497// CURLYNAMEEXPR .value
8498// LAMBDA .rlist .left
8499// HEREDOC .rlist .op .body
8500function Node(type) {
8501 return {"type":type};
8502}
8503
8504function Err(msg, pos) {
8505 return viml_printf("vimlparser: %s: line %d col %d", msg, pos.lnum, pos.col);
8506}
8507
8508function VimLParser() { this.__init__.apply(this, arguments); }
8509VimLParser.prototype.__init__ = function() {
8510 var a000 = Array.prototype.slice.call(arguments, 0);
8511 if (viml_len(a000) > 0) {
8512 this.neovim = a000[0];
8513 }
8514 else {
8515 this.neovim = 0;
8516 }
8517 this.find_command_cache = {};
8518}
8519
8520VimLParser.prototype.push_context = function(node) {
8521 viml_insert(this.context, node);
8522}
8523
8524VimLParser.prototype.pop_context = function() {
8525 viml_remove(this.context, 0);
8526}
8527
8528VimLParser.prototype.find_context = function(type) {
8529 var i = 0;
8530 var __c3 = this.context;
8531 for (var __i3 = 0; __i3 < __c3.length; ++__i3) {
8532 var node = __c3[__i3];
8533 if (node.type == type) {
8534 return i;
8535 }
8536 i += 1;
8537 }
8538 return -1;
8539}
8540
8541VimLParser.prototype.add_node = function(node) {
8542 viml_add(this.context[0].body, node);
8543}
8544
8545VimLParser.prototype.check_missing_endfunction = function(ends, pos) {
8546 if (this.context[0].type == NODE_FUNCTION) {
8547 throw Err(viml_printf("E126: Missing :endfunction: %s", ends), pos);
8548 }
8549}
8550
8551VimLParser.prototype.check_missing_endif = function(ends, pos) {
8552 if (this.context[0].type == NODE_IF || this.context[0].type == NODE_ELSEIF || this.context[0].type == NODE_ELSE) {
8553 throw Err(viml_printf("E171: Missing :endif: %s", ends), pos);
8554 }
8555}
8556
8557VimLParser.prototype.check_missing_endtry = function(ends, pos) {
8558 if (this.context[0].type == NODE_TRY || this.context[0].type == NODE_CATCH || this.context[0].type == NODE_FINALLY) {
8559 throw Err(viml_printf("E600: Missing :endtry: %s", ends), pos);
8560 }
8561}
8562
8563VimLParser.prototype.check_missing_endwhile = function(ends, pos) {
8564 if (this.context[0].type == NODE_WHILE) {
8565 throw Err(viml_printf("E170: Missing :endwhile: %s", ends), pos);
8566 }
8567}
8568
8569VimLParser.prototype.check_missing_endfor = function(ends, pos) {
8570 if (this.context[0].type == NODE_FOR) {
8571 throw Err(viml_printf("E170: Missing :endfor: %s", ends), pos);
8572 }
8573}
8574
8575VimLParser.prototype.parse = function(reader) {
8576 this.reader = reader;
8577 this.context = [];
8578 var toplevel = Node(NODE_TOPLEVEL);
8579 toplevel.pos = this.reader.getpos();
8580 toplevel.body = [];
8581 this.push_context(toplevel);
8582 while (this.reader.peek() != "<EOF>") {
8583 this.parse_one_cmd();
8584 }
8585 this.check_missing_endfunction("TOPLEVEL", this.reader.getpos());
8586 this.check_missing_endif("TOPLEVEL", this.reader.getpos());
8587 this.check_missing_endtry("TOPLEVEL", this.reader.getpos());
8588 this.check_missing_endwhile("TOPLEVEL", this.reader.getpos());
8589 this.check_missing_endfor("TOPLEVEL", this.reader.getpos());
8590 this.pop_context();
8591 return toplevel;
8592}
8593
8594VimLParser.prototype.parse_one_cmd = function() {
8595 this.ea = ExArg();
8596 if (this.reader.peekn(2) == "#!") {
8597 this.parse_hashbang();
8598 this.reader.get();
8599 return;
8600 }
8601 this.reader.skip_white_and_colon();
8602 if (this.reader.peekn(1) == "") {
8603 this.reader.get();
8604 return;
8605 }
8606 if (this.reader.peekn(1) == "\"") {
8607 this.parse_comment();
8608 this.reader.get();
8609 return;
8610 }
8611 this.ea.linepos = this.reader.getpos();
8612 this.parse_command_modifiers();
8613 this.parse_range();
8614 this.parse_command();
8615 this.parse_trail();
8616}
8617
8618// FIXME:
8619VimLParser.prototype.parse_command_modifiers = function() {
8620 var modifiers = [];
8621 while (TRUE) {
8622 var pos = this.reader.tell();
8623 var d = "";
8624 if (isdigit(this.reader.peekn(1))) {
8625 var d = this.reader.read_digit();
8626 this.reader.skip_white();
8627 }
8628 var k = this.reader.read_alpha();
8629 var c = this.reader.peekn(1);
8630 this.reader.skip_white();
8631 if (viml_stridx("aboveleft", k) == 0 && viml_len(k) >= 3) {
8632 // abo\%[veleft]
8633 viml_add(modifiers, {"name":"aboveleft"});
8634 }
8635 else if (viml_stridx("belowright", k) == 0 && viml_len(k) >= 3) {
8636 // bel\%[owright]
8637 viml_add(modifiers, {"name":"belowright"});
8638 }
8639 else if (viml_stridx("browse", k) == 0 && viml_len(k) >= 3) {
8640 // bro\%[wse]
8641 viml_add(modifiers, {"name":"browse"});
8642 }
8643 else if (viml_stridx("botright", k) == 0 && viml_len(k) >= 2) {
8644 // bo\%[tright]
8645 viml_add(modifiers, {"name":"botright"});
8646 }
8647 else if (viml_stridx("confirm", k) == 0 && viml_len(k) >= 4) {
8648 // conf\%[irm]
8649 viml_add(modifiers, {"name":"confirm"});
8650 }
8651 else if (viml_stridx("keepmarks", k) == 0 && viml_len(k) >= 3) {
8652 // kee\%[pmarks]
8653 viml_add(modifiers, {"name":"keepmarks"});
8654 }
8655 else if (viml_stridx("keepalt", k) == 0 && viml_len(k) >= 5) {
8656 // keepa\%[lt]
8657 viml_add(modifiers, {"name":"keepalt"});
8658 }
8659 else if (viml_stridx("keepjumps", k) == 0 && viml_len(k) >= 5) {
8660 // keepj\%[umps]
8661 viml_add(modifiers, {"name":"keepjumps"});
8662 }
8663 else if (viml_stridx("keeppatterns", k) == 0 && viml_len(k) >= 5) {
8664 // keepp\%[atterns]
8665 viml_add(modifiers, {"name":"keeppatterns"});
8666 }
8667 else if (viml_stridx("hide", k) == 0 && viml_len(k) >= 3) {
8668 // hid\%[e]
8669 if (this.ends_excmds(c)) {
8670 break;
8671 }
8672 viml_add(modifiers, {"name":"hide"});
8673 }
8674 else if (viml_stridx("lockmarks", k) == 0 && viml_len(k) >= 3) {
8675 // loc\%[kmarks]
8676 viml_add(modifiers, {"name":"lockmarks"});
8677 }
8678 else if (viml_stridx("leftabove", k) == 0 && viml_len(k) >= 5) {
8679 // lefta\%[bove]
8680 viml_add(modifiers, {"name":"leftabove"});
8681 }
8682 else if (viml_stridx("noautocmd", k) == 0 && viml_len(k) >= 3) {
8683 // noa\%[utocmd]
8684 viml_add(modifiers, {"name":"noautocmd"});
8685 }
8686 else if (viml_stridx("noswapfile", k) == 0 && viml_len(k) >= 3) {
8687 // :nos\%[wapfile]
8688 viml_add(modifiers, {"name":"noswapfile"});
8689 }
8690 else if (viml_stridx("rightbelow", k) == 0 && viml_len(k) >= 6) {
8691 // rightb\%[elow]
8692 viml_add(modifiers, {"name":"rightbelow"});
8693 }
8694 else if (viml_stridx("sandbox", k) == 0 && viml_len(k) >= 3) {
8695 // san\%[dbox]
8696 viml_add(modifiers, {"name":"sandbox"});
8697 }
8698 else if (viml_stridx("silent", k) == 0 && viml_len(k) >= 3) {
8699 // sil\%[ent]
8700 if (c == "!") {
8701 this.reader.get();
8702 viml_add(modifiers, {"name":"silent", "bang":1});
8703 }
8704 else {
8705 viml_add(modifiers, {"name":"silent", "bang":0});
8706 }
8707 }
8708 else if (k == "tab") {
8709 // tab
8710 if (d != "") {
8711 viml_add(modifiers, {"name":"tab", "count":viml_str2nr(d, 10)});
8712 }
8713 else {
8714 viml_add(modifiers, {"name":"tab"});
8715 }
8716 }
8717 else if (viml_stridx("topleft", k) == 0 && viml_len(k) >= 2) {
8718 // to\%[pleft]
8719 viml_add(modifiers, {"name":"topleft"});
8720 }
8721 else if (viml_stridx("unsilent", k) == 0 && viml_len(k) >= 3) {
8722 // uns\%[ilent]
8723 viml_add(modifiers, {"name":"unsilent"});
8724 }
8725 else if (viml_stridx("vertical", k) == 0 && viml_len(k) >= 4) {
8726 // vert\%[ical]
8727 viml_add(modifiers, {"name":"vertical"});
8728 }
8729 else if (viml_stridx("verbose", k) == 0 && viml_len(k) >= 4) {
8730 // verb\%[ose]
8731 if (d != "") {
8732 viml_add(modifiers, {"name":"verbose", "count":viml_str2nr(d, 10)});
8733 }
8734 else {
8735 viml_add(modifiers, {"name":"verbose", "count":1});
8736 }
8737 }
8738 else {
8739 this.reader.seek_set(pos);
8740 break;
8741 }
8742 }
8743 this.ea.modifiers = modifiers;
8744}
8745
8746// FIXME:
8747VimLParser.prototype.parse_range = function() {
8748 var tokens = [];
8749 while (TRUE) {
8750 while (TRUE) {
8751 this.reader.skip_white();
8752 var c = this.reader.peekn(1);
8753 if (c == "") {
8754 break;
8755 }
8756 if (c == ".") {
8757 viml_add(tokens, this.reader.getn(1));
8758 }
8759 else if (c == "$") {
8760 viml_add(tokens, this.reader.getn(1));
8761 }
8762 else if (c == "'") {
8763 this.reader.getn(1);
8764 var m = this.reader.getn(1);
8765 if (m == "") {
8766 break;
8767 }
8768 viml_add(tokens, "'" + m);
8769 }
8770 else if (c == "/") {
8771 this.reader.getn(1);
8772 var __tmp = this.parse_pattern(c);
8773 var pattern = __tmp[0];
8774 var _ = __tmp[1];
8775 viml_add(tokens, pattern);
8776 }
8777 else if (c == "?") {
8778 this.reader.getn(1);
8779 var __tmp = this.parse_pattern(c);
8780 var pattern = __tmp[0];
8781 var _ = __tmp[1];
8782 viml_add(tokens, pattern);
8783 }
8784 else if (c == "\\") {
8785 var m = this.reader.p(1);
8786 if (m == "&" || m == "?" || m == "/") {
8787 this.reader.seek_cur(2);
8788 viml_add(tokens, "\\" + m);
8789 }
8790 else {
8791 throw Err("E10: \\\\ should be followed by /, ? or &", this.reader.getpos());
8792 }
8793 }
8794 else if (isdigit(c)) {
8795 viml_add(tokens, this.reader.read_digit());
8796 }
8797 while (TRUE) {
8798 this.reader.skip_white();
8799 if (this.reader.peekn(1) == "") {
8800 break;
8801 }
8802 var n = this.reader.read_integer();
8803 if (n == "") {
8804 break;
8805 }
8806 viml_add(tokens, n);
8807 }
8808 if (this.reader.p(0) != "/" && this.reader.p(0) != "?") {
8809 break;
8810 }
8811 }
8812 if (this.reader.peekn(1) == "%") {
8813 viml_add(tokens, this.reader.getn(1));
8814 }
8815 else if (this.reader.peekn(1) == "*") {
8816 // && &cpoptions !~ '\*'
8817 viml_add(tokens, this.reader.getn(1));
8818 }
8819 if (this.reader.peekn(1) == ";") {
8820 viml_add(tokens, this.reader.getn(1));
8821 continue;
8822 }
8823 else if (this.reader.peekn(1) == ",") {
8824 viml_add(tokens, this.reader.getn(1));
8825 continue;
8826 }
8827 break;
8828 }
8829 this.ea.range = tokens;
8830}
8831
8832// FIXME:
8833VimLParser.prototype.parse_pattern = function(delimiter) {
8834 var pattern = "";
8835 var endc = "";
8836 var inbracket = 0;
8837 while (TRUE) {
8838 var c = this.reader.getn(1);
8839 if (c == "") {
8840 break;
8841 }
8842 if (c == delimiter && inbracket == 0) {
8843 var endc = c;
8844 break;
8845 }
8846 pattern += c;
8847 if (c == "\\") {
8848 var c = this.reader.peekn(1);
8849 if (c == "") {
8850 throw Err("E682: Invalid search pattern or delimiter", this.reader.getpos());
8851 }
8852 this.reader.getn(1);
8853 pattern += c;
8854 }
8855 else if (c == "[") {
8856 inbracket += 1;
8857 }
8858 else if (c == "]") {
8859 inbracket -= 1;
8860 }
8861 }
8862 return [pattern, endc];
8863}
8864
8865VimLParser.prototype.parse_command = function() {
8866 this.reader.skip_white_and_colon();
8867 this.ea.cmdpos = this.reader.getpos();
8868 if (this.reader.peekn(1) == "" || this.reader.peekn(1) == "\"") {
8869 if (!viml_empty(this.ea.modifiers) || !viml_empty(this.ea.range)) {
8870 this.parse_cmd_modifier_range();
8871 }
8872 return;
8873 }
8874 this.ea.cmd = this.find_command();
8875 if (this.ea.cmd === NIL) {
8876 this.reader.setpos(this.ea.cmdpos);
8877 throw Err(viml_printf("E492: Not an editor command: %s", this.reader.peekline()), this.ea.cmdpos);
8878 }
8879 if (this.reader.peekn(1) == "!" && this.ea.cmd.name != "substitute" && this.ea.cmd.name != "smagic" && this.ea.cmd.name != "snomagic") {
8880 this.reader.getn(1);
8881 this.ea.forceit = TRUE;
8882 }
8883 else {
8884 this.ea.forceit = FALSE;
8885 }
8886 if (!viml_eqregh(this.ea.cmd.flags, "\\<BANG\\>") && this.ea.forceit && !viml_eqregh(this.ea.cmd.flags, "\\<USERCMD\\>")) {
8887 throw Err("E477: No ! allowed", this.ea.cmdpos);
8888 }
8889 if (this.ea.cmd.name != "!") {
8890 this.reader.skip_white();
8891 }
8892 this.ea.argpos = this.reader.getpos();
8893 if (viml_eqregh(this.ea.cmd.flags, "\\<ARGOPT\\>")) {
8894 this.parse_argopt();
8895 }
8896 if (this.ea.cmd.name == "write" || this.ea.cmd.name == "update") {
8897 if (this.reader.p(0) == ">") {
8898 if (this.reader.p(1) != ">") {
8899 throw Err("E494: Use w or w>>", this.ea.cmdpos);
8900 }
8901 this.reader.seek_cur(2);
8902 this.reader.skip_white();
8903 this.ea.append = 1;
8904 }
8905 else if (this.reader.peekn(1) == "!" && this.ea.cmd.name == "write") {
8906 this.reader.getn(1);
8907 this.ea.usefilter = TRUE;
8908 }
8909 }
8910 if (this.ea.cmd.name == "read") {
8911 if (this.ea.forceit) {
8912 this.ea.usefilter = TRUE;
8913 this.ea.forceit = FALSE;
8914 }
8915 else if (this.reader.peekn(1) == "!") {
8916 this.reader.getn(1);
8917 this.ea.usefilter = TRUE;
8918 }
8919 }
8920 if (this.ea.cmd.name == "<" || this.ea.cmd.name == ">") {
8921 this.ea.amount = 1;
8922 while (this.reader.peekn(1) == this.ea.cmd.name) {
8923 this.reader.getn(1);
8924 this.ea.amount += 1;
8925 }
8926 this.reader.skip_white();
8927 }
8928 if (viml_eqregh(this.ea.cmd.flags, "\\<EDITCMD\\>") && !this.ea.usefilter) {
8929 this.parse_argcmd();
8930 }
8931 this._parse_command(this.ea.cmd.parser);
8932}
8933
8934// TODO: self[a:parser]
8935VimLParser.prototype._parse_command = function(parser) {
8936 if (parser == "parse_cmd_append") {
8937 this.parse_cmd_append();
8938 }
8939 else if (parser == "parse_cmd_break") {
8940 this.parse_cmd_break();
8941 }
8942 else if (parser == "parse_cmd_call") {
8943 this.parse_cmd_call();
8944 }
8945 else if (parser == "parse_cmd_catch") {
8946 this.parse_cmd_catch();
8947 }
8948 else if (parser == "parse_cmd_common") {
8949 this.parse_cmd_common();
8950 }
8951 else if (parser == "parse_cmd_continue") {
8952 this.parse_cmd_continue();
8953 }
8954 else if (parser == "parse_cmd_delfunction") {
8955 this.parse_cmd_delfunction();
8956 }
8957 else if (parser == "parse_cmd_echo") {
8958 this.parse_cmd_echo();
8959 }
8960 else if (parser == "parse_cmd_echoerr") {
8961 this.parse_cmd_echoerr();
8962 }
8963 else if (parser == "parse_cmd_echohl") {
8964 this.parse_cmd_echohl();
8965 }
8966 else if (parser == "parse_cmd_echomsg") {
8967 this.parse_cmd_echomsg();
8968 }
8969 else if (parser == "parse_cmd_echon") {
8970 this.parse_cmd_echon();
8971 }
8972 else if (parser == "parse_cmd_else") {
8973 this.parse_cmd_else();
8974 }
8975 else if (parser == "parse_cmd_elseif") {
8976 this.parse_cmd_elseif();
8977 }
8978 else if (parser == "parse_cmd_endfor") {
8979 this.parse_cmd_endfor();
8980 }
8981 else if (parser == "parse_cmd_endfunction") {
8982 this.parse_cmd_endfunction();
8983 }
8984 else if (parser == "parse_cmd_endif") {
8985 this.parse_cmd_endif();
8986 }
8987 else if (parser == "parse_cmd_endtry") {
8988 this.parse_cmd_endtry();
8989 }
8990 else if (parser == "parse_cmd_endwhile") {
8991 this.parse_cmd_endwhile();
8992 }
8993 else if (parser == "parse_cmd_execute") {
8994 this.parse_cmd_execute();
8995 }
8996 else if (parser == "parse_cmd_finally") {
8997 this.parse_cmd_finally();
8998 }
8999 else if (parser == "parse_cmd_finish") {
9000 this.parse_cmd_finish();
9001 }
9002 else if (parser == "parse_cmd_for") {
9003 this.parse_cmd_for();
9004 }
9005 else if (parser == "parse_cmd_function") {
9006 this.parse_cmd_function();
9007 }
9008 else if (parser == "parse_cmd_if") {
9009 this.parse_cmd_if();
9010 }
9011 else if (parser == "parse_cmd_insert") {
9012 this.parse_cmd_insert();
9013 }
9014 else if (parser == "parse_cmd_let") {
9015 this.parse_cmd_let();
9016 }
9017 else if (parser == "parse_cmd_const") {
9018 this.parse_cmd_const();
9019 }
9020 else if (parser == "parse_cmd_loadkeymap") {
9021 this.parse_cmd_loadkeymap();
9022 }
9023 else if (parser == "parse_cmd_lockvar") {
9024 this.parse_cmd_lockvar();
9025 }
9026 else if (parser == "parse_cmd_lua") {
9027 this.parse_cmd_lua();
9028 }
9029 else if (parser == "parse_cmd_modifier_range") {
9030 this.parse_cmd_modifier_range();
9031 }
9032 else if (parser == "parse_cmd_mzscheme") {
9033 this.parse_cmd_mzscheme();
9034 }
9035 else if (parser == "parse_cmd_perl") {
9036 this.parse_cmd_perl();
9037 }
9038 else if (parser == "parse_cmd_python") {
9039 this.parse_cmd_python();
9040 }
9041 else if (parser == "parse_cmd_python3") {
9042 this.parse_cmd_python3();
9043 }
9044 else if (parser == "parse_cmd_return") {
9045 this.parse_cmd_return();
9046 }
9047 else if (parser == "parse_cmd_ruby") {
9048 this.parse_cmd_ruby();
9049 }
9050 else if (parser == "parse_cmd_tcl") {
9051 this.parse_cmd_tcl();
9052 }
9053 else if (parser == "parse_cmd_throw") {
9054 this.parse_cmd_throw();
9055 }
9056 else if (parser == "parse_cmd_eval") {
9057 this.parse_cmd_eval();
9058 }
9059 else if (parser == "parse_cmd_try") {
9060 this.parse_cmd_try();
9061 }
9062 else if (parser == "parse_cmd_unlet") {
9063 this.parse_cmd_unlet();
9064 }
9065 else if (parser == "parse_cmd_unlockvar") {
9066 this.parse_cmd_unlockvar();
9067 }
9068 else if (parser == "parse_cmd_usercmd") {
9069 this.parse_cmd_usercmd();
9070 }
9071 else if (parser == "parse_cmd_while") {
9072 this.parse_cmd_while();
9073 }
9074 else if (parser == "parse_wincmd") {
9075 this.parse_wincmd();
9076 }
9077 else if (parser == "parse_cmd_syntax") {
9078 this.parse_cmd_syntax();
9079 }
9080 else {
9081 throw viml_printf("unknown parser: %s", viml_string(parser));
9082 }
9083}
9084
9085VimLParser.prototype.find_command = function() {
9086 var c = this.reader.peekn(1);
9087 var name = "";
9088 if (c == "k") {
9089 this.reader.getn(1);
9090 var name = "k";
9091 }
9092 else if (c == "s" && viml_eqregh(this.reader.peekn(5), "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])")) {
9093 this.reader.getn(1);
9094 var name = "substitute";
9095 }
9096 else if (viml_eqregh(c, "[@*!=><&~#]")) {
9097 this.reader.getn(1);
9098 var name = c;
9099 }
9100 else if (this.reader.peekn(2) == "py") {
9101 var name = this.reader.read_alnum();
9102 }
9103 else {
9104 var pos = this.reader.tell();
9105 var name = this.reader.read_alpha();
9106 if (name != "del" && viml_eqregh(name, "\\v^d%[elete][lp]$")) {
9107 this.reader.seek_set(pos);
9108 var name = this.reader.getn(viml_len(name) - 1);
9109 }
9110 }
9111 if (name == "") {
9112 return NIL;
9113 }
9114 if (viml_has_key(this.find_command_cache, name)) {
9115 return this.find_command_cache[name];
9116 }
9117 var cmd = NIL;
9118 var __c4 = this.builtin_commands;
9119 for (var __i4 = 0; __i4 < __c4.length; ++__i4) {
9120 var x = __c4[__i4];
9121 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9122 delete cmd;
9123 var cmd = x;
9124 break;
9125 }
9126 }
9127 if (this.neovim) {
9128 var __c5 = this.neovim_additional_commands;
9129 for (var __i5 = 0; __i5 < __c5.length; ++__i5) {
9130 var x = __c5[__i5];
9131 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9132 delete cmd;
9133 var cmd = x;
9134 break;
9135 }
9136 }
9137 var __c6 = this.neovim_removed_commands;
9138 for (var __i6 = 0; __i6 < __c6.length; ++__i6) {
9139 var x = __c6[__i6];
9140 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9141 delete cmd;
9142 var cmd = NIL;
9143 break;
9144 }
9145 }
9146 }
9147 // FIXME: user defined command
9148 if ((cmd === NIL || cmd.name == "Print") && viml_eqregh(name, "^[A-Z]")) {
9149 name += this.reader.read_alnum();
9150 delete cmd;
9151 var cmd = {"name":name, "flags":"USERCMD", "parser":"parse_cmd_usercmd"};
9152 }
9153 this.find_command_cache[name] = cmd;
9154 return cmd;
9155}
9156
9157// TODO:
9158VimLParser.prototype.parse_hashbang = function() {
9159 this.reader.getn(-1);
9160}
9161
9162// TODO:
9163// ++opt=val
9164VimLParser.prototype.parse_argopt = function() {
9165 while (this.reader.p(0) == "+" && this.reader.p(1) == "+") {
9166 var s = this.reader.peekn(20);
9167 if (viml_eqregh(s, "^++bin\\>")) {
9168 this.reader.getn(5);
9169 this.ea.force_bin = 1;
9170 }
9171 else if (viml_eqregh(s, "^++nobin\\>")) {
9172 this.reader.getn(7);
9173 this.ea.force_bin = 2;
9174 }
9175 else if (viml_eqregh(s, "^++edit\\>")) {
9176 this.reader.getn(6);
9177 this.ea.read_edit = 1;
9178 }
9179 else if (viml_eqregh(s, "^++ff=\\(dos\\|unix\\|mac\\)\\>")) {
9180 this.reader.getn(5);
9181 this.ea.force_ff = this.reader.read_alpha();
9182 }
9183 else if (viml_eqregh(s, "^++fileformat=\\(dos\\|unix\\|mac\\)\\>")) {
9184 this.reader.getn(13);
9185 this.ea.force_ff = this.reader.read_alpha();
9186 }
9187 else if (viml_eqregh(s, "^++enc=\\S")) {
9188 this.reader.getn(6);
9189 this.ea.force_enc = this.reader.read_nonwhite();
9190 }
9191 else if (viml_eqregh(s, "^++encoding=\\S")) {
9192 this.reader.getn(11);
9193 this.ea.force_enc = this.reader.read_nonwhite();
9194 }
9195 else if (viml_eqregh(s, "^++bad=\\(keep\\|drop\\|.\\)\\>")) {
9196 this.reader.getn(6);
9197 if (viml_eqregh(s, "^++bad=keep")) {
9198 this.ea.bad_char = this.reader.getn(4);
9199 }
9200 else if (viml_eqregh(s, "^++bad=drop")) {
9201 this.ea.bad_char = this.reader.getn(4);
9202 }
9203 else {
9204 this.ea.bad_char = this.reader.getn(1);
9205 }
9206 }
9207 else if (viml_eqregh(s, "^++")) {
9208 throw Err("E474: Invalid Argument", this.reader.getpos());
9209 }
9210 else {
9211 break;
9212 }
9213 this.reader.skip_white();
9214 }
9215}
9216
9217// TODO:
9218// +command
9219VimLParser.prototype.parse_argcmd = function() {
9220 if (this.reader.peekn(1) == "+") {
9221 this.reader.getn(1);
9222 if (this.reader.peekn(1) == " ") {
9223 this.ea.do_ecmd_cmd = "$";
9224 }
9225 else {
9226 this.ea.do_ecmd_cmd = this.read_cmdarg();
9227 }
9228 }
9229}
9230
9231VimLParser.prototype.read_cmdarg = function() {
9232 var r = "";
9233 while (TRUE) {
9234 var c = this.reader.peekn(1);
9235 if (c == "" || iswhite(c)) {
9236 break;
9237 }
9238 this.reader.getn(1);
9239 if (c == "\\") {
9240 var c = this.reader.getn(1);
9241 }
9242 r += c;
9243 }
9244 return r;
9245}
9246
9247VimLParser.prototype.parse_comment = function() {
9248 var npos = this.reader.getpos();
9249 var c = this.reader.get();
9250 if (c != "\"") {
9251 throw Err(viml_printf("unexpected character: %s", c), npos);
9252 }
9253 var node = Node(NODE_COMMENT);
9254 node.pos = npos;
9255 node.str = this.reader.getn(-1);
9256 this.add_node(node);
9257}
9258
9259VimLParser.prototype.parse_trail = function() {
9260 this.reader.skip_white();
9261 var c = this.reader.peek();
9262 if (c == "<EOF>") {
9263 // pass
9264 }
9265 else if (c == "<EOL>") {
9266 this.reader.get();
9267 }
9268 else if (c == "|") {
9269 this.reader.get();
9270 }
9271 else if (c == "\"") {
9272 this.parse_comment();
9273 this.reader.get();
9274 }
9275 else {
9276 throw Err(viml_printf("E488: Trailing characters: %s", c), this.reader.getpos());
9277 }
9278}
9279
9280// modifier or range only command line
9281VimLParser.prototype.parse_cmd_modifier_range = function() {
9282 var node = Node(NODE_EXCMD);
9283 node.pos = this.ea.cmdpos;
9284 node.ea = this.ea;
9285 node.str = this.reader.getstr(this.ea.linepos, this.reader.getpos());
9286 this.add_node(node);
9287}
9288
9289// TODO:
9290VimLParser.prototype.parse_cmd_common = function() {
9291 var end = this.reader.getpos();
9292 if (viml_eqregh(this.ea.cmd.flags, "\\<TRLBAR\\>") && !this.ea.usefilter) {
9293 var end = this.separate_nextcmd();
9294 }
9295 else if (this.ea.cmd.name == "!" || this.ea.cmd.name == "global" || this.ea.cmd.name == "vglobal" || this.ea.usefilter) {
9296 while (TRUE) {
9297 var end = this.reader.getpos();
9298 if (this.reader.getn(1) == "") {
9299 break;
9300 }
9301 }
9302 }
9303 else {
9304 while (TRUE) {
9305 var end = this.reader.getpos();
9306 if (this.reader.getn(1) == "") {
9307 break;
9308 }
9309 }
9310 }
9311 var node = Node(NODE_EXCMD);
9312 node.pos = this.ea.cmdpos;
9313 node.ea = this.ea;
9314 node.str = this.reader.getstr(this.ea.linepos, end);
9315 this.add_node(node);
9316}
9317
9318VimLParser.prototype.separate_nextcmd = function() {
9319 if (this.ea.cmd.name == "vimgrep" || this.ea.cmd.name == "vimgrepadd" || this.ea.cmd.name == "lvimgrep" || this.ea.cmd.name == "lvimgrepadd") {
9320 this.skip_vimgrep_pat();
9321 }
9322 var pc = "";
9323 var end = this.reader.getpos();
9324 var nospend = end;
9325 while (TRUE) {
9326 var end = this.reader.getpos();
9327 if (!iswhite(pc)) {
9328 var nospend = end;
9329 }
9330 var c = this.reader.peek();
9331 if (c == "<EOF>" || c == "<EOL>") {
9332 break;
9333 }
9334 else if (c == "\x16") {
9335 // <C-V>
9336 this.reader.get();
9337 var end = this.reader.getpos();
9338 var nospend = this.reader.getpos();
9339 var c = this.reader.peek();
9340 if (c == "<EOF>" || c == "<EOL>") {
9341 break;
9342 }
9343 this.reader.get();
9344 }
9345 else if (this.reader.peekn(2) == "`=" && viml_eqregh(this.ea.cmd.flags, "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>")) {
9346 this.reader.getn(2);
9347 this.parse_expr();
9348 var c = this.reader.peekn(1);
9349 if (c != "`") {
9350 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9351 }
9352 this.reader.getn(1);
9353 }
9354 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 != "@")) {
9355 var has_cpo_bar = FALSE;
9356 // &cpoptions =~ 'b'
9357 if ((!has_cpo_bar || !viml_eqregh(this.ea.cmd.flags, "\\<USECTRLV\\>")) && pc == "\\") {
9358 this.reader.get();
9359 }
9360 else {
9361 break;
9362 }
9363 }
9364 else {
9365 this.reader.get();
9366 }
9367 var pc = c;
9368 }
9369 if (!viml_eqregh(this.ea.cmd.flags, "\\<NOTRLCOM\\>")) {
9370 var end = nospend;
9371 }
9372 return end;
9373}
9374
9375// FIXME
9376VimLParser.prototype.skip_vimgrep_pat = function() {
9377 if (this.reader.peekn(1) == "") {
9378 // pass
9379 }
9380 else if (isidc(this.reader.peekn(1))) {
9381 // :vimgrep pattern fname
9382 this.reader.read_nonwhite();
9383 }
9384 else {
9385 // :vimgrep /pattern/[g][j] fname
9386 var c = this.reader.getn(1);
9387 var __tmp = this.parse_pattern(c);
9388 var _ = __tmp[0];
9389 var endc = __tmp[1];
9390 if (c != endc) {
9391 return;
9392 }
9393 while (this.reader.p(0) == "g" || this.reader.p(0) == "j") {
9394 this.reader.getn(1);
9395 }
9396 }
9397}
9398
9399VimLParser.prototype.parse_cmd_append = function() {
9400 this.reader.setpos(this.ea.linepos);
9401 var cmdline = this.reader.readline();
9402 var lines = [cmdline];
9403 var m = ".";
9404 while (TRUE) {
9405 if (this.reader.peek() == "<EOF>") {
9406 break;
9407 }
9408 var line = this.reader.getn(-1);
9409 viml_add(lines, line);
9410 if (line == m) {
9411 break;
9412 }
9413 this.reader.get();
9414 }
9415 var node = Node(NODE_EXCMD);
9416 node.pos = this.ea.cmdpos;
9417 node.ea = this.ea;
9418 node.str = viml_join(lines, "\n");
9419 this.add_node(node);
9420}
9421
9422VimLParser.prototype.parse_cmd_insert = function() {
9423 this.parse_cmd_append();
9424}
9425
9426VimLParser.prototype.parse_cmd_loadkeymap = function() {
9427 this.reader.setpos(this.ea.linepos);
9428 var cmdline = this.reader.readline();
9429 var lines = [cmdline];
9430 while (TRUE) {
9431 if (this.reader.peek() == "<EOF>") {
9432 break;
9433 }
9434 var line = this.reader.readline();
9435 viml_add(lines, line);
9436 }
9437 var node = Node(NODE_EXCMD);
9438 node.pos = this.ea.cmdpos;
9439 node.ea = this.ea;
9440 node.str = viml_join(lines, "\n");
9441 this.add_node(node);
9442}
9443
9444VimLParser.prototype.parse_cmd_lua = function() {
9445 var lines = [];
9446 this.reader.skip_white();
9447 if (this.reader.peekn(2) == "<<") {
9448 this.reader.getn(2);
9449 this.reader.skip_white();
9450 var m = this.reader.readline();
9451 if (m == "") {
9452 var m = ".";
9453 }
9454 this.reader.setpos(this.ea.linepos);
9455 var cmdline = this.reader.getn(-1);
9456 var lines = [cmdline];
9457 this.reader.get();
9458 while (TRUE) {
9459 if (this.reader.peek() == "<EOF>") {
9460 break;
9461 }
9462 var line = this.reader.getn(-1);
9463 viml_add(lines, line);
9464 if (line == m) {
9465 break;
9466 }
9467 this.reader.get();
9468 }
9469 }
9470 else {
9471 this.reader.setpos(this.ea.linepos);
9472 var cmdline = this.reader.getn(-1);
9473 var lines = [cmdline];
9474 }
9475 var node = Node(NODE_EXCMD);
9476 node.pos = this.ea.cmdpos;
9477 node.ea = this.ea;
9478 node.str = viml_join(lines, "\n");
9479 this.add_node(node);
9480}
9481
9482VimLParser.prototype.parse_cmd_mzscheme = function() {
9483 this.parse_cmd_lua();
9484}
9485
9486VimLParser.prototype.parse_cmd_perl = function() {
9487 this.parse_cmd_lua();
9488}
9489
9490VimLParser.prototype.parse_cmd_python = function() {
9491 this.parse_cmd_lua();
9492}
9493
9494VimLParser.prototype.parse_cmd_python3 = function() {
9495 this.parse_cmd_lua();
9496}
9497
9498VimLParser.prototype.parse_cmd_ruby = function() {
9499 this.parse_cmd_lua();
9500}
9501
9502VimLParser.prototype.parse_cmd_tcl = function() {
9503 this.parse_cmd_lua();
9504}
9505
9506VimLParser.prototype.parse_cmd_finish = function() {
9507 this.parse_cmd_common();
9508 if (this.context[0].type == NODE_TOPLEVEL) {
9509 this.reader.seek_end(0);
9510 }
9511}
9512
9513// FIXME
9514VimLParser.prototype.parse_cmd_usercmd = function() {
9515 this.parse_cmd_common();
9516}
9517
9518VimLParser.prototype.parse_cmd_function = function() {
9519 var pos = this.reader.tell();
9520 this.reader.skip_white();
9521 // :function
9522 if (this.ends_excmds(this.reader.peek())) {
9523 this.reader.seek_set(pos);
9524 this.parse_cmd_common();
9525 return;
9526 }
9527 // :function /pattern
9528 if (this.reader.peekn(1) == "/") {
9529 this.reader.seek_set(pos);
9530 this.parse_cmd_common();
9531 return;
9532 }
9533 var left = this.parse_lvalue_func();
9534 this.reader.skip_white();
9535 if (left.type == NODE_IDENTIFIER) {
9536 var s = left.value;
9537 var ss = viml_split(s, "\\zs");
9538 if (ss[0] != "<" && ss[0] != "_" && !isupper(ss[0]) && viml_stridx(s, ":") == -1 && viml_stridx(s, "#") == -1) {
9539 throw Err(viml_printf("E128: Function name must start with a capital or contain a colon: %s", s), left.pos);
9540 }
9541 }
9542 // :function {name}
9543 if (this.reader.peekn(1) != "(") {
9544 this.reader.seek_set(pos);
9545 this.parse_cmd_common();
9546 return;
9547 }
9548 // :function[!] {name}([arguments]) [range] [abort] [dict] [closure]
9549 var node = Node(NODE_FUNCTION);
9550 node.pos = this.ea.cmdpos;
9551 node.body = [];
9552 node.ea = this.ea;
9553 node.left = left;
9554 node.rlist = [];
9555 node.default_args = [];
9556 node.attr = {"range":0, "abort":0, "dict":0, "closure":0};
9557 node.endfunction = NIL;
9558 this.reader.getn(1);
9559 var tokenizer = new ExprTokenizer(this.reader);
9560 if (tokenizer.peek().type == TOKEN_PCLOSE) {
9561 tokenizer.get();
9562 }
9563 else {
9564 var named = {};
9565 while (TRUE) {
9566 var varnode = Node(NODE_IDENTIFIER);
9567 var token = tokenizer.get();
9568 if (token.type == TOKEN_IDENTIFIER) {
9569 if (!isargname(token.value) || token.value == "firstline" || token.value == "lastline") {
9570 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
9571 }
9572 else if (viml_has_key(named, token.value)) {
9573 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
9574 }
9575 named[token.value] = 1;
9576 varnode.pos = token.pos;
9577 varnode.value = token.value;
9578 viml_add(node.rlist, varnode);
9579 if (tokenizer.peek().type == TOKEN_EQ) {
9580 tokenizer.get();
9581 viml_add(node.default_args, this.parse_expr());
9582 }
9583 else if (viml_len(node.default_args) > 0) {
9584 throw Err("E989: Non-default argument follows default argument", varnode.pos);
9585 }
9586 // XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
9587 if (iswhite(this.reader.p(0)) && tokenizer.peek().type == TOKEN_COMMA) {
9588 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
9589 }
9590 var token = tokenizer.get();
9591 if (token.type == TOKEN_COMMA) {
9592 // XXX: Vim allows last comma. F(a, b, ) => OK
9593 if (tokenizer.peek().type == TOKEN_PCLOSE) {
9594 tokenizer.get();
9595 break;
9596 }
9597 }
9598 else if (token.type == TOKEN_PCLOSE) {
9599 break;
9600 }
9601 else {
9602 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9603 }
9604 }
9605 else if (token.type == TOKEN_DOTDOTDOT) {
9606 varnode.pos = token.pos;
9607 varnode.value = token.value;
9608 viml_add(node.rlist, varnode);
9609 var token = tokenizer.get();
9610 if (token.type == TOKEN_PCLOSE) {
9611 break;
9612 }
9613 else {
9614 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9615 }
9616 }
9617 else {
9618 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9619 }
9620 }
9621 }
9622 while (TRUE) {
9623 this.reader.skip_white();
9624 var epos = this.reader.getpos();
9625 var key = this.reader.read_alpha();
9626 if (key == "") {
9627 break;
9628 }
9629 else if (key == "range") {
9630 node.attr.range = TRUE;
9631 }
9632 else if (key == "abort") {
9633 node.attr.abort = TRUE;
9634 }
9635 else if (key == "dict") {
9636 node.attr.dict = TRUE;
9637 }
9638 else if (key == "closure") {
9639 node.attr.closure = TRUE;
9640 }
9641 else {
9642 throw Err(viml_printf("unexpected token: %s", key), epos);
9643 }
9644 }
9645 this.add_node(node);
9646 this.push_context(node);
9647}
9648
9649VimLParser.prototype.parse_cmd_endfunction = function() {
9650 this.check_missing_endif("ENDFUNCTION", this.ea.cmdpos);
9651 this.check_missing_endtry("ENDFUNCTION", this.ea.cmdpos);
9652 this.check_missing_endwhile("ENDFUNCTION", this.ea.cmdpos);
9653 this.check_missing_endfor("ENDFUNCTION", this.ea.cmdpos);
9654 if (this.context[0].type != NODE_FUNCTION) {
9655 throw Err("E193: :endfunction not inside a function", this.ea.cmdpos);
9656 }
9657 this.reader.getn(-1);
9658 var node = Node(NODE_ENDFUNCTION);
9659 node.pos = this.ea.cmdpos;
9660 node.ea = this.ea;
9661 this.context[0].endfunction = node;
9662 this.pop_context();
9663}
9664
9665VimLParser.prototype.parse_cmd_delfunction = function() {
9666 var node = Node(NODE_DELFUNCTION);
9667 node.pos = this.ea.cmdpos;
9668 node.ea = this.ea;
9669 node.left = this.parse_lvalue_func();
9670 this.add_node(node);
9671}
9672
9673VimLParser.prototype.parse_cmd_return = function() {
9674 if (this.find_context(NODE_FUNCTION) == -1) {
9675 throw Err("E133: :return not inside a function", this.ea.cmdpos);
9676 }
9677 var node = Node(NODE_RETURN);
9678 node.pos = this.ea.cmdpos;
9679 node.ea = this.ea;
9680 node.left = NIL;
9681 this.reader.skip_white();
9682 var c = this.reader.peek();
9683 if (c == "\"" || !this.ends_excmds(c)) {
9684 node.left = this.parse_expr();
9685 }
9686 this.add_node(node);
9687}
9688
9689VimLParser.prototype.parse_cmd_call = function() {
9690 var node = Node(NODE_EXCALL);
9691 node.pos = this.ea.cmdpos;
9692 node.ea = this.ea;
9693 this.reader.skip_white();
9694 var c = this.reader.peek();
9695 if (this.ends_excmds(c)) {
9696 throw Err("E471: Argument required", this.reader.getpos());
9697 }
9698 node.left = this.parse_expr();
9699 if (node.left.type != NODE_CALL) {
9700 throw Err("Not a function call", node.left.pos);
9701 }
9702 this.add_node(node);
9703}
9704
9705VimLParser.prototype.parse_heredoc = function() {
9706 var node = Node(NODE_HEREDOC);
9707 node.pos = this.ea.cmdpos;
9708 node.op = "";
9709 node.rlist = [];
9710 node.body = [];
9711 while (TRUE) {
9712 this.reader.skip_white();
9713 var key = this.reader.read_word();
9714 if (key == "") {
9715 break;
9716 }
9717 if (!islower(key[0])) {
9718 node.op = key;
9719 break;
9720 }
9721 else {
9722 viml_add(node.rlist, key);
9723 }
9724 }
9725 if (node.op == "") {
9726 throw Err("E172: Missing marker", this.reader.getpos());
9727 }
9728 this.parse_trail();
9729 while (TRUE) {
9730 if (this.reader.peek() == "<EOF>") {
9731 break;
9732 }
9733 var line = this.reader.getn(-1);
9734 if (line == node.op) {
9735 return node;
9736 }
9737 viml_add(node.body, line);
9738 this.reader.get();
9739 }
9740 throw Err(viml_printf("E990: Missing end marker '%s'", node.op), this.reader.getpos());
9741}
9742
9743VimLParser.prototype.parse_cmd_let = function() {
9744 var pos = this.reader.tell();
9745 this.reader.skip_white();
9746 // :let
9747 if (this.ends_excmds(this.reader.peek())) {
9748 this.reader.seek_set(pos);
9749 this.parse_cmd_common();
9750 return;
9751 }
9752 var lhs = this.parse_letlhs();
9753 this.reader.skip_white();
9754 var s1 = this.reader.peekn(1);
9755 var s2 = this.reader.peekn(2);
9756 // TODO check scriptversion?
9757 if (s2 == "..") {
9758 var s2 = this.reader.peekn(3);
9759 }
9760 else if (s2 == "=<") {
9761 var s2 = this.reader.peekn(3);
9762 }
9763 // :let {var-name} ..
9764 if (this.ends_excmds(s1) || s2 != "+=" && s2 != "-=" && s2 != ".=" && s2 != "..=" && s2 != "*=" && s2 != "/=" && s2 != "%=" && s2 != "=<<" && s1 != "=") {
9765 this.reader.seek_set(pos);
9766 this.parse_cmd_common();
9767 return;
9768 }
9769 // :let left op right
9770 var node = Node(NODE_LET);
9771 node.pos = this.ea.cmdpos;
9772 node.ea = this.ea;
9773 node.op = "";
9774 node.left = lhs.left;
9775 node.list = lhs.list;
9776 node.rest = lhs.rest;
9777 node.right = NIL;
9778 if (s2 == "+=" || s2 == "-=" || s2 == ".=" || s2 == "..=" || s2 == "*=" || s2 == "/=" || s2 == "%=") {
9779 this.reader.getn(viml_len(s2));
9780 node.op = s2;
9781 }
9782 else if (s2 == "=<<") {
9783 this.reader.getn(viml_len(s2));
9784 this.reader.skip_white();
9785 node.op = s2;
9786 node.right = this.parse_heredoc();
9787 this.add_node(node);
9788 return;
9789 }
9790 else if (s1 == "=") {
9791 this.reader.getn(1);
9792 node.op = s1;
9793 }
9794 else {
9795 throw "NOT REACHED";
9796 }
9797 node.right = this.parse_expr();
9798 this.add_node(node);
9799}
9800
9801VimLParser.prototype.parse_cmd_const = function() {
9802 var pos = this.reader.tell();
9803 this.reader.skip_white();
9804 // :const
9805 if (this.ends_excmds(this.reader.peek())) {
9806 this.reader.seek_set(pos);
9807 this.parse_cmd_common();
9808 return;
9809 }
9810 var lhs = this.parse_constlhs();
9811 this.reader.skip_white();
9812 var s1 = this.reader.peekn(1);
9813 // :const {var-name}
9814 if (this.ends_excmds(s1) || s1 != "=") {
9815 this.reader.seek_set(pos);
9816 this.parse_cmd_common();
9817 return;
9818 }
9819 // :const left op right
9820 var node = Node(NODE_CONST);
9821 node.pos = this.ea.cmdpos;
9822 node.ea = this.ea;
9823 this.reader.getn(1);
9824 node.op = s1;
9825 node.left = lhs.left;
9826 node.list = lhs.list;
9827 node.rest = lhs.rest;
9828 node.right = this.parse_expr();
9829 this.add_node(node);
9830}
9831
9832VimLParser.prototype.parse_cmd_unlet = function() {
9833 var node = Node(NODE_UNLET);
9834 node.pos = this.ea.cmdpos;
9835 node.ea = this.ea;
9836 node.list = this.parse_lvaluelist();
9837 this.add_node(node);
9838}
9839
9840VimLParser.prototype.parse_cmd_lockvar = function() {
9841 var node = Node(NODE_LOCKVAR);
9842 node.pos = this.ea.cmdpos;
9843 node.ea = this.ea;
9844 node.depth = NIL;
9845 node.list = [];
9846 this.reader.skip_white();
9847 if (isdigit(this.reader.peekn(1))) {
9848 node.depth = viml_str2nr(this.reader.read_digit(), 10);
9849 }
9850 node.list = this.parse_lvaluelist();
9851 this.add_node(node);
9852}
9853
9854VimLParser.prototype.parse_cmd_unlockvar = function() {
9855 var node = Node(NODE_UNLOCKVAR);
9856 node.pos = this.ea.cmdpos;
9857 node.ea = this.ea;
9858 node.depth = NIL;
9859 node.list = [];
9860 this.reader.skip_white();
9861 if (isdigit(this.reader.peekn(1))) {
9862 node.depth = viml_str2nr(this.reader.read_digit(), 10);
9863 }
9864 node.list = this.parse_lvaluelist();
9865 this.add_node(node);
9866}
9867
9868VimLParser.prototype.parse_cmd_if = function() {
9869 var node = Node(NODE_IF);
9870 node.pos = this.ea.cmdpos;
9871 node.body = [];
9872 node.ea = this.ea;
9873 node.cond = this.parse_expr();
9874 node.elseif = [];
9875 node._else = NIL;
9876 node.endif = NIL;
9877 this.add_node(node);
9878 this.push_context(node);
9879}
9880
9881VimLParser.prototype.parse_cmd_elseif = function() {
9882 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9883 throw Err("E582: :elseif without :if", this.ea.cmdpos);
9884 }
9885 if (this.context[0].type != NODE_IF) {
9886 this.pop_context();
9887 }
9888 var node = Node(NODE_ELSEIF);
9889 node.pos = this.ea.cmdpos;
9890 node.body = [];
9891 node.ea = this.ea;
9892 node.cond = this.parse_expr();
9893 viml_add(this.context[0].elseif, node);
9894 this.push_context(node);
9895}
9896
9897VimLParser.prototype.parse_cmd_else = function() {
9898 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9899 throw Err("E581: :else without :if", this.ea.cmdpos);
9900 }
9901 if (this.context[0].type != NODE_IF) {
9902 this.pop_context();
9903 }
9904 var node = Node(NODE_ELSE);
9905 node.pos = this.ea.cmdpos;
9906 node.body = [];
9907 node.ea = this.ea;
9908 this.context[0]._else = node;
9909 this.push_context(node);
9910}
9911
9912VimLParser.prototype.parse_cmd_endif = function() {
9913 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF && this.context[0].type != NODE_ELSE) {
9914 throw Err("E580: :endif without :if", this.ea.cmdpos);
9915 }
9916 if (this.context[0].type != NODE_IF) {
9917 this.pop_context();
9918 }
9919 var node = Node(NODE_ENDIF);
9920 node.pos = this.ea.cmdpos;
9921 node.ea = this.ea;
9922 this.context[0].endif = node;
9923 this.pop_context();
9924}
9925
9926VimLParser.prototype.parse_cmd_while = function() {
9927 var node = Node(NODE_WHILE);
9928 node.pos = this.ea.cmdpos;
9929 node.body = [];
9930 node.ea = this.ea;
9931 node.cond = this.parse_expr();
9932 node.endwhile = NIL;
9933 this.add_node(node);
9934 this.push_context(node);
9935}
9936
9937VimLParser.prototype.parse_cmd_endwhile = function() {
9938 if (this.context[0].type != NODE_WHILE) {
9939 throw Err("E588: :endwhile without :while", this.ea.cmdpos);
9940 }
9941 var node = Node(NODE_ENDWHILE);
9942 node.pos = this.ea.cmdpos;
9943 node.ea = this.ea;
9944 this.context[0].endwhile = node;
9945 this.pop_context();
9946}
9947
9948VimLParser.prototype.parse_cmd_for = function() {
9949 var node = Node(NODE_FOR);
9950 node.pos = this.ea.cmdpos;
9951 node.body = [];
9952 node.ea = this.ea;
9953 node.left = NIL;
9954 node.right = NIL;
9955 node.endfor = NIL;
9956 var lhs = this.parse_letlhs();
9957 node.left = lhs.left;
9958 node.list = lhs.list;
9959 node.rest = lhs.rest;
9960 this.reader.skip_white();
9961 var epos = this.reader.getpos();
9962 if (this.reader.read_alpha() != "in") {
9963 throw Err("Missing \"in\" after :for", epos);
9964 }
9965 node.right = this.parse_expr();
9966 this.add_node(node);
9967 this.push_context(node);
9968}
9969
9970VimLParser.prototype.parse_cmd_endfor = function() {
9971 if (this.context[0].type != NODE_FOR) {
9972 throw Err("E588: :endfor without :for", this.ea.cmdpos);
9973 }
9974 var node = Node(NODE_ENDFOR);
9975 node.pos = this.ea.cmdpos;
9976 node.ea = this.ea;
9977 this.context[0].endfor = node;
9978 this.pop_context();
9979}
9980
9981VimLParser.prototype.parse_cmd_continue = function() {
9982 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9983 throw Err("E586: :continue without :while or :for", this.ea.cmdpos);
9984 }
9985 var node = Node(NODE_CONTINUE);
9986 node.pos = this.ea.cmdpos;
9987 node.ea = this.ea;
9988 this.add_node(node);
9989}
9990
9991VimLParser.prototype.parse_cmd_break = function() {
9992 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9993 throw Err("E587: :break without :while or :for", this.ea.cmdpos);
9994 }
9995 var node = Node(NODE_BREAK);
9996 node.pos = this.ea.cmdpos;
9997 node.ea = this.ea;
9998 this.add_node(node);
9999}
10000
10001VimLParser.prototype.parse_cmd_try = function() {
10002 var node = Node(NODE_TRY);
10003 node.pos = this.ea.cmdpos;
10004 node.body = [];
10005 node.ea = this.ea;
10006 node.catch = [];
10007 node._finally = NIL;
10008 node.endtry = NIL;
10009 this.add_node(node);
10010 this.push_context(node);
10011}
10012
10013VimLParser.prototype.parse_cmd_catch = function() {
10014 if (this.context[0].type == NODE_FINALLY) {
10015 throw Err("E604: :catch after :finally", this.ea.cmdpos);
10016 }
10017 else if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
10018 throw Err("E603: :catch without :try", this.ea.cmdpos);
10019 }
10020 if (this.context[0].type != NODE_TRY) {
10021 this.pop_context();
10022 }
10023 var node = Node(NODE_CATCH);
10024 node.pos = this.ea.cmdpos;
10025 node.body = [];
10026 node.ea = this.ea;
10027 node.pattern = NIL;
10028 this.reader.skip_white();
10029 if (!this.ends_excmds(this.reader.peek())) {
10030 var __tmp = this.parse_pattern(this.reader.get());
10031 node.pattern = __tmp[0];
10032 var _ = __tmp[1];
10033 }
10034 viml_add(this.context[0].catch, node);
10035 this.push_context(node);
10036}
10037
10038VimLParser.prototype.parse_cmd_finally = function() {
10039 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
10040 throw Err("E606: :finally without :try", this.ea.cmdpos);
10041 }
10042 if (this.context[0].type != NODE_TRY) {
10043 this.pop_context();
10044 }
10045 var node = Node(NODE_FINALLY);
10046 node.pos = this.ea.cmdpos;
10047 node.body = [];
10048 node.ea = this.ea;
10049 this.context[0]._finally = node;
10050 this.push_context(node);
10051}
10052
10053VimLParser.prototype.parse_cmd_endtry = function() {
10054 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH && this.context[0].type != NODE_FINALLY) {
10055 throw Err("E602: :endtry without :try", this.ea.cmdpos);
10056 }
10057 if (this.context[0].type != NODE_TRY) {
10058 this.pop_context();
10059 }
10060 var node = Node(NODE_ENDTRY);
10061 node.pos = this.ea.cmdpos;
10062 node.ea = this.ea;
10063 this.context[0].endtry = node;
10064 this.pop_context();
10065}
10066
10067VimLParser.prototype.parse_cmd_throw = function() {
10068 var node = Node(NODE_THROW);
10069 node.pos = this.ea.cmdpos;
10070 node.ea = this.ea;
10071 node.left = this.parse_expr();
10072 this.add_node(node);
10073}
10074
10075VimLParser.prototype.parse_cmd_eval = function() {
10076 var node = Node(NODE_EVAL);
10077 node.pos = this.ea.cmdpos;
10078 node.ea = this.ea;
10079 node.left = this.parse_expr();
10080 this.add_node(node);
10081}
10082
10083VimLParser.prototype.parse_cmd_echo = function() {
10084 var node = Node(NODE_ECHO);
10085 node.pos = this.ea.cmdpos;
10086 node.ea = this.ea;
10087 node.list = this.parse_exprlist();
10088 this.add_node(node);
10089}
10090
10091VimLParser.prototype.parse_cmd_echon = function() {
10092 var node = Node(NODE_ECHON);
10093 node.pos = this.ea.cmdpos;
10094 node.ea = this.ea;
10095 node.list = this.parse_exprlist();
10096 this.add_node(node);
10097}
10098
10099VimLParser.prototype.parse_cmd_echohl = function() {
10100 var node = Node(NODE_ECHOHL);
10101 node.pos = this.ea.cmdpos;
10102 node.ea = this.ea;
10103 node.str = "";
10104 while (!this.ends_excmds(this.reader.peek())) {
10105 node.str += this.reader.get();
10106 }
10107 this.add_node(node);
10108}
10109
10110VimLParser.prototype.parse_cmd_echomsg = function() {
10111 var node = Node(NODE_ECHOMSG);
10112 node.pos = this.ea.cmdpos;
10113 node.ea = this.ea;
10114 node.list = this.parse_exprlist();
10115 this.add_node(node);
10116}
10117
10118VimLParser.prototype.parse_cmd_echoerr = function() {
10119 var node = Node(NODE_ECHOERR);
10120 node.pos = this.ea.cmdpos;
10121 node.ea = this.ea;
10122 node.list = this.parse_exprlist();
10123 this.add_node(node);
10124}
10125
10126VimLParser.prototype.parse_cmd_execute = function() {
10127 var node = Node(NODE_EXECUTE);
10128 node.pos = this.ea.cmdpos;
10129 node.ea = this.ea;
10130 node.list = this.parse_exprlist();
10131 this.add_node(node);
10132}
10133
10134VimLParser.prototype.parse_expr = function() {
10135 return new ExprParser(this.reader).parse();
10136}
10137
10138VimLParser.prototype.parse_exprlist = function() {
10139 var list = [];
10140 while (TRUE) {
10141 this.reader.skip_white();
10142 var c = this.reader.peek();
10143 if (c != "\"" && this.ends_excmds(c)) {
10144 break;
10145 }
10146 var node = this.parse_expr();
10147 viml_add(list, node);
10148 }
10149 return list;
10150}
10151
10152VimLParser.prototype.parse_lvalue_func = function() {
10153 var p = new LvalueParser(this.reader);
10154 var node = p.parse();
10155 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) {
10156 return node;
10157 }
10158 throw Err("Invalid Expression", node.pos);
10159}
10160
10161// FIXME:
10162VimLParser.prototype.parse_lvalue = function() {
10163 var p = new LvalueParser(this.reader);
10164 var node = p.parse();
10165 if (node.type == NODE_IDENTIFIER) {
10166 if (!isvarname(node.value)) {
10167 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
10168 }
10169 }
10170 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) {
10171 return node;
10172 }
10173 throw Err("Invalid Expression", node.pos);
10174}
10175
10176// TODO: merge with s:VimLParser.parse_lvalue()
10177VimLParser.prototype.parse_constlvalue = function() {
10178 var p = new LvalueParser(this.reader);
10179 var node = p.parse();
10180 if (node.type == NODE_IDENTIFIER) {
10181 if (!isvarname(node.value)) {
10182 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
10183 }
10184 }
10185 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME) {
10186 return node;
10187 }
10188 else if (node.type == NODE_SUBSCRIPT || node.type == NODE_SLICE || node.type == NODE_DOT) {
10189 throw Err("E996: Cannot lock a list or dict", node.pos);
10190 }
10191 else if (node.type == NODE_OPTION) {
10192 throw Err("E996: Cannot lock an option", node.pos);
10193 }
10194 else if (node.type == NODE_ENV) {
10195 throw Err("E996: Cannot lock an environment variable", node.pos);
10196 }
10197 else if (node.type == NODE_REG) {
10198 throw Err("E996: Cannot lock a register", node.pos);
10199 }
10200 throw Err("Invalid Expression", node.pos);
10201}
10202
10203VimLParser.prototype.parse_lvaluelist = function() {
10204 var list = [];
10205 var node = this.parse_expr();
10206 viml_add(list, node);
10207 while (TRUE) {
10208 this.reader.skip_white();
10209 if (this.ends_excmds(this.reader.peek())) {
10210 break;
10211 }
10212 var node = this.parse_lvalue();
10213 viml_add(list, node);
10214 }
10215 return list;
10216}
10217
10218// FIXME:
10219VimLParser.prototype.parse_letlhs = function() {
10220 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
10221 var tokenizer = new ExprTokenizer(this.reader);
10222 if (tokenizer.peek().type == TOKEN_SQOPEN) {
10223 tokenizer.get();
10224 lhs.list = [];
10225 while (TRUE) {
10226 var node = this.parse_lvalue();
10227 viml_add(lhs.list, node);
10228 var token = tokenizer.get();
10229 if (token.type == TOKEN_SQCLOSE) {
10230 break;
10231 }
10232 else if (token.type == TOKEN_COMMA) {
10233 continue;
10234 }
10235 else if (token.type == TOKEN_SEMICOLON) {
10236 var node = this.parse_lvalue();
10237 lhs.rest = node;
10238 var token = tokenizer.get();
10239 if (token.type == TOKEN_SQCLOSE) {
10240 break;
10241 }
10242 else {
10243 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10244 }
10245 }
10246 else {
10247 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10248 }
10249 }
10250 }
10251 else {
10252 lhs.left = this.parse_lvalue();
10253 }
10254 return lhs;
10255}
10256
10257// TODO: merge with s:VimLParser.parse_letlhs() ?
10258VimLParser.prototype.parse_constlhs = function() {
10259 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
10260 var tokenizer = new ExprTokenizer(this.reader);
10261 if (tokenizer.peek().type == TOKEN_SQOPEN) {
10262 tokenizer.get();
10263 lhs.list = [];
10264 while (TRUE) {
10265 var node = this.parse_lvalue();
10266 viml_add(lhs.list, node);
10267 var token = tokenizer.get();
10268 if (token.type == TOKEN_SQCLOSE) {
10269 break;
10270 }
10271 else if (token.type == TOKEN_COMMA) {
10272 continue;
10273 }
10274 else if (token.type == TOKEN_SEMICOLON) {
10275 var node = this.parse_lvalue();
10276 lhs.rest = node;
10277 var token = tokenizer.get();
10278 if (token.type == TOKEN_SQCLOSE) {
10279 break;
10280 }
10281 else {
10282 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10283 }
10284 }
10285 else {
10286 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10287 }
10288 }
10289 }
10290 else {
10291 lhs.left = this.parse_constlvalue();
10292 }
10293 return lhs;
10294}
10295
10296VimLParser.prototype.ends_excmds = function(c) {
10297 return c == "" || c == "|" || c == "\"" || c == "<EOF>" || c == "<EOL>";
10298}
10299
10300// FIXME: validate argument
10301VimLParser.prototype.parse_wincmd = function() {
10302 var c = this.reader.getn(1);
10303 if (c == "") {
10304 throw Err("E471: Argument required", this.reader.getpos());
10305 }
10306 else if (c == "g" || c == "\x07") {
10307 // <C-G>
10308 var c2 = this.reader.getn(1);
10309 if (c2 == "" || iswhite(c2)) {
10310 throw Err("E474: Invalid Argument", this.reader.getpos());
10311 }
10312 }
10313 var end = this.reader.getpos();
10314 this.reader.skip_white();
10315 if (!this.ends_excmds(this.reader.peek())) {
10316 throw Err("E474: Invalid Argument", this.reader.getpos());
10317 }
10318 var node = Node(NODE_EXCMD);
10319 node.pos = this.ea.cmdpos;
10320 node.ea = this.ea;
10321 node.str = this.reader.getstr(this.ea.linepos, end);
10322 this.add_node(node);
10323}
10324
10325// FIXME: validate argument
10326VimLParser.prototype.parse_cmd_syntax = function() {
10327 var end = this.reader.getpos();
10328 while (TRUE) {
10329 var end = this.reader.getpos();
10330 var c = this.reader.peek();
10331 if (c == "/" || c == "'" || c == "\"") {
10332 this.reader.getn(1);
10333 this.parse_pattern(c);
10334 }
10335 else if (c == "=") {
10336 this.reader.getn(1);
10337 this.parse_pattern(" ");
10338 }
10339 else if (this.ends_excmds(c)) {
10340 break;
10341 }
10342 this.reader.getn(1);
10343 }
10344 var node = Node(NODE_EXCMD);
10345 node.pos = this.ea.cmdpos;
10346 node.ea = this.ea;
10347 node.str = this.reader.getstr(this.ea.linepos, end);
10348 this.add_node(node);
10349}
10350
10351VimLParser.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"}];
10352VimLParser.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"}];
10353// To find new builtin_commands, run the below script.
10354// $ scripts/update_builtin_commands.sh /path/to/vim/src/ex_cmds.h
10355VimLParser.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"}];
10356// To find new builtin_functions, run the below script.
10357// $ scripts/update_builtin_functions.sh /path/to/vim/src/evalfunc.c
10358VimLParser.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"}];
10359function ExprTokenizer() { this.__init__.apply(this, arguments); }
10360ExprTokenizer.prototype.__init__ = function(reader) {
10361 this.reader = reader;
10362 this.cache = {};
10363}
10364
10365ExprTokenizer.prototype.token = function(type, value, pos) {
10366 return {"type":type, "value":value, "pos":pos};
10367}
10368
10369ExprTokenizer.prototype.peek = function() {
10370 var pos = this.reader.tell();
10371 var r = this.get();
10372 this.reader.seek_set(pos);
10373 return r;
10374}
10375
10376ExprTokenizer.prototype.get = function() {
10377 // FIXME: remove dirty hack
10378 if (viml_has_key(this.cache, this.reader.tell())) {
10379 var x = this.cache[this.reader.tell()];
10380 this.reader.seek_set(x[0]);
10381 return x[1];
10382 }
10383 var pos = this.reader.tell();
10384 this.reader.skip_white();
10385 var r = this.get2();
10386 this.cache[pos] = [this.reader.tell(), r];
10387 return r;
10388}
10389
10390ExprTokenizer.prototype.get2 = function() {
10391 var r = this.reader;
10392 var pos = r.getpos();
10393 var c = r.peek();
10394 if (c == "<EOF>") {
10395 return this.token(TOKEN_EOF, c, pos);
10396 }
10397 else if (c == "<EOL>") {
10398 r.seek_cur(1);
10399 return this.token(TOKEN_EOL, c, pos);
10400 }
10401 else if (iswhite(c)) {
10402 var s = r.read_white();
10403 return this.token(TOKEN_SPACE, s, pos);
10404 }
10405 else if (c == "0" && (r.p(1) == "X" || r.p(1) == "x") && isxdigit(r.p(2))) {
10406 var s = r.getn(3);
10407 s += r.read_xdigit();
10408 return this.token(TOKEN_NUMBER, s, pos);
10409 }
10410 else if (c == "0" && (r.p(1) == "B" || r.p(1) == "b") && (r.p(2) == "0" || r.p(2) == "1")) {
10411 var s = r.getn(3);
10412 s += r.read_bdigit();
10413 return this.token(TOKEN_NUMBER, s, pos);
10414 }
10415 else if (c == "0" && (r.p(1) == "Z" || r.p(1) == "z") && r.p(2) != ".") {
10416 var s = r.getn(2);
10417 s += r.read_blob();
10418 return this.token(TOKEN_BLOB, s, pos);
10419 }
10420 else if (isdigit(c)) {
10421 var s = r.read_digit();
10422 if (r.p(0) == "." && isdigit(r.p(1))) {
10423 s += r.getn(1);
10424 s += r.read_digit();
10425 if ((r.p(0) == "E" || r.p(0) == "e") && (isdigit(r.p(1)) || (r.p(1) == "-" || r.p(1) == "+") && isdigit(r.p(2)))) {
10426 s += r.getn(2);
10427 s += r.read_digit();
10428 }
10429 }
10430 return this.token(TOKEN_NUMBER, s, pos);
10431 }
10432 else if (c == "i" && r.p(1) == "s" && !isidc(r.p(2))) {
10433 if (r.p(2) == "?") {
10434 r.seek_cur(3);
10435 return this.token(TOKEN_ISCI, "is?", pos);
10436 }
10437 else if (r.p(2) == "#") {
10438 r.seek_cur(3);
10439 return this.token(TOKEN_ISCS, "is#", pos);
10440 }
10441 else {
10442 r.seek_cur(2);
10443 return this.token(TOKEN_IS, "is", pos);
10444 }
10445 }
10446 else if (c == "i" && r.p(1) == "s" && r.p(2) == "n" && r.p(3) == "o" && r.p(4) == "t" && !isidc(r.p(5))) {
10447 if (r.p(5) == "?") {
10448 r.seek_cur(6);
10449 return this.token(TOKEN_ISNOTCI, "isnot?", pos);
10450 }
10451 else if (r.p(5) == "#") {
10452 r.seek_cur(6);
10453 return this.token(TOKEN_ISNOTCS, "isnot#", pos);
10454 }
10455 else {
10456 r.seek_cur(5);
10457 return this.token(TOKEN_ISNOT, "isnot", pos);
10458 }
10459 }
10460 else if (isnamec1(c)) {
10461 var s = r.read_name();
10462 return this.token(TOKEN_IDENTIFIER, s, pos);
10463 }
10464 else if (c == "|" && r.p(1) == "|") {
10465 r.seek_cur(2);
10466 return this.token(TOKEN_OROR, "||", pos);
10467 }
10468 else if (c == "&" && r.p(1) == "&") {
10469 r.seek_cur(2);
10470 return this.token(TOKEN_ANDAND, "&&", pos);
10471 }
10472 else if (c == "=" && r.p(1) == "=") {
10473 if (r.p(2) == "?") {
10474 r.seek_cur(3);
10475 return this.token(TOKEN_EQEQCI, "==?", pos);
10476 }
10477 else if (r.p(2) == "#") {
10478 r.seek_cur(3);
10479 return this.token(TOKEN_EQEQCS, "==#", pos);
10480 }
10481 else {
10482 r.seek_cur(2);
10483 return this.token(TOKEN_EQEQ, "==", pos);
10484 }
10485 }
10486 else if (c == "!" && r.p(1) == "=") {
10487 if (r.p(2) == "?") {
10488 r.seek_cur(3);
10489 return this.token(TOKEN_NEQCI, "!=?", pos);
10490 }
10491 else if (r.p(2) == "#") {
10492 r.seek_cur(3);
10493 return this.token(TOKEN_NEQCS, "!=#", pos);
10494 }
10495 else {
10496 r.seek_cur(2);
10497 return this.token(TOKEN_NEQ, "!=", pos);
10498 }
10499 }
10500 else if (c == ">" && r.p(1) == "=") {
10501 if (r.p(2) == "?") {
10502 r.seek_cur(3);
10503 return this.token(TOKEN_GTEQCI, ">=?", pos);
10504 }
10505 else if (r.p(2) == "#") {
10506 r.seek_cur(3);
10507 return this.token(TOKEN_GTEQCS, ">=#", pos);
10508 }
10509 else {
10510 r.seek_cur(2);
10511 return this.token(TOKEN_GTEQ, ">=", pos);
10512 }
10513 }
10514 else if (c == "<" && r.p(1) == "=") {
10515 if (r.p(2) == "?") {
10516 r.seek_cur(3);
10517 return this.token(TOKEN_LTEQCI, "<=?", pos);
10518 }
10519 else if (r.p(2) == "#") {
10520 r.seek_cur(3);
10521 return this.token(TOKEN_LTEQCS, "<=#", pos);
10522 }
10523 else {
10524 r.seek_cur(2);
10525 return this.token(TOKEN_LTEQ, "<=", pos);
10526 }
10527 }
10528 else if (c == "=" && r.p(1) == "~") {
10529 if (r.p(2) == "?") {
10530 r.seek_cur(3);
10531 return this.token(TOKEN_MATCHCI, "=~?", pos);
10532 }
10533 else if (r.p(2) == "#") {
10534 r.seek_cur(3);
10535 return this.token(TOKEN_MATCHCS, "=~#", pos);
10536 }
10537 else {
10538 r.seek_cur(2);
10539 return this.token(TOKEN_MATCH, "=~", pos);
10540 }
10541 }
10542 else if (c == "!" && r.p(1) == "~") {
10543 if (r.p(2) == "?") {
10544 r.seek_cur(3);
10545 return this.token(TOKEN_NOMATCHCI, "!~?", pos);
10546 }
10547 else if (r.p(2) == "#") {
10548 r.seek_cur(3);
10549 return this.token(TOKEN_NOMATCHCS, "!~#", pos);
10550 }
10551 else {
10552 r.seek_cur(2);
10553 return this.token(TOKEN_NOMATCH, "!~", pos);
10554 }
10555 }
10556 else if (c == ">") {
10557 if (r.p(1) == "?") {
10558 r.seek_cur(2);
10559 return this.token(TOKEN_GTCI, ">?", pos);
10560 }
10561 else if (r.p(1) == "#") {
10562 r.seek_cur(2);
10563 return this.token(TOKEN_GTCS, ">#", pos);
10564 }
10565 else {
10566 r.seek_cur(1);
10567 return this.token(TOKEN_GT, ">", pos);
10568 }
10569 }
10570 else if (c == "<") {
10571 if (r.p(1) == "?") {
10572 r.seek_cur(2);
10573 return this.token(TOKEN_LTCI, "<?", pos);
10574 }
10575 else if (r.p(1) == "#") {
10576 r.seek_cur(2);
10577 return this.token(TOKEN_LTCS, "<#", pos);
10578 }
10579 else {
10580 r.seek_cur(1);
10581 return this.token(TOKEN_LT, "<", pos);
10582 }
10583 }
10584 else if (c == "+") {
10585 r.seek_cur(1);
10586 return this.token(TOKEN_PLUS, "+", pos);
10587 }
10588 else if (c == "-") {
10589 if (r.p(1) == ">") {
10590 r.seek_cur(2);
10591 return this.token(TOKEN_ARROW, "->", pos);
10592 }
10593 else {
10594 r.seek_cur(1);
10595 return this.token(TOKEN_MINUS, "-", pos);
10596 }
10597 }
10598 else if (c == ".") {
10599 if (r.p(1) == "." && r.p(2) == ".") {
10600 r.seek_cur(3);
10601 return this.token(TOKEN_DOTDOTDOT, "...", pos);
10602 }
10603 else if (r.p(1) == ".") {
10604 r.seek_cur(2);
10605 return this.token(TOKEN_DOTDOT, "..", pos);
10606 // TODO check scriptversion?
10607 }
10608 else {
10609 r.seek_cur(1);
10610 return this.token(TOKEN_DOT, ".", pos);
10611 // TODO check scriptversion?
10612 }
10613 }
10614 else if (c == "*") {
10615 r.seek_cur(1);
10616 return this.token(TOKEN_STAR, "*", pos);
10617 }
10618 else if (c == "/") {
10619 r.seek_cur(1);
10620 return this.token(TOKEN_SLASH, "/", pos);
10621 }
10622 else if (c == "%") {
10623 r.seek_cur(1);
10624 return this.token(TOKEN_PERCENT, "%", pos);
10625 }
10626 else if (c == "!") {
10627 r.seek_cur(1);
10628 return this.token(TOKEN_NOT, "!", pos);
10629 }
10630 else if (c == "?") {
10631 r.seek_cur(1);
10632 return this.token(TOKEN_QUESTION, "?", pos);
10633 }
10634 else if (c == ":") {
10635 r.seek_cur(1);
10636 return this.token(TOKEN_COLON, ":", pos);
10637 }
10638 else if (c == "#") {
10639 if (r.p(1) == "{") {
10640 r.seek_cur(2);
10641 return this.token(TOKEN_LITCOPEN, "#{", pos);
10642 }
10643 else {
10644 r.seek_cur(1);
10645 return this.token(TOKEN_SHARP, "#", pos);
10646 }
10647 }
10648 else if (c == "(") {
10649 r.seek_cur(1);
10650 return this.token(TOKEN_POPEN, "(", pos);
10651 }
10652 else if (c == ")") {
10653 r.seek_cur(1);
10654 return this.token(TOKEN_PCLOSE, ")", pos);
10655 }
10656 else if (c == "[") {
10657 r.seek_cur(1);
10658 return this.token(TOKEN_SQOPEN, "[", pos);
10659 }
10660 else if (c == "]") {
10661 r.seek_cur(1);
10662 return this.token(TOKEN_SQCLOSE, "]", pos);
10663 }
10664 else if (c == "{") {
10665 r.seek_cur(1);
10666 return this.token(TOKEN_COPEN, "{", pos);
10667 }
10668 else if (c == "}") {
10669 r.seek_cur(1);
10670 return this.token(TOKEN_CCLOSE, "}", pos);
10671 }
10672 else if (c == ",") {
10673 r.seek_cur(1);
10674 return this.token(TOKEN_COMMA, ",", pos);
10675 }
10676 else if (c == "'") {
10677 r.seek_cur(1);
10678 return this.token(TOKEN_SQUOTE, "'", pos);
10679 }
10680 else if (c == "\"") {
10681 r.seek_cur(1);
10682 return this.token(TOKEN_DQUOTE, "\"", pos);
10683 }
10684 else if (c == "$") {
10685 var s = r.getn(1);
10686 s += r.read_word();
10687 return this.token(TOKEN_ENV, s, pos);
10688 }
10689 else if (c == "@") {
10690 // @<EOL> is treated as @"
10691 return this.token(TOKEN_REG, r.getn(2), pos);
10692 }
10693 else if (c == "&") {
10694 var s = "";
10695 if ((r.p(1) == "g" || r.p(1) == "l") && r.p(2) == ":") {
10696 var s = r.getn(3) + r.read_word();
10697 }
10698 else {
10699 var s = r.getn(1) + r.read_word();
10700 }
10701 return this.token(TOKEN_OPTION, s, pos);
10702 }
10703 else if (c == "=") {
10704 r.seek_cur(1);
10705 return this.token(TOKEN_EQ, "=", pos);
10706 }
10707 else if (c == "|") {
10708 r.seek_cur(1);
10709 return this.token(TOKEN_OR, "|", pos);
10710 }
10711 else if (c == ";") {
10712 r.seek_cur(1);
10713 return this.token(TOKEN_SEMICOLON, ";", pos);
10714 }
10715 else if (c == "`") {
10716 r.seek_cur(1);
10717 return this.token(TOKEN_BACKTICK, "`", pos);
10718 }
10719 else {
10720 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10721 }
10722}
10723
10724ExprTokenizer.prototype.get_sstring = function() {
10725 this.reader.skip_white();
10726 var c = this.reader.p(0);
10727 if (c != "'") {
10728 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10729 }
10730 this.reader.seek_cur(1);
10731 var s = "";
10732 while (TRUE) {
10733 var c = this.reader.p(0);
10734 if (c == "<EOF>" || c == "<EOL>") {
10735 throw Err("unexpected EOL", this.reader.getpos());
10736 }
10737 else if (c == "'") {
10738 this.reader.seek_cur(1);
10739 if (this.reader.p(0) == "'") {
10740 this.reader.seek_cur(1);
10741 s += "''";
10742 }
10743 else {
10744 break;
10745 }
10746 }
10747 else {
10748 this.reader.seek_cur(1);
10749 s += c;
10750 }
10751 }
10752 return s;
10753}
10754
10755ExprTokenizer.prototype.get_dstring = function() {
10756 this.reader.skip_white();
10757 var c = this.reader.p(0);
10758 if (c != "\"") {
10759 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10760 }
10761 this.reader.seek_cur(1);
10762 var s = "";
10763 while (TRUE) {
10764 var c = this.reader.p(0);
10765 if (c == "<EOF>" || c == "<EOL>") {
10766 throw Err("unexpectd EOL", this.reader.getpos());
10767 }
10768 else if (c == "\"") {
10769 this.reader.seek_cur(1);
10770 break;
10771 }
10772 else if (c == "\\") {
10773 this.reader.seek_cur(1);
10774 s += c;
10775 var c = this.reader.p(0);
10776 if (c == "<EOF>" || c == "<EOL>") {
10777 throw Err("ExprTokenizer: unexpected EOL", this.reader.getpos());
10778 }
10779 this.reader.seek_cur(1);
10780 s += c;
10781 }
10782 else {
10783 this.reader.seek_cur(1);
10784 s += c;
10785 }
10786 }
10787 return s;
10788}
10789
10790ExprTokenizer.prototype.parse_dict_literal_key = function() {
10791 this.reader.skip_white();
10792 var c = this.reader.peek();
10793 if (!isalnum(c) && c != "_" && c != "-") {
10794 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10795 }
10796 var node = Node(NODE_STRING);
10797 var s = c;
10798 this.reader.seek_cur(1);
10799 node.pos = this.reader.getpos();
10800 while (TRUE) {
10801 var c = this.reader.p(0);
10802 if (c == "<EOF>" || c == "<EOL>") {
10803 throw Err("unexpectd EOL", this.reader.getpos());
10804 }
10805 if (!isalnum(c) && c != "_" && c != "-") {
10806 break;
10807 }
10808 this.reader.seek_cur(1);
10809 s += c;
10810 }
10811 node.value = "'" + s + "'";
10812 return node;
10813}
10814
10815function ExprParser() { this.__init__.apply(this, arguments); }
10816ExprParser.prototype.__init__ = function(reader) {
10817 this.reader = reader;
10818 this.tokenizer = new ExprTokenizer(reader);
10819}
10820
10821ExprParser.prototype.parse = function() {
10822 return this.parse_expr1();
10823}
10824
10825// expr1: expr2 ? expr1 : expr1
10826ExprParser.prototype.parse_expr1 = function() {
10827 var left = this.parse_expr2();
10828 var pos = this.reader.tell();
10829 var token = this.tokenizer.get();
10830 if (token.type == TOKEN_QUESTION) {
10831 var node = Node(NODE_TERNARY);
10832 node.pos = token.pos;
10833 node.cond = left;
10834 node.left = this.parse_expr1();
10835 var token = this.tokenizer.get();
10836 if (token.type != TOKEN_COLON) {
10837 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10838 }
10839 node.right = this.parse_expr1();
10840 var left = node;
10841 }
10842 else {
10843 this.reader.seek_set(pos);
10844 }
10845 return left;
10846}
10847
10848// expr2: expr3 || expr3 ..
10849ExprParser.prototype.parse_expr2 = function() {
10850 var left = this.parse_expr3();
10851 while (TRUE) {
10852 var pos = this.reader.tell();
10853 var token = this.tokenizer.get();
10854 if (token.type == TOKEN_OROR) {
10855 var node = Node(NODE_OR);
10856 node.pos = token.pos;
10857 node.left = left;
10858 node.right = this.parse_expr3();
10859 var left = node;
10860 }
10861 else {
10862 this.reader.seek_set(pos);
10863 break;
10864 }
10865 }
10866 return left;
10867}
10868
10869// expr3: expr4 && expr4
10870ExprParser.prototype.parse_expr3 = function() {
10871 var left = this.parse_expr4();
10872 while (TRUE) {
10873 var pos = this.reader.tell();
10874 var token = this.tokenizer.get();
10875 if (token.type == TOKEN_ANDAND) {
10876 var node = Node(NODE_AND);
10877 node.pos = token.pos;
10878 node.left = left;
10879 node.right = this.parse_expr4();
10880 var left = node;
10881 }
10882 else {
10883 this.reader.seek_set(pos);
10884 break;
10885 }
10886 }
10887 return left;
10888}
10889
10890// expr4: expr5 == expr5
10891// expr5 != expr5
10892// expr5 > expr5
10893// expr5 >= expr5
10894// expr5 < expr5
10895// expr5 <= expr5
10896// expr5 =~ expr5
10897// expr5 !~ expr5
10898//
10899// expr5 ==? expr5
10900// expr5 ==# expr5
10901// etc.
10902//
10903// expr5 is expr5
10904// expr5 isnot expr5
10905ExprParser.prototype.parse_expr4 = function() {
10906 var left = this.parse_expr5();
10907 var pos = this.reader.tell();
10908 var token = this.tokenizer.get();
10909 if (token.type == TOKEN_EQEQ) {
10910 var node = Node(NODE_EQUAL);
10911 node.pos = token.pos;
10912 node.left = left;
10913 node.right = this.parse_expr5();
10914 var left = node;
10915 }
10916 else if (token.type == TOKEN_EQEQCI) {
10917 var node = Node(NODE_EQUALCI);
10918 node.pos = token.pos;
10919 node.left = left;
10920 node.right = this.parse_expr5();
10921 var left = node;
10922 }
10923 else if (token.type == TOKEN_EQEQCS) {
10924 var node = Node(NODE_EQUALCS);
10925 node.pos = token.pos;
10926 node.left = left;
10927 node.right = this.parse_expr5();
10928 var left = node;
10929 }
10930 else if (token.type == TOKEN_NEQ) {
10931 var node = Node(NODE_NEQUAL);
10932 node.pos = token.pos;
10933 node.left = left;
10934 node.right = this.parse_expr5();
10935 var left = node;
10936 }
10937 else if (token.type == TOKEN_NEQCI) {
10938 var node = Node(NODE_NEQUALCI);
10939 node.pos = token.pos;
10940 node.left = left;
10941 node.right = this.parse_expr5();
10942 var left = node;
10943 }
10944 else if (token.type == TOKEN_NEQCS) {
10945 var node = Node(NODE_NEQUALCS);
10946 node.pos = token.pos;
10947 node.left = left;
10948 node.right = this.parse_expr5();
10949 var left = node;
10950 }
10951 else if (token.type == TOKEN_GT) {
10952 var node = Node(NODE_GREATER);
10953 node.pos = token.pos;
10954 node.left = left;
10955 node.right = this.parse_expr5();
10956 var left = node;
10957 }
10958 else if (token.type == TOKEN_GTCI) {
10959 var node = Node(NODE_GREATERCI);
10960 node.pos = token.pos;
10961 node.left = left;
10962 node.right = this.parse_expr5();
10963 var left = node;
10964 }
10965 else if (token.type == TOKEN_GTCS) {
10966 var node = Node(NODE_GREATERCS);
10967 node.pos = token.pos;
10968 node.left = left;
10969 node.right = this.parse_expr5();
10970 var left = node;
10971 }
10972 else if (token.type == TOKEN_GTEQ) {
10973 var node = Node(NODE_GEQUAL);
10974 node.pos = token.pos;
10975 node.left = left;
10976 node.right = this.parse_expr5();
10977 var left = node;
10978 }
10979 else if (token.type == TOKEN_GTEQCI) {
10980 var node = Node(NODE_GEQUALCI);
10981 node.pos = token.pos;
10982 node.left = left;
10983 node.right = this.parse_expr5();
10984 var left = node;
10985 }
10986 else if (token.type == TOKEN_GTEQCS) {
10987 var node = Node(NODE_GEQUALCS);
10988 node.pos = token.pos;
10989 node.left = left;
10990 node.right = this.parse_expr5();
10991 var left = node;
10992 }
10993 else if (token.type == TOKEN_LT) {
10994 var node = Node(NODE_SMALLER);
10995 node.pos = token.pos;
10996 node.left = left;
10997 node.right = this.parse_expr5();
10998 var left = node;
10999 }
11000 else if (token.type == TOKEN_LTCI) {
11001 var node = Node(NODE_SMALLERCI);
11002 node.pos = token.pos;
11003 node.left = left;
11004 node.right = this.parse_expr5();
11005 var left = node;
11006 }
11007 else if (token.type == TOKEN_LTCS) {
11008 var node = Node(NODE_SMALLERCS);
11009 node.pos = token.pos;
11010 node.left = left;
11011 node.right = this.parse_expr5();
11012 var left = node;
11013 }
11014 else if (token.type == TOKEN_LTEQ) {
11015 var node = Node(NODE_SEQUAL);
11016 node.pos = token.pos;
11017 node.left = left;
11018 node.right = this.parse_expr5();
11019 var left = node;
11020 }
11021 else if (token.type == TOKEN_LTEQCI) {
11022 var node = Node(NODE_SEQUALCI);
11023 node.pos = token.pos;
11024 node.left = left;
11025 node.right = this.parse_expr5();
11026 var left = node;
11027 }
11028 else if (token.type == TOKEN_LTEQCS) {
11029 var node = Node(NODE_SEQUALCS);
11030 node.pos = token.pos;
11031 node.left = left;
11032 node.right = this.parse_expr5();
11033 var left = node;
11034 }
11035 else if (token.type == TOKEN_MATCH) {
11036 var node = Node(NODE_MATCH);
11037 node.pos = token.pos;
11038 node.left = left;
11039 node.right = this.parse_expr5();
11040 var left = node;
11041 }
11042 else if (token.type == TOKEN_MATCHCI) {
11043 var node = Node(NODE_MATCHCI);
11044 node.pos = token.pos;
11045 node.left = left;
11046 node.right = this.parse_expr5();
11047 var left = node;
11048 }
11049 else if (token.type == TOKEN_MATCHCS) {
11050 var node = Node(NODE_MATCHCS);
11051 node.pos = token.pos;
11052 node.left = left;
11053 node.right = this.parse_expr5();
11054 var left = node;
11055 }
11056 else if (token.type == TOKEN_NOMATCH) {
11057 var node = Node(NODE_NOMATCH);
11058 node.pos = token.pos;
11059 node.left = left;
11060 node.right = this.parse_expr5();
11061 var left = node;
11062 }
11063 else if (token.type == TOKEN_NOMATCHCI) {
11064 var node = Node(NODE_NOMATCHCI);
11065 node.pos = token.pos;
11066 node.left = left;
11067 node.right = this.parse_expr5();
11068 var left = node;
11069 }
11070 else if (token.type == TOKEN_NOMATCHCS) {
11071 var node = Node(NODE_NOMATCHCS);
11072 node.pos = token.pos;
11073 node.left = left;
11074 node.right = this.parse_expr5();
11075 var left = node;
11076 }
11077 else if (token.type == TOKEN_IS) {
11078 var node = Node(NODE_IS);
11079 node.pos = token.pos;
11080 node.left = left;
11081 node.right = this.parse_expr5();
11082 var left = node;
11083 }
11084 else if (token.type == TOKEN_ISCI) {
11085 var node = Node(NODE_ISCI);
11086 node.pos = token.pos;
11087 node.left = left;
11088 node.right = this.parse_expr5();
11089 var left = node;
11090 }
11091 else if (token.type == TOKEN_ISCS) {
11092 var node = Node(NODE_ISCS);
11093 node.pos = token.pos;
11094 node.left = left;
11095 node.right = this.parse_expr5();
11096 var left = node;
11097 }
11098 else if (token.type == TOKEN_ISNOT) {
11099 var node = Node(NODE_ISNOT);
11100 node.pos = token.pos;
11101 node.left = left;
11102 node.right = this.parse_expr5();
11103 var left = node;
11104 }
11105 else if (token.type == TOKEN_ISNOTCI) {
11106 var node = Node(NODE_ISNOTCI);
11107 node.pos = token.pos;
11108 node.left = left;
11109 node.right = this.parse_expr5();
11110 var left = node;
11111 }
11112 else if (token.type == TOKEN_ISNOTCS) {
11113 var node = Node(NODE_ISNOTCS);
11114 node.pos = token.pos;
11115 node.left = left;
11116 node.right = this.parse_expr5();
11117 var left = node;
11118 }
11119 else {
11120 this.reader.seek_set(pos);
11121 }
11122 return left;
11123}
11124
11125// expr5: expr6 + expr6 ..
11126// expr6 - expr6 ..
11127// expr6 . expr6 ..
11128// expr6 .. expr6 ..
11129ExprParser.prototype.parse_expr5 = function() {
11130 var left = this.parse_expr6();
11131 while (TRUE) {
11132 var pos = this.reader.tell();
11133 var token = this.tokenizer.get();
11134 if (token.type == TOKEN_PLUS) {
11135 var node = Node(NODE_ADD);
11136 node.pos = token.pos;
11137 node.left = left;
11138 node.right = this.parse_expr6();
11139 var left = node;
11140 }
11141 else if (token.type == TOKEN_MINUS) {
11142 var node = Node(NODE_SUBTRACT);
11143 node.pos = token.pos;
11144 node.left = left;
11145 node.right = this.parse_expr6();
11146 var left = node;
11147 }
11148 else if (token.type == TOKEN_DOTDOT) {
11149 // TODO check scriptversion?
11150 var node = Node(NODE_CONCAT);
11151 node.pos = token.pos;
11152 node.left = left;
11153 node.right = this.parse_expr6();
11154 var left = node;
11155 }
11156 else if (token.type == TOKEN_DOT) {
11157 // TODO check scriptversion?
11158 var node = Node(NODE_CONCAT);
11159 node.pos = token.pos;
11160 node.left = left;
11161 node.right = this.parse_expr6();
11162 var left = node;
11163 }
11164 else {
11165 this.reader.seek_set(pos);
11166 break;
11167 }
11168 }
11169 return left;
11170}
11171
11172// expr6: expr7 * expr7 ..
11173// expr7 / expr7 ..
11174// expr7 % expr7 ..
11175ExprParser.prototype.parse_expr6 = function() {
11176 var left = this.parse_expr7();
11177 while (TRUE) {
11178 var pos = this.reader.tell();
11179 var token = this.tokenizer.get();
11180 if (token.type == TOKEN_STAR) {
11181 var node = Node(NODE_MULTIPLY);
11182 node.pos = token.pos;
11183 node.left = left;
11184 node.right = this.parse_expr7();
11185 var left = node;
11186 }
11187 else if (token.type == TOKEN_SLASH) {
11188 var node = Node(NODE_DIVIDE);
11189 node.pos = token.pos;
11190 node.left = left;
11191 node.right = this.parse_expr7();
11192 var left = node;
11193 }
11194 else if (token.type == TOKEN_PERCENT) {
11195 var node = Node(NODE_REMAINDER);
11196 node.pos = token.pos;
11197 node.left = left;
11198 node.right = this.parse_expr7();
11199 var left = node;
11200 }
11201 else {
11202 this.reader.seek_set(pos);
11203 break;
11204 }
11205 }
11206 return left;
11207}
11208
11209// expr7: ! expr7
11210// - expr7
11211// + expr7
11212ExprParser.prototype.parse_expr7 = function() {
11213 var pos = this.reader.tell();
11214 var token = this.tokenizer.get();
11215 if (token.type == TOKEN_NOT) {
11216 var node = Node(NODE_NOT);
11217 node.pos = token.pos;
11218 node.left = this.parse_expr7();
11219 return node;
11220 }
11221 else if (token.type == TOKEN_MINUS) {
11222 var node = Node(NODE_MINUS);
11223 node.pos = token.pos;
11224 node.left = this.parse_expr7();
11225 return node;
11226 }
11227 else if (token.type == TOKEN_PLUS) {
11228 var node = Node(NODE_PLUS);
11229 node.pos = token.pos;
11230 node.left = this.parse_expr7();
11231 return node;
11232 }
11233 else {
11234 this.reader.seek_set(pos);
11235 var node = this.parse_expr8();
11236 return node;
11237 }
11238}
11239
11240// expr8: expr8[expr1]
11241// expr8[expr1 : expr1]
11242// expr8.name
11243// expr8->name(expr1, ...)
11244// expr8->s:user_func(expr1, ...)
11245// expr8->{lambda}(expr1, ...)
11246// expr8(expr1, ...)
11247ExprParser.prototype.parse_expr8 = function() {
11248 var left = this.parse_expr9();
11249 while (TRUE) {
11250 var pos = this.reader.tell();
11251 var c = this.reader.peek();
11252 var token = this.tokenizer.get();
11253 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
11254 var npos = token.pos;
11255 if (this.tokenizer.peek().type == TOKEN_COLON) {
11256 this.tokenizer.get();
11257 var node = Node(NODE_SLICE);
11258 node.pos = npos;
11259 node.left = left;
11260 node.rlist = [NIL, NIL];
11261 var token = this.tokenizer.peek();
11262 if (token.type != TOKEN_SQCLOSE) {
11263 node.rlist[1] = this.parse_expr1();
11264 }
11265 var token = this.tokenizer.get();
11266 if (token.type != TOKEN_SQCLOSE) {
11267 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11268 }
11269 var left = node;
11270 }
11271 else {
11272 var right = this.parse_expr1();
11273 if (this.tokenizer.peek().type == TOKEN_COLON) {
11274 this.tokenizer.get();
11275 var node = Node(NODE_SLICE);
11276 node.pos = npos;
11277 node.left = left;
11278 node.rlist = [right, NIL];
11279 var token = this.tokenizer.peek();
11280 if (token.type != TOKEN_SQCLOSE) {
11281 node.rlist[1] = this.parse_expr1();
11282 }
11283 var token = this.tokenizer.get();
11284 if (token.type != TOKEN_SQCLOSE) {
11285 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11286 }
11287 var left = node;
11288 }
11289 else {
11290 var node = Node(NODE_SUBSCRIPT);
11291 node.pos = npos;
11292 node.left = left;
11293 node.right = right;
11294 var token = this.tokenizer.get();
11295 if (token.type != TOKEN_SQCLOSE) {
11296 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11297 }
11298 var left = node;
11299 }
11300 }
11301 delete node;
11302 }
11303 else if (token.type == TOKEN_ARROW) {
11304 var funcname_or_lambda = this.parse_expr9();
11305 var token = this.tokenizer.get();
11306 if (token.type != TOKEN_POPEN) {
11307 throw Err("E107: Missing parentheses: lambda", token.pos);
11308 }
11309 var right = Node(NODE_CALL);
11310 right.pos = token.pos;
11311 right.left = funcname_or_lambda;
11312 right.rlist = this.parse_rlist();
11313 var node = Node(NODE_METHOD);
11314 node.pos = token.pos;
11315 node.left = left;
11316 node.right = right;
11317 var left = node;
11318 delete node;
11319 }
11320 else if (token.type == TOKEN_POPEN) {
11321 var node = Node(NODE_CALL);
11322 node.pos = token.pos;
11323 node.left = left;
11324 node.rlist = this.parse_rlist();
11325 var left = node;
11326 delete node;
11327 }
11328 else if (!iswhite(c) && token.type == TOKEN_DOT) {
11329 // TODO check scriptversion?
11330 var node = this.parse_dot(token, left);
11331 if (node === NIL) {
11332 this.reader.seek_set(pos);
11333 break;
11334 }
11335 var left = node;
11336 delete node;
11337 }
11338 else {
11339 this.reader.seek_set(pos);
11340 break;
11341 }
11342 }
11343 return left;
11344}
11345
11346ExprParser.prototype.parse_rlist = function() {
11347 var rlist = [];
11348 var token = this.tokenizer.peek();
11349 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
11350 this.tokenizer.get();
11351 }
11352 else {
11353 while (TRUE) {
11354 viml_add(rlist, this.parse_expr1());
11355 var token = this.tokenizer.get();
11356 if (token.type == TOKEN_COMMA) {
11357 // XXX: Vim allows foo(a, b, ). Lint should warn it.
11358 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
11359 this.tokenizer.get();
11360 break;
11361 }
11362 }
11363 else if (token.type == TOKEN_PCLOSE) {
11364 break;
11365 }
11366 else {
11367 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11368 }
11369 }
11370 }
11371 if (viml_len(rlist) > MAX_FUNC_ARGS) {
11372 // TODO: funcname E740: Too many arguments for function: %s
11373 throw Err("E740: Too many arguments for function", token.pos);
11374 }
11375 return rlist;
11376}
11377
11378// expr9: number
11379// "string"
11380// 'string'
11381// [expr1, ...]
11382// {expr1: expr1, ...}
11383// #{literal_key1: expr1, ...}
11384// {args -> expr1}
11385// &option
11386// (expr1)
11387// variable
11388// var{ria}ble
11389// $VAR
11390// @r
11391// function(expr1, ...)
11392// func{ti}on(expr1, ...)
11393ExprParser.prototype.parse_expr9 = function() {
11394 var pos = this.reader.tell();
11395 var token = this.tokenizer.get();
11396 var node = Node(-1);
11397 if (token.type == TOKEN_NUMBER) {
11398 var node = Node(NODE_NUMBER);
11399 node.pos = token.pos;
11400 node.value = token.value;
11401 }
11402 else if (token.type == TOKEN_BLOB) {
11403 var node = Node(NODE_BLOB);
11404 node.pos = token.pos;
11405 node.value = token.value;
11406 }
11407 else if (token.type == TOKEN_DQUOTE) {
11408 this.reader.seek_set(pos);
11409 var node = Node(NODE_STRING);
11410 node.pos = token.pos;
11411 node.value = "\"" + this.tokenizer.get_dstring() + "\"";
11412 }
11413 else if (token.type == TOKEN_SQUOTE) {
11414 this.reader.seek_set(pos);
11415 var node = Node(NODE_STRING);
11416 node.pos = token.pos;
11417 node.value = "'" + this.tokenizer.get_sstring() + "'";
11418 }
11419 else if (token.type == TOKEN_SQOPEN) {
11420 var node = Node(NODE_LIST);
11421 node.pos = token.pos;
11422 node.value = [];
11423 var token = this.tokenizer.peek();
11424 if (token.type == TOKEN_SQCLOSE) {
11425 this.tokenizer.get();
11426 }
11427 else {
11428 while (TRUE) {
11429 viml_add(node.value, this.parse_expr1());
11430 var token = this.tokenizer.peek();
11431 if (token.type == TOKEN_COMMA) {
11432 this.tokenizer.get();
11433 if (this.tokenizer.peek().type == TOKEN_SQCLOSE) {
11434 this.tokenizer.get();
11435 break;
11436 }
11437 }
11438 else if (token.type == TOKEN_SQCLOSE) {
11439 this.tokenizer.get();
11440 break;
11441 }
11442 else {
11443 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11444 }
11445 }
11446 }
11447 }
11448 else if (token.type == TOKEN_COPEN || token.type == TOKEN_LITCOPEN) {
11449 var is_litdict = token.type == TOKEN_LITCOPEN;
11450 var savepos = this.reader.tell();
11451 var nodepos = token.pos;
11452 var token = this.tokenizer.get();
11453 var lambda = token.type == TOKEN_ARROW;
11454 if (!lambda && !(token.type == TOKEN_SQUOTE || token.type == TOKEN_DQUOTE)) {
11455 // if the token type is stirng, we cannot peek next token and we can
11456 // assume it's not lambda.
11457 var token2 = this.tokenizer.peek();
11458 var lambda = token2.type == TOKEN_ARROW || token2.type == TOKEN_COMMA;
11459 }
11460 // fallback to dict or {expr} if true
11461 var fallback = FALSE;
11462 if (lambda) {
11463 // lambda {token,...} {->...} {token->...}
11464 var node = Node(NODE_LAMBDA);
11465 node.pos = nodepos;
11466 node.rlist = [];
11467 var named = {};
11468 while (TRUE) {
11469 if (token.type == TOKEN_ARROW) {
11470 break;
11471 }
11472 else if (token.type == TOKEN_IDENTIFIER) {
11473 if (!isargname(token.value)) {
11474 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
11475 }
11476 else if (viml_has_key(named, token.value)) {
11477 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
11478 }
11479 named[token.value] = 1;
11480 var varnode = Node(NODE_IDENTIFIER);
11481 varnode.pos = token.pos;
11482 varnode.value = token.value;
11483 // XXX: Vim doesn't skip white space before comma. {a ,b -> ...} => E475
11484 if (iswhite(this.reader.p(0)) && this.tokenizer.peek().type == TOKEN_COMMA) {
11485 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
11486 }
11487 var token = this.tokenizer.get();
11488 viml_add(node.rlist, varnode);
11489 if (token.type == TOKEN_COMMA) {
11490 // XXX: Vim allows last comma. {a, b, -> ...} => OK
11491 var token = this.tokenizer.peek();
11492 if (token.type == TOKEN_ARROW) {
11493 this.tokenizer.get();
11494 break;
11495 }
11496 }
11497 else if (token.type == TOKEN_ARROW) {
11498 break;
11499 }
11500 else {
11501 throw Err(viml_printf("unexpected token: %s, type: %d", token.value, token.type), token.pos);
11502 }
11503 }
11504 else if (token.type == TOKEN_DOTDOTDOT) {
11505 var varnode = Node(NODE_IDENTIFIER);
11506 varnode.pos = token.pos;
11507 varnode.value = token.value;
11508 viml_add(node.rlist, varnode);
11509 var token = this.tokenizer.peek();
11510 if (token.type == TOKEN_ARROW) {
11511 this.tokenizer.get();
11512 break;
11513 }
11514 else {
11515 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11516 }
11517 }
11518 else {
11519 var fallback = TRUE;
11520 break;
11521 }
11522 var token = this.tokenizer.get();
11523 }
11524 if (!fallback) {
11525 node.left = this.parse_expr1();
11526 var token = this.tokenizer.get();
11527 if (token.type != TOKEN_CCLOSE) {
11528 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11529 }
11530 return node;
11531 }
11532 }
11533 // dict
11534 var node = Node(NODE_DICT);
11535 node.pos = nodepos;
11536 node.value = [];
11537 this.reader.seek_set(savepos);
11538 var token = this.tokenizer.peek();
11539 if (token.type == TOKEN_CCLOSE) {
11540 this.tokenizer.get();
11541 return node;
11542 }
11543 while (1) {
11544 var key = is_litdict ? this.tokenizer.parse_dict_literal_key() : this.parse_expr1();
11545 var token = this.tokenizer.get();
11546 if (token.type == TOKEN_CCLOSE) {
11547 if (!viml_empty(node.value)) {
11548 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11549 }
11550 this.reader.seek_set(pos);
11551 var node = this.parse_identifier();
11552 break;
11553 }
11554 if (token.type != TOKEN_COLON) {
11555 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11556 }
11557 var val = this.parse_expr1();
11558 viml_add(node.value, [key, val]);
11559 var token = this.tokenizer.get();
11560 if (token.type == TOKEN_COMMA) {
11561 if (this.tokenizer.peek().type == TOKEN_CCLOSE) {
11562 this.tokenizer.get();
11563 break;
11564 }
11565 }
11566 else if (token.type == TOKEN_CCLOSE) {
11567 break;
11568 }
11569 else {
11570 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11571 }
11572 }
11573 return node;
11574 }
11575 else if (token.type == TOKEN_POPEN) {
11576 var node = this.parse_expr1();
11577 var token = this.tokenizer.get();
11578 if (token.type != TOKEN_PCLOSE) {
11579 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11580 }
11581 }
11582 else if (token.type == TOKEN_OPTION) {
11583 var node = Node(NODE_OPTION);
11584 node.pos = token.pos;
11585 node.value = token.value;
11586 }
11587 else if (token.type == TOKEN_IDENTIFIER) {
11588 this.reader.seek_set(pos);
11589 var node = this.parse_identifier();
11590 }
11591 else if (FALSE && (token.type == TOKEN_COLON || token.type == TOKEN_SHARP)) {
11592 // XXX: no parse error but invalid expression
11593 this.reader.seek_set(pos);
11594 var node = this.parse_identifier();
11595 }
11596 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
11597 this.reader.seek_set(pos);
11598 var node = this.parse_identifier();
11599 }
11600 else if (token.type == TOKEN_IS || token.type == TOKEN_ISCS || token.type == TOKEN_ISNOT || token.type == TOKEN_ISNOTCS) {
11601 this.reader.seek_set(pos);
11602 var node = this.parse_identifier();
11603 }
11604 else if (token.type == TOKEN_ENV) {
11605 var node = Node(NODE_ENV);
11606 node.pos = token.pos;
11607 node.value = token.value;
11608 }
11609 else if (token.type == TOKEN_REG) {
11610 var node = Node(NODE_REG);
11611 node.pos = token.pos;
11612 node.value = token.value;
11613 }
11614 else {
11615 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11616 }
11617 return node;
11618}
11619
11620// SUBSCRIPT or CONCAT
11621// dict "." [0-9A-Za-z_]+ => (subscript dict key)
11622// str "." expr6 => (concat str expr6)
11623ExprParser.prototype.parse_dot = function(token, left) {
11624 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) {
11625 return NIL;
11626 }
11627 if (!iswordc(this.reader.p(0))) {
11628 return NIL;
11629 }
11630 var pos = this.reader.getpos();
11631 var name = this.reader.read_word();
11632 if (isnamec(this.reader.p(0))) {
11633 // XXX: foo is str => ok, foo is obj => invalid expression
11634 // foo.s:bar or foo.bar#baz
11635 return NIL;
11636 }
11637 var node = Node(NODE_DOT);
11638 node.pos = token.pos;
11639 node.left = left;
11640 node.right = Node(NODE_IDENTIFIER);
11641 node.right.pos = pos;
11642 node.right.value = name;
11643 return node;
11644}
11645
11646// CONCAT
11647// str ".." expr6 => (concat str expr6)
11648ExprParser.prototype.parse_concat = function(token, left) {
11649 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) {
11650 return NIL;
11651 }
11652 if (!iswordc(this.reader.p(0))) {
11653 return NIL;
11654 }
11655 var pos = this.reader.getpos();
11656 var name = this.reader.read_word();
11657 if (isnamec(this.reader.p(0))) {
11658 // XXX: foo is str => ok, foo is obj => invalid expression
11659 // foo.s:bar or foo.bar#baz
11660 return NIL;
11661 }
11662 var node = Node(NODE_CONCAT);
11663 node.pos = token.pos;
11664 node.left = left;
11665 node.right = Node(NODE_IDENTIFIER);
11666 node.right.pos = pos;
11667 node.right.value = name;
11668 return node;
11669}
11670
11671ExprParser.prototype.parse_identifier = function() {
11672 this.reader.skip_white();
11673 var npos = this.reader.getpos();
11674 var curly_parts = this.parse_curly_parts();
11675 if (viml_len(curly_parts) == 1 && curly_parts[0].type == NODE_CURLYNAMEPART) {
11676 var node = Node(NODE_IDENTIFIER);
11677 node.pos = npos;
11678 node.value = curly_parts[0].value;
11679 return node;
11680 }
11681 else {
11682 var node = Node(NODE_CURLYNAME);
11683 node.pos = npos;
11684 node.value = curly_parts;
11685 return node;
11686 }
11687}
11688
11689ExprParser.prototype.parse_curly_parts = function() {
11690 var curly_parts = [];
11691 var c = this.reader.peek();
11692 var pos = this.reader.getpos();
11693 if (c == "<" && viml_equalci(this.reader.peekn(5), "<SID>")) {
11694 var name = this.reader.getn(5);
11695 var node = Node(NODE_CURLYNAMEPART);
11696 node.curly = FALSE;
11697 // Keep backword compatibility for the curly attribute
11698 node.pos = pos;
11699 node.value = name;
11700 viml_add(curly_parts, node);
11701 }
11702 while (TRUE) {
11703 var c = this.reader.peek();
11704 if (isnamec(c)) {
11705 var pos = this.reader.getpos();
11706 var name = this.reader.read_name();
11707 var node = Node(NODE_CURLYNAMEPART);
11708 node.curly = FALSE;
11709 // Keep backword compatibility for the curly attribute
11710 node.pos = pos;
11711 node.value = name;
11712 viml_add(curly_parts, node);
11713 }
11714 else if (c == "{") {
11715 this.reader.get();
11716 var pos = this.reader.getpos();
11717 var node = Node(NODE_CURLYNAMEEXPR);
11718 node.curly = TRUE;
11719 // Keep backword compatibility for the curly attribute
11720 node.pos = pos;
11721 node.value = this.parse_expr1();
11722 viml_add(curly_parts, node);
11723 this.reader.skip_white();
11724 var c = this.reader.p(0);
11725 if (c != "}") {
11726 throw Err(viml_printf("unexpected token: %s", c), this.reader.getpos());
11727 }
11728 this.reader.seek_cur(1);
11729 }
11730 else {
11731 break;
11732 }
11733 }
11734 return curly_parts;
11735}
11736
11737function LvalueParser() { ExprParser.apply(this, arguments); this.__init__.apply(this, arguments); }
11738LvalueParser.prototype = Object.create(ExprParser.prototype);
11739LvalueParser.prototype.parse = function() {
11740 return this.parse_lv8();
11741}
11742
11743// expr8: expr8[expr1]
11744// expr8[expr1 : expr1]
11745// expr8.name
11746LvalueParser.prototype.parse_lv8 = function() {
11747 var left = this.parse_lv9();
11748 while (TRUE) {
11749 var pos = this.reader.tell();
11750 var c = this.reader.peek();
11751 var token = this.tokenizer.get();
11752 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
11753 var npos = token.pos;
11754 var node = Node(-1);
11755 if (this.tokenizer.peek().type == TOKEN_COLON) {
11756 this.tokenizer.get();
11757 var node = Node(NODE_SLICE);
11758 node.pos = npos;
11759 node.left = left;
11760 node.rlist = [NIL, NIL];
11761 var token = this.tokenizer.peek();
11762 if (token.type != TOKEN_SQCLOSE) {
11763 node.rlist[1] = this.parse_expr1();
11764 }
11765 var token = this.tokenizer.get();
11766 if (token.type != TOKEN_SQCLOSE) {
11767 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11768 }
11769 }
11770 else {
11771 var right = this.parse_expr1();
11772 if (this.tokenizer.peek().type == TOKEN_COLON) {
11773 this.tokenizer.get();
11774 var node = Node(NODE_SLICE);
11775 node.pos = npos;
11776 node.left = left;
11777 node.rlist = [right, NIL];
11778 var token = this.tokenizer.peek();
11779 if (token.type != TOKEN_SQCLOSE) {
11780 node.rlist[1] = this.parse_expr1();
11781 }
11782 var token = this.tokenizer.get();
11783 if (token.type != TOKEN_SQCLOSE) {
11784 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11785 }
11786 }
11787 else {
11788 var node = Node(NODE_SUBSCRIPT);
11789 node.pos = npos;
11790 node.left = left;
11791 node.right = right;
11792 var token = this.tokenizer.get();
11793 if (token.type != TOKEN_SQCLOSE) {
11794 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11795 }
11796 }
11797 }
11798 var left = node;
11799 delete node;
11800 }
11801 else if (!iswhite(c) && token.type == TOKEN_DOT) {
11802 var node = this.parse_dot(token, left);
11803 if (node === NIL) {
11804 this.reader.seek_set(pos);
11805 break;
11806 }
11807 var left = node;
11808 delete node;
11809 }
11810 else {
11811 this.reader.seek_set(pos);
11812 break;
11813 }
11814 }
11815 return left;
11816}
11817
11818// expr9: &option
11819// variable
11820// var{ria}ble
11821// $VAR
11822// @r
11823LvalueParser.prototype.parse_lv9 = function() {
11824 var pos = this.reader.tell();
11825 var token = this.tokenizer.get();
11826 var node = Node(-1);
11827 if (token.type == TOKEN_COPEN) {
11828 this.reader.seek_set(pos);
11829 var node = this.parse_identifier();
11830 }
11831 else if (token.type == TOKEN_OPTION) {
11832 var node = Node(NODE_OPTION);
11833 node.pos = token.pos;
11834 node.value = token.value;
11835 }
11836 else if (token.type == TOKEN_IDENTIFIER) {
11837 this.reader.seek_set(pos);
11838 var node = this.parse_identifier();
11839 }
11840 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
11841 this.reader.seek_set(pos);
11842 var node = this.parse_identifier();
11843 }
11844 else if (token.type == TOKEN_ENV) {
11845 var node = Node(NODE_ENV);
11846 node.pos = token.pos;
11847 node.value = token.value;
11848 }
11849 else if (token.type == TOKEN_REG) {
11850 var node = Node(NODE_REG);
11851 node.pos = token.pos;
11852 node.pos = token.pos;
11853 node.value = token.value;
11854 }
11855 else {
11856 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11857 }
11858 return node;
11859}
11860
11861function StringReader() { this.__init__.apply(this, arguments); }
11862StringReader.prototype.__init__ = function(lines) {
11863 this.buf = [];
11864 this.pos = [];
11865 var lnum = 0;
11866 var offset = 0;
11867 while (lnum < viml_len(lines)) {
11868 var col = 0;
11869 var __c7 = viml_split(lines[lnum], "\\zs");
11870 for (var __i7 = 0; __i7 < __c7.length; ++__i7) {
11871 var c = __c7[__i7];
11872 viml_add(this.buf, c);
11873 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11874 col += viml_len(c);
11875 offset += viml_len(c);
11876 }
11877 while (lnum + 1 < viml_len(lines) && viml_eqregh(lines[lnum + 1], "^\\s*\\\\")) {
11878 var skip = TRUE;
11879 var col = 0;
11880 var __c8 = viml_split(lines[lnum + 1], "\\zs");
11881 for (var __i8 = 0; __i8 < __c8.length; ++__i8) {
11882 var c = __c8[__i8];
11883 if (skip) {
11884 if (c == "\\") {
11885 var skip = FALSE;
11886 }
11887 }
11888 else {
11889 viml_add(this.buf, c);
11890 viml_add(this.pos, [lnum + 2, col + 1, offset]);
11891 }
11892 col += viml_len(c);
11893 offset += viml_len(c);
11894 }
11895 lnum += 1;
11896 offset += 1;
11897 }
11898 viml_add(this.buf, "<EOL>");
11899 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11900 lnum += 1;
11901 offset += 1;
11902 }
11903 // for <EOF>
11904 viml_add(this.pos, [lnum + 1, 0, offset]);
11905 this.i = 0;
11906}
11907
11908StringReader.prototype.eof = function() {
11909 return this.i >= viml_len(this.buf);
11910}
11911
11912StringReader.prototype.tell = function() {
11913 return this.i;
11914}
11915
11916StringReader.prototype.seek_set = function(i) {
11917 this.i = i;
11918}
11919
11920StringReader.prototype.seek_cur = function(i) {
11921 this.i = this.i + i;
11922}
11923
11924StringReader.prototype.seek_end = function(i) {
11925 this.i = viml_len(this.buf) + i;
11926}
11927
11928StringReader.prototype.p = function(i) {
11929 if (this.i >= viml_len(this.buf)) {
11930 return "<EOF>";
11931 }
11932 return this.buf[this.i + i];
11933}
11934
11935StringReader.prototype.peek = function() {
11936 if (this.i >= viml_len(this.buf)) {
11937 return "<EOF>";
11938 }
11939 return this.buf[this.i];
11940}
11941
11942StringReader.prototype.get = function() {
11943 if (this.i >= viml_len(this.buf)) {
11944 return "<EOF>";
11945 }
11946 this.i += 1;
11947 return this.buf[this.i - 1];
11948}
11949
11950StringReader.prototype.peekn = function(n) {
11951 var pos = this.tell();
11952 var r = this.getn(n);
11953 this.seek_set(pos);
11954 return r;
11955}
11956
11957StringReader.prototype.getn = function(n) {
11958 var r = "";
11959 var j = 0;
11960 while (this.i < viml_len(this.buf) && (n < 0 || j < n)) {
11961 var c = this.buf[this.i];
11962 if (c == "<EOL>") {
11963 break;
11964 }
11965 r += c;
11966 this.i += 1;
11967 j += 1;
11968 }
11969 return r;
11970}
11971
11972StringReader.prototype.peekline = function() {
11973 return this.peekn(-1);
11974}
11975
11976StringReader.prototype.readline = function() {
11977 var r = this.getn(-1);
11978 this.get();
11979 return r;
11980}
11981
11982StringReader.prototype.getstr = function(begin, end) {
11983 var r = "";
11984 var __c9 = viml_range(begin.i, end.i - 1);
11985 for (var __i9 = 0; __i9 < __c9.length; ++__i9) {
11986 var i = __c9[__i9];
11987 if (i >= viml_len(this.buf)) {
11988 break;
11989 }
11990 var c = this.buf[i];
11991 if (c == "<EOL>") {
11992 var c = "\n";
11993 }
11994 r += c;
11995 }
11996 return r;
11997}
11998
11999StringReader.prototype.getpos = function() {
12000 var __tmp = this.pos[this.i];
12001 var lnum = __tmp[0];
12002 var col = __tmp[1];
12003 var offset = __tmp[2];
12004 return {"i":this.i, "lnum":lnum, "col":col, "offset":offset};
12005}
12006
12007StringReader.prototype.setpos = function(pos) {
12008 this.i = pos.i;
12009}
12010
12011StringReader.prototype.read_alpha = function() {
12012 var r = "";
12013 while (isalpha(this.peekn(1))) {
12014 r += this.getn(1);
12015 }
12016 return r;
12017}
12018
12019StringReader.prototype.read_alnum = function() {
12020 var r = "";
12021 while (isalnum(this.peekn(1))) {
12022 r += this.getn(1);
12023 }
12024 return r;
12025}
12026
12027StringReader.prototype.read_digit = function() {
12028 var r = "";
12029 while (isdigit(this.peekn(1))) {
12030 r += this.getn(1);
12031 }
12032 return r;
12033}
12034
12035StringReader.prototype.read_odigit = function() {
12036 var r = "";
12037 while (isodigit(this.peekn(1))) {
12038 r += this.getn(1);
12039 }
12040 return r;
12041}
12042
12043StringReader.prototype.read_blob = function() {
12044 var r = "";
12045 while (1) {
12046 var s = this.peekn(2);
12047 if (viml_eqregh(s, "^[0-9A-Fa-f][0-9A-Fa-f]$")) {
12048 r += this.getn(2);
12049 }
12050 else if (viml_eqregh(s, "^\\.[0-9A-Fa-f]$")) {
12051 r += this.getn(1);
12052 }
12053 else if (viml_eqregh(s, "^[0-9A-Fa-f][^0-9A-Fa-f]$")) {
12054 throw Err("E973: Blob literal should have an even number of hex characters:" + s, this.getpos());
12055 }
12056 else {
12057 break;
12058 }
12059 }
12060 return r;
12061}
12062
12063StringReader.prototype.read_xdigit = function() {
12064 var r = "";
12065 while (isxdigit(this.peekn(1))) {
12066 r += this.getn(1);
12067 }
12068 return r;
12069}
12070
12071StringReader.prototype.read_bdigit = function() {
12072 var r = "";
12073 while (this.peekn(1) == "0" || this.peekn(1) == "1") {
12074 r += this.getn(1);
12075 }
12076 return r;
12077}
12078
12079StringReader.prototype.read_integer = function() {
12080 var r = "";
12081 var c = this.peekn(1);
12082 if (c == "-" || c == "+") {
12083 var r = this.getn(1);
12084 }
12085 return r + this.read_digit();
12086}
12087
12088StringReader.prototype.read_word = function() {
12089 var r = "";
12090 while (iswordc(this.peekn(1))) {
12091 r += this.getn(1);
12092 }
12093 return r;
12094}
12095
12096StringReader.prototype.read_white = function() {
12097 var r = "";
12098 while (iswhite(this.peekn(1))) {
12099 r += this.getn(1);
12100 }
12101 return r;
12102}
12103
12104StringReader.prototype.read_nonwhite = function() {
12105 var r = "";
12106 var ch = this.peekn(1);
12107 while (!iswhite(ch) && ch != "") {
12108 r += this.getn(1);
12109 var ch = this.peekn(1);
12110 }
12111 return r;
12112}
12113
12114StringReader.prototype.read_name = function() {
12115 var r = "";
12116 while (isnamec(this.peekn(1))) {
12117 r += this.getn(1);
12118 }
12119 return r;
12120}
12121
12122StringReader.prototype.skip_white = function() {
12123 while (iswhite(this.peekn(1))) {
12124 this.seek_cur(1);
12125 }
12126}
12127
12128StringReader.prototype.skip_white_and_colon = function() {
12129 while (TRUE) {
12130 var c = this.peekn(1);
12131 if (!iswhite(c) && c != ":") {
12132 break;
12133 }
12134 this.seek_cur(1);
12135 }
12136}
12137
12138function Compiler() { this.__init__.apply(this, arguments); }
12139Compiler.prototype.__init__ = function() {
12140 this.indent = [""];
12141 this.lines = [];
12142}
12143
12144Compiler.prototype.out = function() {
12145 var a000 = Array.prototype.slice.call(arguments, 0);
12146 if (viml_len(a000) == 1) {
12147 if (a000[0][0] == ")") {
12148 this.lines[this.lines.length - 1] += a000[0];
12149 }
12150 else {
12151 viml_add(this.lines, this.indent[0] + a000[0]);
12152 }
12153 }
12154 else {
12155 viml_add(this.lines, this.indent[0] + viml_printf.apply(null, a000));
12156 }
12157}
12158
12159Compiler.prototype.incindent = function(s) {
12160 viml_insert(this.indent, this.indent[0] + s);
12161}
12162
12163Compiler.prototype.decindent = function() {
12164 viml_remove(this.indent, 0);
12165}
12166
12167Compiler.prototype.compile = function(node) {
12168 if (node.type == NODE_TOPLEVEL) {
12169 return this.compile_toplevel(node);
12170 }
12171 else if (node.type == NODE_COMMENT) {
12172 this.compile_comment(node);
12173 return NIL;
12174 }
12175 else if (node.type == NODE_EXCMD) {
12176 this.compile_excmd(node);
12177 return NIL;
12178 }
12179 else if (node.type == NODE_FUNCTION) {
12180 this.compile_function(node);
12181 return NIL;
12182 }
12183 else if (node.type == NODE_DELFUNCTION) {
12184 this.compile_delfunction(node);
12185 return NIL;
12186 }
12187 else if (node.type == NODE_RETURN) {
12188 this.compile_return(node);
12189 return NIL;
12190 }
12191 else if (node.type == NODE_EXCALL) {
12192 this.compile_excall(node);
12193 return NIL;
12194 }
12195 else if (node.type == NODE_EVAL) {
12196 this.compile_eval(node);
12197 return NIL;
12198 }
12199 else if (node.type == NODE_LET) {
12200 this.compile_let(node);
12201 return NIL;
12202 }
12203 else if (node.type == NODE_CONST) {
12204 this.compile_const(node);
12205 return NIL;
12206 }
12207 else if (node.type == NODE_UNLET) {
12208 this.compile_unlet(node);
12209 return NIL;
12210 }
12211 else if (node.type == NODE_LOCKVAR) {
12212 this.compile_lockvar(node);
12213 return NIL;
12214 }
12215 else if (node.type == NODE_UNLOCKVAR) {
12216 this.compile_unlockvar(node);
12217 return NIL;
12218 }
12219 else if (node.type == NODE_IF) {
12220 this.compile_if(node);
12221 return NIL;
12222 }
12223 else if (node.type == NODE_WHILE) {
12224 this.compile_while(node);
12225 return NIL;
12226 }
12227 else if (node.type == NODE_FOR) {
12228 this.compile_for(node);
12229 return NIL;
12230 }
12231 else if (node.type == NODE_CONTINUE) {
12232 this.compile_continue(node);
12233 return NIL;
12234 }
12235 else if (node.type == NODE_BREAK) {
12236 this.compile_break(node);
12237 return NIL;
12238 }
12239 else if (node.type == NODE_TRY) {
12240 this.compile_try(node);
12241 return NIL;
12242 }
12243 else if (node.type == NODE_THROW) {
12244 this.compile_throw(node);
12245 return NIL;
12246 }
12247 else if (node.type == NODE_ECHO) {
12248 this.compile_echo(node);
12249 return NIL;
12250 }
12251 else if (node.type == NODE_ECHON) {
12252 this.compile_echon(node);
12253 return NIL;
12254 }
12255 else if (node.type == NODE_ECHOHL) {
12256 this.compile_echohl(node);
12257 return NIL;
12258 }
12259 else if (node.type == NODE_ECHOMSG) {
12260 this.compile_echomsg(node);
12261 return NIL;
12262 }
12263 else if (node.type == NODE_ECHOERR) {
12264 this.compile_echoerr(node);
12265 return NIL;
12266 }
12267 else if (node.type == NODE_EXECUTE) {
12268 this.compile_execute(node);
12269 return NIL;
12270 }
12271 else if (node.type == NODE_TERNARY) {
12272 return this.compile_ternary(node);
12273 }
12274 else if (node.type == NODE_OR) {
12275 return this.compile_or(node);
12276 }
12277 else if (node.type == NODE_AND) {
12278 return this.compile_and(node);
12279 }
12280 else if (node.type == NODE_EQUAL) {
12281 return this.compile_equal(node);
12282 }
12283 else if (node.type == NODE_EQUALCI) {
12284 return this.compile_equalci(node);
12285 }
12286 else if (node.type == NODE_EQUALCS) {
12287 return this.compile_equalcs(node);
12288 }
12289 else if (node.type == NODE_NEQUAL) {
12290 return this.compile_nequal(node);
12291 }
12292 else if (node.type == NODE_NEQUALCI) {
12293 return this.compile_nequalci(node);
12294 }
12295 else if (node.type == NODE_NEQUALCS) {
12296 return this.compile_nequalcs(node);
12297 }
12298 else if (node.type == NODE_GREATER) {
12299 return this.compile_greater(node);
12300 }
12301 else if (node.type == NODE_GREATERCI) {
12302 return this.compile_greaterci(node);
12303 }
12304 else if (node.type == NODE_GREATERCS) {
12305 return this.compile_greatercs(node);
12306 }
12307 else if (node.type == NODE_GEQUAL) {
12308 return this.compile_gequal(node);
12309 }
12310 else if (node.type == NODE_GEQUALCI) {
12311 return this.compile_gequalci(node);
12312 }
12313 else if (node.type == NODE_GEQUALCS) {
12314 return this.compile_gequalcs(node);
12315 }
12316 else if (node.type == NODE_SMALLER) {
12317 return this.compile_smaller(node);
12318 }
12319 else if (node.type == NODE_SMALLERCI) {
12320 return this.compile_smallerci(node);
12321 }
12322 else if (node.type == NODE_SMALLERCS) {
12323 return this.compile_smallercs(node);
12324 }
12325 else if (node.type == NODE_SEQUAL) {
12326 return this.compile_sequal(node);
12327 }
12328 else if (node.type == NODE_SEQUALCI) {
12329 return this.compile_sequalci(node);
12330 }
12331 else if (node.type == NODE_SEQUALCS) {
12332 return this.compile_sequalcs(node);
12333 }
12334 else if (node.type == NODE_MATCH) {
12335 return this.compile_match(node);
12336 }
12337 else if (node.type == NODE_MATCHCI) {
12338 return this.compile_matchci(node);
12339 }
12340 else if (node.type == NODE_MATCHCS) {
12341 return this.compile_matchcs(node);
12342 }
12343 else if (node.type == NODE_NOMATCH) {
12344 return this.compile_nomatch(node);
12345 }
12346 else if (node.type == NODE_NOMATCHCI) {
12347 return this.compile_nomatchci(node);
12348 }
12349 else if (node.type == NODE_NOMATCHCS) {
12350 return this.compile_nomatchcs(node);
12351 }
12352 else if (node.type == NODE_IS) {
12353 return this.compile_is(node);
12354 }
12355 else if (node.type == NODE_ISCI) {
12356 return this.compile_isci(node);
12357 }
12358 else if (node.type == NODE_ISCS) {
12359 return this.compile_iscs(node);
12360 }
12361 else if (node.type == NODE_ISNOT) {
12362 return this.compile_isnot(node);
12363 }
12364 else if (node.type == NODE_ISNOTCI) {
12365 return this.compile_isnotci(node);
12366 }
12367 else if (node.type == NODE_ISNOTCS) {
12368 return this.compile_isnotcs(node);
12369 }
12370 else if (node.type == NODE_ADD) {
12371 return this.compile_add(node);
12372 }
12373 else if (node.type == NODE_SUBTRACT) {
12374 return this.compile_subtract(node);
12375 }
12376 else if (node.type == NODE_CONCAT) {
12377 return this.compile_concat(node);
12378 }
12379 else if (node.type == NODE_MULTIPLY) {
12380 return this.compile_multiply(node);
12381 }
12382 else if (node.type == NODE_DIVIDE) {
12383 return this.compile_divide(node);
12384 }
12385 else if (node.type == NODE_REMAINDER) {
12386 return this.compile_remainder(node);
12387 }
12388 else if (node.type == NODE_NOT) {
12389 return this.compile_not(node);
12390 }
12391 else if (node.type == NODE_PLUS) {
12392 return this.compile_plus(node);
12393 }
12394 else if (node.type == NODE_MINUS) {
12395 return this.compile_minus(node);
12396 }
12397 else if (node.type == NODE_SUBSCRIPT) {
12398 return this.compile_subscript(node);
12399 }
12400 else if (node.type == NODE_SLICE) {
12401 return this.compile_slice(node);
12402 }
12403 else if (node.type == NODE_DOT) {
12404 return this.compile_dot(node);
12405 }
12406 else if (node.type == NODE_METHOD) {
12407 return this.compile_method(node);
12408 }
12409 else if (node.type == NODE_CALL) {
12410 return this.compile_call(node);
12411 }
12412 else if (node.type == NODE_NUMBER) {
12413 return this.compile_number(node);
12414 }
12415 else if (node.type == NODE_BLOB) {
12416 return this.compile_blob(node);
12417 }
12418 else if (node.type == NODE_STRING) {
12419 return this.compile_string(node);
12420 }
12421 else if (node.type == NODE_LIST) {
12422 return this.compile_list(node);
12423 }
12424 else if (node.type == NODE_DICT) {
12425 return this.compile_dict(node);
12426 }
12427 else if (node.type == NODE_OPTION) {
12428 return this.compile_option(node);
12429 }
12430 else if (node.type == NODE_IDENTIFIER) {
12431 return this.compile_identifier(node);
12432 }
12433 else if (node.type == NODE_CURLYNAME) {
12434 return this.compile_curlyname(node);
12435 }
12436 else if (node.type == NODE_ENV) {
12437 return this.compile_env(node);
12438 }
12439 else if (node.type == NODE_REG) {
12440 return this.compile_reg(node);
12441 }
12442 else if (node.type == NODE_CURLYNAMEPART) {
12443 return this.compile_curlynamepart(node);
12444 }
12445 else if (node.type == NODE_CURLYNAMEEXPR) {
12446 return this.compile_curlynameexpr(node);
12447 }
12448 else if (node.type == NODE_LAMBDA) {
12449 return this.compile_lambda(node);
12450 }
12451 else if (node.type == NODE_HEREDOC) {
12452 return this.compile_heredoc(node);
12453 }
12454 else {
12455 throw viml_printf("Compiler: unknown node: %s", viml_string(node));
12456 }
12457 return NIL;
12458}
12459
12460Compiler.prototype.compile_body = function(body) {
12461 var __c10 = body;
12462 for (var __i10 = 0; __i10 < __c10.length; ++__i10) {
12463 var node = __c10[__i10];
12464 this.compile(node);
12465 }
12466}
12467
12468Compiler.prototype.compile_toplevel = function(node) {
12469 this.compile_body(node.body);
12470 return this.lines;
12471}
12472
12473Compiler.prototype.compile_comment = function(node) {
12474 this.out(";%s", node.str);
12475}
12476
12477Compiler.prototype.compile_excmd = function(node) {
12478 this.out("(excmd \"%s\")", viml_escape(node.str, "\\\""));
12479}
12480
12481Compiler.prototype.compile_function = function(node) {
12482 var left = this.compile(node.left);
12483 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12484 var default_args = node.default_args.map((function(vval) { return this.compile(vval); }).bind(this));
12485 if (!viml_empty(rlist)) {
12486 var remaining = FALSE;
12487 if (rlist[rlist.length - 1] == "...") {
12488 viml_remove(rlist, -1);
12489 var remaining = TRUE;
12490 }
12491 var __c11 = viml_range(viml_len(rlist));
12492 for (var __i11 = 0; __i11 < __c11.length; ++__i11) {
12493 var i = __c11[__i11];
12494 if (i < viml_len(rlist) - viml_len(default_args)) {
12495 left += viml_printf(" %s", rlist[i]);
12496 }
12497 else {
12498 left += viml_printf(" (%s %s)", rlist[i], default_args[i + viml_len(default_args) - viml_len(rlist)]);
12499 }
12500 }
12501 if (remaining) {
12502 left += " . ...";
12503 }
12504 }
12505 this.out("(function (%s)", left);
12506 this.incindent(" ");
12507 this.compile_body(node.body);
12508 this.out(")");
12509 this.decindent();
12510}
12511
12512Compiler.prototype.compile_delfunction = function(node) {
12513 this.out("(delfunction %s)", this.compile(node.left));
12514}
12515
12516Compiler.prototype.compile_return = function(node) {
12517 if (node.left === NIL) {
12518 this.out("(return)");
12519 }
12520 else {
12521 this.out("(return %s)", this.compile(node.left));
12522 }
12523}
12524
12525Compiler.prototype.compile_excall = function(node) {
12526 this.out("(call %s)", this.compile(node.left));
12527}
12528
12529Compiler.prototype.compile_eval = function(node) {
12530 this.out("(eval %s)", this.compile(node.left));
12531}
12532
12533Compiler.prototype.compile_let = function(node) {
12534 var left = "";
12535 if (node.left !== NIL) {
12536 var left = this.compile(node.left);
12537 }
12538 else {
12539 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12540 if (node.rest !== NIL) {
12541 left += " . " + this.compile(node.rest);
12542 }
12543 var left = "(" + left + ")";
12544 }
12545 var right = this.compile(node.right);
12546 this.out("(let %s %s %s)", node.op, left, right);
12547}
12548
12549// TODO: merge with s:Compiler.compile_let() ?
12550Compiler.prototype.compile_const = function(node) {
12551 var left = "";
12552 if (node.left !== NIL) {
12553 var left = this.compile(node.left);
12554 }
12555 else {
12556 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12557 if (node.rest !== NIL) {
12558 left += " . " + this.compile(node.rest);
12559 }
12560 var left = "(" + left + ")";
12561 }
12562 var right = this.compile(node.right);
12563 this.out("(const %s %s %s)", node.op, left, right);
12564}
12565
12566Compiler.prototype.compile_unlet = function(node) {
12567 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12568 this.out("(unlet %s)", viml_join(list, " "));
12569}
12570
12571Compiler.prototype.compile_lockvar = function(node) {
12572 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12573 if (node.depth === NIL) {
12574 this.out("(lockvar %s)", viml_join(list, " "));
12575 }
12576 else {
12577 this.out("(lockvar %s %s)", node.depth, viml_join(list, " "));
12578 }
12579}
12580
12581Compiler.prototype.compile_unlockvar = function(node) {
12582 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12583 if (node.depth === NIL) {
12584 this.out("(unlockvar %s)", viml_join(list, " "));
12585 }
12586 else {
12587 this.out("(unlockvar %s %s)", node.depth, viml_join(list, " "));
12588 }
12589}
12590
12591Compiler.prototype.compile_if = function(node) {
12592 this.out("(if %s", this.compile(node.cond));
12593 this.incindent(" ");
12594 this.compile_body(node.body);
12595 this.decindent();
12596 var __c12 = node.elseif;
12597 for (var __i12 = 0; __i12 < __c12.length; ++__i12) {
12598 var enode = __c12[__i12];
12599 this.out(" elseif %s", this.compile(enode.cond));
12600 this.incindent(" ");
12601 this.compile_body(enode.body);
12602 this.decindent();
12603 }
12604 if (node._else !== NIL) {
12605 this.out(" else");
12606 this.incindent(" ");
12607 this.compile_body(node._else.body);
12608 this.decindent();
12609 }
12610 this.incindent(" ");
12611 this.out(")");
12612 this.decindent();
12613}
12614
12615Compiler.prototype.compile_while = function(node) {
12616 this.out("(while %s", this.compile(node.cond));
12617 this.incindent(" ");
12618 this.compile_body(node.body);
12619 this.out(")");
12620 this.decindent();
12621}
12622
12623Compiler.prototype.compile_for = function(node) {
12624 var left = "";
12625 if (node.left !== NIL) {
12626 var left = this.compile(node.left);
12627 }
12628 else {
12629 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12630 if (node.rest !== NIL) {
12631 left += " . " + this.compile(node.rest);
12632 }
12633 var left = "(" + left + ")";
12634 }
12635 var right = this.compile(node.right);
12636 this.out("(for %s %s", left, right);
12637 this.incindent(" ");
12638 this.compile_body(node.body);
12639 this.out(")");
12640 this.decindent();
12641}
12642
12643Compiler.prototype.compile_continue = function(node) {
12644 this.out("(continue)");
12645}
12646
12647Compiler.prototype.compile_break = function(node) {
12648 this.out("(break)");
12649}
12650
12651Compiler.prototype.compile_try = function(node) {
12652 this.out("(try");
12653 this.incindent(" ");
12654 this.compile_body(node.body);
12655 var __c13 = node.catch;
12656 for (var __i13 = 0; __i13 < __c13.length; ++__i13) {
12657 var cnode = __c13[__i13];
12658 if (cnode.pattern !== NIL) {
12659 this.decindent();
12660 this.out(" catch /%s/", cnode.pattern);
12661 this.incindent(" ");
12662 this.compile_body(cnode.body);
12663 }
12664 else {
12665 this.decindent();
12666 this.out(" catch");
12667 this.incindent(" ");
12668 this.compile_body(cnode.body);
12669 }
12670 }
12671 if (node._finally !== NIL) {
12672 this.decindent();
12673 this.out(" finally");
12674 this.incindent(" ");
12675 this.compile_body(node._finally.body);
12676 }
12677 this.out(")");
12678 this.decindent();
12679}
12680
12681Compiler.prototype.compile_throw = function(node) {
12682 this.out("(throw %s)", this.compile(node.left));
12683}
12684
12685Compiler.prototype.compile_echo = function(node) {
12686 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12687 this.out("(echo %s)", viml_join(list, " "));
12688}
12689
12690Compiler.prototype.compile_echon = function(node) {
12691 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12692 this.out("(echon %s)", viml_join(list, " "));
12693}
12694
12695Compiler.prototype.compile_echohl = function(node) {
12696 this.out("(echohl \"%s\")", viml_escape(node.str, "\\\""));
12697}
12698
12699Compiler.prototype.compile_echomsg = function(node) {
12700 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12701 this.out("(echomsg %s)", viml_join(list, " "));
12702}
12703
12704Compiler.prototype.compile_echoerr = function(node) {
12705 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12706 this.out("(echoerr %s)", viml_join(list, " "));
12707}
12708
12709Compiler.prototype.compile_execute = function(node) {
12710 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12711 this.out("(execute %s)", viml_join(list, " "));
12712}
12713
12714Compiler.prototype.compile_ternary = function(node) {
12715 return viml_printf("(?: %s %s %s)", this.compile(node.cond), this.compile(node.left), this.compile(node.right));
12716}
12717
12718Compiler.prototype.compile_or = function(node) {
12719 return viml_printf("(|| %s %s)", this.compile(node.left), this.compile(node.right));
12720}
12721
12722Compiler.prototype.compile_and = function(node) {
12723 return viml_printf("(&& %s %s)", this.compile(node.left), this.compile(node.right));
12724}
12725
12726Compiler.prototype.compile_equal = function(node) {
12727 return viml_printf("(== %s %s)", this.compile(node.left), this.compile(node.right));
12728}
12729
12730Compiler.prototype.compile_equalci = function(node) {
12731 return viml_printf("(==? %s %s)", this.compile(node.left), this.compile(node.right));
12732}
12733
12734Compiler.prototype.compile_equalcs = function(node) {
12735 return viml_printf("(==# %s %s)", this.compile(node.left), this.compile(node.right));
12736}
12737
12738Compiler.prototype.compile_nequal = function(node) {
12739 return viml_printf("(!= %s %s)", this.compile(node.left), this.compile(node.right));
12740}
12741
12742Compiler.prototype.compile_nequalci = function(node) {
12743 return viml_printf("(!=? %s %s)", this.compile(node.left), this.compile(node.right));
12744}
12745
12746Compiler.prototype.compile_nequalcs = function(node) {
12747 return viml_printf("(!=# %s %s)", this.compile(node.left), this.compile(node.right));
12748}
12749
12750Compiler.prototype.compile_greater = function(node) {
12751 return viml_printf("(> %s %s)", this.compile(node.left), this.compile(node.right));
12752}
12753
12754Compiler.prototype.compile_greaterci = function(node) {
12755 return viml_printf("(>? %s %s)", this.compile(node.left), this.compile(node.right));
12756}
12757
12758Compiler.prototype.compile_greatercs = function(node) {
12759 return viml_printf("(># %s %s)", this.compile(node.left), this.compile(node.right));
12760}
12761
12762Compiler.prototype.compile_gequal = function(node) {
12763 return viml_printf("(>= %s %s)", this.compile(node.left), this.compile(node.right));
12764}
12765
12766Compiler.prototype.compile_gequalci = function(node) {
12767 return viml_printf("(>=? %s %s)", this.compile(node.left), this.compile(node.right));
12768}
12769
12770Compiler.prototype.compile_gequalcs = function(node) {
12771 return viml_printf("(>=# %s %s)", this.compile(node.left), this.compile(node.right));
12772}
12773
12774Compiler.prototype.compile_smaller = function(node) {
12775 return viml_printf("(< %s %s)", this.compile(node.left), this.compile(node.right));
12776}
12777
12778Compiler.prototype.compile_smallerci = function(node) {
12779 return viml_printf("(<? %s %s)", this.compile(node.left), this.compile(node.right));
12780}
12781
12782Compiler.prototype.compile_smallercs = function(node) {
12783 return viml_printf("(<# %s %s)", this.compile(node.left), this.compile(node.right));
12784}
12785
12786Compiler.prototype.compile_sequal = function(node) {
12787 return viml_printf("(<= %s %s)", this.compile(node.left), this.compile(node.right));
12788}
12789
12790Compiler.prototype.compile_sequalci = function(node) {
12791 return viml_printf("(<=? %s %s)", this.compile(node.left), this.compile(node.right));
12792}
12793
12794Compiler.prototype.compile_sequalcs = function(node) {
12795 return viml_printf("(<=# %s %s)", this.compile(node.left), this.compile(node.right));
12796}
12797
12798Compiler.prototype.compile_match = function(node) {
12799 return viml_printf("(=~ %s %s)", this.compile(node.left), this.compile(node.right));
12800}
12801
12802Compiler.prototype.compile_matchci = function(node) {
12803 return viml_printf("(=~? %s %s)", this.compile(node.left), this.compile(node.right));
12804}
12805
12806Compiler.prototype.compile_matchcs = function(node) {
12807 return viml_printf("(=~# %s %s)", this.compile(node.left), this.compile(node.right));
12808}
12809
12810Compiler.prototype.compile_nomatch = function(node) {
12811 return viml_printf("(!~ %s %s)", this.compile(node.left), this.compile(node.right));
12812}
12813
12814Compiler.prototype.compile_nomatchci = function(node) {
12815 return viml_printf("(!~? %s %s)", this.compile(node.left), this.compile(node.right));
12816}
12817
12818Compiler.prototype.compile_nomatchcs = function(node) {
12819 return viml_printf("(!~# %s %s)", this.compile(node.left), this.compile(node.right));
12820}
12821
12822Compiler.prototype.compile_is = function(node) {
12823 return viml_printf("(is %s %s)", this.compile(node.left), this.compile(node.right));
12824}
12825
12826Compiler.prototype.compile_isci = function(node) {
12827 return viml_printf("(is? %s %s)", this.compile(node.left), this.compile(node.right));
12828}
12829
12830Compiler.prototype.compile_iscs = function(node) {
12831 return viml_printf("(is# %s %s)", this.compile(node.left), this.compile(node.right));
12832}
12833
12834Compiler.prototype.compile_isnot = function(node) {
12835 return viml_printf("(isnot %s %s)", this.compile(node.left), this.compile(node.right));
12836}
12837
12838Compiler.prototype.compile_isnotci = function(node) {
12839 return viml_printf("(isnot? %s %s)", this.compile(node.left), this.compile(node.right));
12840}
12841
12842Compiler.prototype.compile_isnotcs = function(node) {
12843 return viml_printf("(isnot# %s %s)", this.compile(node.left), this.compile(node.right));
12844}
12845
12846Compiler.prototype.compile_add = function(node) {
12847 return viml_printf("(+ %s %s)", this.compile(node.left), this.compile(node.right));
12848}
12849
12850Compiler.prototype.compile_subtract = function(node) {
12851 return viml_printf("(- %s %s)", this.compile(node.left), this.compile(node.right));
12852}
12853
12854Compiler.prototype.compile_concat = function(node) {
12855 return viml_printf("(concat %s %s)", this.compile(node.left), this.compile(node.right));
12856}
12857
12858Compiler.prototype.compile_multiply = function(node) {
12859 return viml_printf("(* %s %s)", this.compile(node.left), this.compile(node.right));
12860}
12861
12862Compiler.prototype.compile_divide = function(node) {
12863 return viml_printf("(/ %s %s)", this.compile(node.left), this.compile(node.right));
12864}
12865
12866Compiler.prototype.compile_remainder = function(node) {
12867 return viml_printf("(%% %s %s)", this.compile(node.left), this.compile(node.right));
12868}
12869
12870Compiler.prototype.compile_not = function(node) {
12871 return viml_printf("(! %s)", this.compile(node.left));
12872}
12873
12874Compiler.prototype.compile_plus = function(node) {
12875 return viml_printf("(+ %s)", this.compile(node.left));
12876}
12877
12878Compiler.prototype.compile_minus = function(node) {
12879 return viml_printf("(- %s)", this.compile(node.left));
12880}
12881
12882Compiler.prototype.compile_subscript = function(node) {
12883 return viml_printf("(subscript %s %s)", this.compile(node.left), this.compile(node.right));
12884}
12885
12886Compiler.prototype.compile_slice = function(node) {
12887 var r0 = node.rlist[0] === NIL ? "nil" : this.compile(node.rlist[0]);
12888 var r1 = node.rlist[1] === NIL ? "nil" : this.compile(node.rlist[1]);
12889 return viml_printf("(slice %s %s %s)", this.compile(node.left), r0, r1);
12890}
12891
12892Compiler.prototype.compile_dot = function(node) {
12893 return viml_printf("(dot %s %s)", this.compile(node.left), this.compile(node.right));
12894}
12895
12896Compiler.prototype.compile_method = function(node) {
12897 return viml_printf("(method %s %s)", this.compile(node.left), this.compile(node.right));
12898}
12899
12900Compiler.prototype.compile_call = function(node) {
12901 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12902 if (viml_empty(rlist)) {
12903 return viml_printf("(%s)", this.compile(node.left));
12904 }
12905 else {
12906 return viml_printf("(%s %s)", this.compile(node.left), viml_join(rlist, " "));
12907 }
12908}
12909
12910Compiler.prototype.compile_number = function(node) {
12911 return node.value;
12912}
12913
12914Compiler.prototype.compile_blob = function(node) {
12915 return node.value;
12916}
12917
12918Compiler.prototype.compile_string = function(node) {
12919 return node.value;
12920}
12921
12922Compiler.prototype.compile_list = function(node) {
12923 var value = node.value.map((function(vval) { return this.compile(vval); }).bind(this));
12924 if (viml_empty(value)) {
12925 return "(list)";
12926 }
12927 else {
12928 return viml_printf("(list %s)", viml_join(value, " "));
12929 }
12930}
12931
12932Compiler.prototype.compile_dict = function(node) {
12933 var value = node.value.map((function(vval) { return "(" + this.compile(vval[0]) + " " + this.compile(vval[1]) + ")"; }).bind(this));
12934 if (viml_empty(value)) {
12935 return "(dict)";
12936 }
12937 else {
12938 return viml_printf("(dict %s)", viml_join(value, " "));
12939 }
12940}
12941
12942Compiler.prototype.compile_option = function(node) {
12943 return node.value;
12944}
12945
12946Compiler.prototype.compile_identifier = function(node) {
12947 return node.value;
12948}
12949
12950Compiler.prototype.compile_curlyname = function(node) {
12951 return viml_join(node.value.map((function(vval) { return this.compile(vval); }).bind(this)), "");
12952}
12953
12954Compiler.prototype.compile_env = function(node) {
12955 return node.value;
12956}
12957
12958Compiler.prototype.compile_reg = function(node) {
12959 return node.value;
12960}
12961
12962Compiler.prototype.compile_curlynamepart = function(node) {
12963 return node.value;
12964}
12965
12966Compiler.prototype.compile_curlynameexpr = function(node) {
12967 return "{" + this.compile(node.value) + "}";
12968}
12969
12970Compiler.prototype.escape_string = function(str) {
12971 var m = {"\n":"\\n", "\t":"\\t", "\r":"\\r"};
12972 var out = "\"";
12973 var __c14 = viml_range(viml_len(str));
12974 for (var __i14 = 0; __i14 < __c14.length; ++__i14) {
12975 var i = __c14[__i14];
12976 var c = str[i];
12977 if (viml_has_key(m, c)) {
12978 out += m[c];
12979 }
12980 else {
12981 out += c;
12982 }
12983 }
12984 out += "\"";
12985 return out;
12986}
12987
12988Compiler.prototype.compile_lambda = function(node) {
12989 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12990 return viml_printf("(lambda (%s) %s)", viml_join(rlist, " "), this.compile(node.left));
12991}
12992
12993Compiler.prototype.compile_heredoc = function(node) {
12994 if (viml_empty(node.rlist)) {
12995 var rlist = "(list)";
12996 }
12997 else {
12998 var rlist = "(list " + viml_join(node.rlist.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
12999 }
13000 if (viml_empty(node.body)) {
13001 var body = "(list)";
13002 }
13003 else {
13004 var body = "(list " + viml_join(node.body.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
13005 }
13006 var op = this.escape_string(node.op);
13007 return viml_printf("(heredoc %s %s %s)", rlist, op, body);
13008}
13009
13010// TODO: under construction
13011function RegexpParser() { this.__init__.apply(this, arguments); }
13012RegexpParser.prototype.RE_VERY_NOMAGIC = 1;
13013RegexpParser.prototype.RE_NOMAGIC = 2;
13014RegexpParser.prototype.RE_MAGIC = 3;
13015RegexpParser.prototype.RE_VERY_MAGIC = 4;
13016RegexpParser.prototype.__init__ = function(reader, cmd, delim) {
13017 this.reader = reader;
13018 this.cmd = cmd;
13019 this.delim = delim;
13020 this.reg_magic = this.RE_MAGIC;
13021}
13022
13023RegexpParser.prototype.isend = function(c) {
13024 return c == "<EOF>" || c == "<EOL>" || c == this.delim;
13025}
13026
13027RegexpParser.prototype.parse_regexp = function() {
13028 var prevtoken = "";
13029 var ntoken = "";
13030 var ret = [];
13031 if (this.reader.peekn(4) == "\\%#=") {
13032 var epos = this.reader.getpos();
13033 var token = this.reader.getn(5);
13034 if (token != "\\%#=0" && token != "\\%#=1" && token != "\\%#=2") {
13035 throw Err("E864: \\%#= can only be followed by 0, 1, or 2", epos);
13036 }
13037 viml_add(ret, token);
13038 }
13039 while (!this.isend(this.reader.peek())) {
13040 var prevtoken = ntoken;
13041 var __tmp = this.get_token();
13042 var token = __tmp[0];
13043 var ntoken = __tmp[1];
13044 if (ntoken == "\\m") {
13045 this.reg_magic = this.RE_MAGIC;
13046 }
13047 else if (ntoken == "\\M") {
13048 this.reg_magic = this.RE_NOMAGIC;
13049 }
13050 else if (ntoken == "\\v") {
13051 this.reg_magic = this.RE_VERY_MAGIC;
13052 }
13053 else if (ntoken == "\\V") {
13054 this.reg_magic = this.RE_VERY_NOMAGIC;
13055 }
13056 else if (ntoken == "\\*") {
13057 // '*' is not magic as the very first character.
13058 if (prevtoken == "" || prevtoken == "\\^" || prevtoken == "\\&" || prevtoken == "\\|" || prevtoken == "\\(") {
13059 var ntoken = "*";
13060 }
13061 }
13062 else if (ntoken == "\\^") {
13063 // '^' is only magic as the very first character.
13064 if (this.reg_magic != this.RE_VERY_MAGIC && prevtoken != "" && prevtoken != "\\&" && prevtoken != "\\|" && prevtoken != "\\n" && prevtoken != "\\(" && prevtoken != "\\%(") {
13065 var ntoken = "^";
13066 }
13067 }
13068 else if (ntoken == "\\$") {
13069 // '$' is only magic as the very last character
13070 var pos = this.reader.tell();
13071 if (this.reg_magic != this.RE_VERY_MAGIC) {
13072 while (!this.isend(this.reader.peek())) {
13073 var __tmp = this.get_token();
13074 var t = __tmp[0];
13075 var n = __tmp[1];
13076 // XXX: Vim doesn't check \v and \V?
13077 if (n == "\\c" || n == "\\C" || n == "\\m" || n == "\\M" || n == "\\Z") {
13078 continue;
13079 }
13080 if (n != "\\|" && n != "\\&" && n != "\\n" && n != "\\)") {
13081 var ntoken = "$";
13082 }
13083 break;
13084 }
13085 }
13086 this.reader.seek_set(pos);
13087 }
13088 else if (ntoken == "\\?") {
13089 // '?' is literal in '?' command.
13090 if (this.cmd == "?") {
13091 var ntoken = "?";
13092 }
13093 }
13094 viml_add(ret, ntoken);
13095 }
13096 return ret;
13097}
13098
13099// @return [actual_token, normalized_token]
13100RegexpParser.prototype.get_token = function() {
13101 if (this.reg_magic == this.RE_VERY_MAGIC) {
13102 return this.get_token_very_magic();
13103 }
13104 else if (this.reg_magic == this.RE_MAGIC) {
13105 return this.get_token_magic();
13106 }
13107 else if (this.reg_magic == this.RE_NOMAGIC) {
13108 return this.get_token_nomagic();
13109 }
13110 else if (this.reg_magic == this.RE_VERY_NOMAGIC) {
13111 return this.get_token_very_nomagic();
13112 }
13113}
13114
13115RegexpParser.prototype.get_token_very_magic = function() {
13116 if (this.isend(this.reader.peek())) {
13117 return ["<END>", "<END>"];
13118 }
13119 var c = this.reader.get();
13120 if (c == "\\") {
13121 return this.get_token_backslash_common();
13122 }
13123 else if (c == "*") {
13124 return ["*", "\\*"];
13125 }
13126 else if (c == "+") {
13127 return ["+", "\\+"];
13128 }
13129 else if (c == "=") {
13130 return ["=", "\\="];
13131 }
13132 else if (c == "?") {
13133 return ["?", "\\?"];
13134 }
13135 else if (c == "{") {
13136 return this.get_token_brace("{");
13137 }
13138 else if (c == "@") {
13139 return this.get_token_at("@");
13140 }
13141 else if (c == "^") {
13142 return ["^", "\\^"];
13143 }
13144 else if (c == "$") {
13145 return ["$", "\\$"];
13146 }
13147 else if (c == ".") {
13148 return [".", "\\."];
13149 }
13150 else if (c == "<") {
13151 return ["<", "\\<"];
13152 }
13153 else if (c == ">") {
13154 return [">", "\\>"];
13155 }
13156 else if (c == "%") {
13157 return this.get_token_percent("%");
13158 }
13159 else if (c == "[") {
13160 return this.get_token_sq("[");
13161 }
13162 else if (c == "~") {
13163 return ["~", "\\~"];
13164 }
13165 else if (c == "|") {
13166 return ["|", "\\|"];
13167 }
13168 else if (c == "&") {
13169 return ["&", "\\&"];
13170 }
13171 else if (c == "(") {
13172 return ["(", "\\("];
13173 }
13174 else if (c == ")") {
13175 return [")", "\\)"];
13176 }
13177 return [c, c];
13178}
13179
13180RegexpParser.prototype.get_token_magic = function() {
13181 if (this.isend(this.reader.peek())) {
13182 return ["<END>", "<END>"];
13183 }
13184 var c = this.reader.get();
13185 if (c == "\\") {
13186 var pos = this.reader.tell();
13187 var c = this.reader.get();
13188 if (c == "+") {
13189 return ["\\+", "\\+"];
13190 }
13191 else if (c == "=") {
13192 return ["\\=", "\\="];
13193 }
13194 else if (c == "?") {
13195 return ["\\?", "\\?"];
13196 }
13197 else if (c == "{") {
13198 return this.get_token_brace("\\{");
13199 }
13200 else if (c == "@") {
13201 return this.get_token_at("\\@");
13202 }
13203 else if (c == "<") {
13204 return ["\\<", "\\<"];
13205 }
13206 else if (c == ">") {
13207 return ["\\>", "\\>"];
13208 }
13209 else if (c == "%") {
13210 return this.get_token_percent("\\%");
13211 }
13212 else if (c == "|") {
13213 return ["\\|", "\\|"];
13214 }
13215 else if (c == "&") {
13216 return ["\\&", "\\&"];
13217 }
13218 else if (c == "(") {
13219 return ["\\(", "\\("];
13220 }
13221 else if (c == ")") {
13222 return ["\\)", "\\)"];
13223 }
13224 this.reader.seek_set(pos);
13225 return this.get_token_backslash_common();
13226 }
13227 else if (c == "*") {
13228 return ["*", "\\*"];
13229 }
13230 else if (c == "^") {
13231 return ["^", "\\^"];
13232 }
13233 else if (c == "$") {
13234 return ["$", "\\$"];
13235 }
13236 else if (c == ".") {
13237 return [".", "\\."];
13238 }
13239 else if (c == "[") {
13240 return this.get_token_sq("[");
13241 }
13242 else if (c == "~") {
13243 return ["~", "\\~"];
13244 }
13245 return [c, c];
13246}
13247
13248RegexpParser.prototype.get_token_nomagic = function() {
13249 if (this.isend(this.reader.peek())) {
13250 return ["<END>", "<END>"];
13251 }
13252 var c = this.reader.get();
13253 if (c == "\\") {
13254 var pos = this.reader.tell();
13255 var c = this.reader.get();
13256 if (c == "*") {
13257 return ["\\*", "\\*"];
13258 }
13259 else if (c == "+") {
13260 return ["\\+", "\\+"];
13261 }
13262 else if (c == "=") {
13263 return ["\\=", "\\="];
13264 }
13265 else if (c == "?") {
13266 return ["\\?", "\\?"];
13267 }
13268 else if (c == "{") {
13269 return this.get_token_brace("\\{");
13270 }
13271 else if (c == "@") {
13272 return this.get_token_at("\\@");
13273 }
13274 else if (c == ".") {
13275 return ["\\.", "\\."];
13276 }
13277 else if (c == "<") {
13278 return ["\\<", "\\<"];
13279 }
13280 else if (c == ">") {
13281 return ["\\>", "\\>"];
13282 }
13283 else if (c == "%") {
13284 return this.get_token_percent("\\%");
13285 }
13286 else if (c == "~") {
13287 return ["\\~", "\\^"];
13288 }
13289 else if (c == "[") {
13290 return this.get_token_sq("\\[");
13291 }
13292 else if (c == "|") {
13293 return ["\\|", "\\|"];
13294 }
13295 else if (c == "&") {
13296 return ["\\&", "\\&"];
13297 }
13298 else if (c == "(") {
13299 return ["\\(", "\\("];
13300 }
13301 else if (c == ")") {
13302 return ["\\)", "\\)"];
13303 }
13304 this.reader.seek_set(pos);
13305 return this.get_token_backslash_common();
13306 }
13307 else if (c == "^") {
13308 return ["^", "\\^"];
13309 }
13310 else if (c == "$") {
13311 return ["$", "\\$"];
13312 }
13313 return [c, c];
13314}
13315
13316RegexpParser.prototype.get_token_very_nomagic = function() {
13317 if (this.isend(this.reader.peek())) {
13318 return ["<END>", "<END>"];
13319 }
13320 var c = this.reader.get();
13321 if (c == "\\") {
13322 var pos = this.reader.tell();
13323 var c = this.reader.get();
13324 if (c == "*") {
13325 return ["\\*", "\\*"];
13326 }
13327 else if (c == "+") {
13328 return ["\\+", "\\+"];
13329 }
13330 else if (c == "=") {
13331 return ["\\=", "\\="];
13332 }
13333 else if (c == "?") {
13334 return ["\\?", "\\?"];
13335 }
13336 else if (c == "{") {
13337 return this.get_token_brace("\\{");
13338 }
13339 else if (c == "@") {
13340 return this.get_token_at("\\@");
13341 }
13342 else if (c == "^") {
13343 return ["\\^", "\\^"];
13344 }
13345 else if (c == "$") {
13346 return ["\\$", "\\$"];
13347 }
13348 else if (c == "<") {
13349 return ["\\<", "\\<"];
13350 }
13351 else if (c == ">") {
13352 return ["\\>", "\\>"];
13353 }
13354 else if (c == "%") {
13355 return this.get_token_percent("\\%");
13356 }
13357 else if (c == "~") {
13358 return ["\\~", "\\~"];
13359 }
13360 else if (c == "[") {
13361 return this.get_token_sq("\\[");
13362 }
13363 else if (c == "|") {
13364 return ["\\|", "\\|"];
13365 }
13366 else if (c == "&") {
13367 return ["\\&", "\\&"];
13368 }
13369 else if (c == "(") {
13370 return ["\\(", "\\("];
13371 }
13372 else if (c == ")") {
13373 return ["\\)", "\\)"];
13374 }
13375 this.reader.seek_set(pos);
13376 return this.get_token_backslash_common();
13377 }
13378 return [c, c];
13379}
13380
13381RegexpParser.prototype.get_token_backslash_common = function() {
13382 var cclass = "iIkKfFpPsSdDxXoOwWhHaAlLuU";
13383 var c = this.reader.get();
13384 if (c == "\\") {
13385 return ["\\\\", "\\\\"];
13386 }
13387 else if (viml_stridx(cclass, c) != -1) {
13388 return ["\\" + c, "\\" + c];
13389 }
13390 else if (c == "_") {
13391 var epos = this.reader.getpos();
13392 var c = this.reader.get();
13393 if (viml_stridx(cclass, c) != -1) {
13394 return ["\\_" + c, "\\_ . c"];
13395 }
13396 else if (c == "^") {
13397 return ["\\_^", "\\_^"];
13398 }
13399 else if (c == "$") {
13400 return ["\\_$", "\\_$"];
13401 }
13402 else if (c == ".") {
13403 return ["\\_.", "\\_."];
13404 }
13405 else if (c == "[") {
13406 return this.get_token_sq("\\_[");
13407 }
13408 throw Err("E63: Invalid use of \\_", epos);
13409 }
13410 else if (viml_stridx("etrb", c) != -1) {
13411 return ["\\" + c, "\\" + c];
13412 }
13413 else if (viml_stridx("123456789", c) != -1) {
13414 return ["\\" + c, "\\" + c];
13415 }
13416 else if (c == "z") {
13417 var epos = this.reader.getpos();
13418 var c = this.reader.get();
13419 if (viml_stridx("123456789", c) != -1) {
13420 return ["\\z" + c, "\\z" + c];
13421 }
13422 else if (c == "s") {
13423 return ["\\zs", "\\zs"];
13424 }
13425 else if (c == "e") {
13426 return ["\\ze", "\\ze"];
13427 }
13428 else if (c == "(") {
13429 return ["\\z(", "\\z("];
13430 }
13431 throw Err("E68: Invalid character after \\z", epos);
13432 }
13433 else if (viml_stridx("cCmMvVZ", c) != -1) {
13434 return ["\\" + c, "\\" + c];
13435 }
13436 else if (c == "%") {
13437 var epos = this.reader.getpos();
13438 var c = this.reader.get();
13439 if (c == "d") {
13440 var r = this.getdecchrs();
13441 if (r != "") {
13442 return ["\\%d" + r, "\\%d" + r];
13443 }
13444 }
13445 else if (c == "o") {
13446 var r = this.getoctchrs();
13447 if (r != "") {
13448 return ["\\%o" + r, "\\%o" + r];
13449 }
13450 }
13451 else if (c == "x") {
13452 var r = this.gethexchrs(2);
13453 if (r != "") {
13454 return ["\\%x" + r, "\\%x" + r];
13455 }
13456 }
13457 else if (c == "u") {
13458 var r = this.gethexchrs(4);
13459 if (r != "") {
13460 return ["\\%u" + r, "\\%u" + r];
13461 }
13462 }
13463 else if (c == "U") {
13464 var r = this.gethexchrs(8);
13465 if (r != "") {
13466 return ["\\%U" + r, "\\%U" + r];
13467 }
13468 }
13469 throw Err("E678: Invalid character after \\%[dxouU]", epos);
13470 }
13471 return ["\\" + c, c];
13472}
13473
13474// \{}
13475RegexpParser.prototype.get_token_brace = function(pre) {
13476 var r = "";
13477 var minus = "";
13478 var comma = "";
13479 var n = "";
13480 var m = "";
13481 if (this.reader.p(0) == "-") {
13482 var minus = this.reader.get();
13483 r += minus;
13484 }
13485 if (isdigit(this.reader.p(0))) {
13486 var n = this.reader.read_digit();
13487 r += n;
13488 }
13489 if (this.reader.p(0) == ",") {
13490 var comma = this.rader.get();
13491 r += comma;
13492 }
13493 if (isdigit(this.reader.p(0))) {
13494 var m = this.reader.read_digit();
13495 r += m;
13496 }
13497 if (this.reader.p(0) == "\\") {
13498 r += this.reader.get();
13499 }
13500 if (this.reader.p(0) != "}") {
13501 throw Err("E554: Syntax error in \\{...}", this.reader.getpos());
13502 }
13503 this.reader.get();
13504 return [pre + r, "\\{" + minus + n + comma + m + "}"];
13505}
13506
13507// \[]
13508RegexpParser.prototype.get_token_sq = function(pre) {
13509 var start = this.reader.tell();
13510 var r = "";
13511 // Complement of range
13512 if (this.reader.p(0) == "^") {
13513 r += this.reader.get();
13514 }
13515 // At the start ']' and '-' mean the literal character.
13516 if (this.reader.p(0) == "]" || this.reader.p(0) == "-") {
13517 r += this.reader.get();
13518 }
13519 while (TRUE) {
13520 var startc = 0;
13521 var c = this.reader.p(0);
13522 if (this.isend(c)) {
13523 // If there is no matching ']', we assume the '[' is a normal character.
13524 this.reader.seek_set(start);
13525 return [pre, "["];
13526 }
13527 else if (c == "]") {
13528 this.reader.seek_cur(1);
13529 return [pre + r + "]", "\\[" + r + "]"];
13530 }
13531 else if (c == "[") {
13532 var e = this.get_token_sq_char_class();
13533 if (e == "") {
13534 var e = this.get_token_sq_equi_class();
13535 if (e == "") {
13536 var e = this.get_token_sq_coll_element();
13537 if (e == "") {
13538 var __tmp = this.get_token_sq_c();
13539 var e = __tmp[0];
13540 var startc = __tmp[1];
13541 }
13542 }
13543 }
13544 r += e;
13545 }
13546 else {
13547 var __tmp = this.get_token_sq_c();
13548 var e = __tmp[0];
13549 var startc = __tmp[1];
13550 r += e;
13551 }
13552 if (startc != 0 && this.reader.p(0) == "-" && !this.isend(this.reader.p(1)) && !(this.reader.p(1) == "\\" && this.reader.p(2) == "n")) {
13553 this.reader.seek_cur(1);
13554 r += "-";
13555 var c = this.reader.p(0);
13556 if (c == "[") {
13557 var e = this.get_token_sq_coll_element();
13558 if (e != "") {
13559 var endc = viml_char2nr(e[2]);
13560 }
13561 else {
13562 var __tmp = this.get_token_sq_c();
13563 var e = __tmp[0];
13564 var endc = __tmp[1];
13565 }
13566 r += e;
13567 }
13568 else {
13569 var __tmp = this.get_token_sq_c();
13570 var e = __tmp[0];
13571 var endc = __tmp[1];
13572 r += e;
13573 }
13574 if (startc > endc || endc > startc + 256) {
13575 throw Err("E16: Invalid range", this.reader.getpos());
13576 }
13577 }
13578 }
13579}
13580
13581// [c]
13582RegexpParser.prototype.get_token_sq_c = function() {
13583 var c = this.reader.p(0);
13584 if (c == "\\") {
13585 this.reader.seek_cur(1);
13586 var c = this.reader.p(0);
13587 if (c == "n") {
13588 this.reader.seek_cur(1);
13589 return ["\\n", 0];
13590 }
13591 else if (c == "r") {
13592 this.reader.seek_cur(1);
13593 return ["\\r", 13];
13594 }
13595 else if (c == "t") {
13596 this.reader.seek_cur(1);
13597 return ["\\t", 9];
13598 }
13599 else if (c == "e") {
13600 this.reader.seek_cur(1);
13601 return ["\\e", 27];
13602 }
13603 else if (c == "b") {
13604 this.reader.seek_cur(1);
13605 return ["\\b", 8];
13606 }
13607 else if (viml_stridx("]^-\\", c) != -1) {
13608 this.reader.seek_cur(1);
13609 return ["\\" + c, viml_char2nr(c)];
13610 }
13611 else if (viml_stridx("doxuU", c) != -1) {
13612 var __tmp = this.get_token_sq_coll_char();
13613 var c = __tmp[0];
13614 var n = __tmp[1];
13615 return [c, n];
13616 }
13617 else {
13618 return ["\\", viml_char2nr("\\")];
13619 }
13620 }
13621 else if (c == "-") {
13622 this.reader.seek_cur(1);
13623 return ["-", viml_char2nr("-")];
13624 }
13625 else {
13626 this.reader.seek_cur(1);
13627 return [c, viml_char2nr(c)];
13628 }
13629}
13630
13631// [\d123]
13632RegexpParser.prototype.get_token_sq_coll_char = function() {
13633 var pos = this.reader.tell();
13634 var c = this.reader.get();
13635 if (c == "d") {
13636 var r = this.getdecchrs();
13637 var n = viml_str2nr(r, 10);
13638 }
13639 else if (c == "o") {
13640 var r = this.getoctchrs();
13641 var n = viml_str2nr(r, 8);
13642 }
13643 else if (c == "x") {
13644 var r = this.gethexchrs(2);
13645 var n = viml_str2nr(r, 16);
13646 }
13647 else if (c == "u") {
13648 var r = this.gethexchrs(4);
13649 var n = viml_str2nr(r, 16);
13650 }
13651 else if (c == "U") {
13652 var r = this.gethexchrs(8);
13653 var n = viml_str2nr(r, 16);
13654 }
13655 else {
13656 var r = "";
13657 }
13658 if (r == "") {
13659 this.reader.seek_set(pos);
13660 return "\\";
13661 }
13662 return ["\\" + c + r, n];
13663}
13664
13665// [[.a.]]
13666RegexpParser.prototype.get_token_sq_coll_element = function() {
13667 if (this.reader.p(0) == "[" && this.reader.p(1) == "." && !this.isend(this.reader.p(2)) && this.reader.p(3) == "." && this.reader.p(4) == "]") {
13668 return this.reader.getn(5);
13669 }
13670 return "";
13671}
13672
13673// [[=a=]]
13674RegexpParser.prototype.get_token_sq_equi_class = function() {
13675 if (this.reader.p(0) == "[" && this.reader.p(1) == "=" && !this.isend(this.reader.p(2)) && this.reader.p(3) == "=" && this.reader.p(4) == "]") {
13676 return this.reader.getn(5);
13677 }
13678 return "";
13679}
13680
13681// [[:alpha:]]
13682RegexpParser.prototype.get_token_sq_char_class = function() {
13683 var class_names = ["alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "xdigit", "tab", "return", "backspace", "escape"];
13684 var pos = this.reader.tell();
13685 if (this.reader.p(0) == "[" && this.reader.p(1) == ":") {
13686 this.reader.seek_cur(2);
13687 var r = this.reader.read_alpha();
13688 if (this.reader.p(0) == ":" && this.reader.p(1) == "]") {
13689 this.reader.seek_cur(2);
13690 var __c15 = class_names;
13691 for (var __i15 = 0; __i15 < __c15.length; ++__i15) {
13692 var name = __c15[__i15];
13693 if (r == name) {
13694 return "[:" + name + ":]";
13695 }
13696 }
13697 }
13698 }
13699 this.reader.seek_set(pos);
13700 return "";
13701}
13702
13703// \@...
13704RegexpParser.prototype.get_token_at = function(pre) {
13705 var epos = this.reader.getpos();
13706 var c = this.reader.get();
13707 if (c == ">") {
13708 return [pre + ">", "\\@>"];
13709 }
13710 else if (c == "=") {
13711 return [pre + "=", "\\@="];
13712 }
13713 else if (c == "!") {
13714 return [pre + "!", "\\@!"];
13715 }
13716 else if (c == "<") {
13717 var c = this.reader.get();
13718 if (c == "=") {
13719 return [pre + "<=", "\\@<="];
13720 }
13721 else if (c == "!") {
13722 return [pre + "<!", "\\@<!"];
13723 }
13724 }
13725 throw Err("E64: @ follows nothing", epos);
13726}
13727
13728// \%...
13729RegexpParser.prototype.get_token_percent = function(pre) {
13730 var c = this.reader.get();
13731 if (c == "^") {
13732 return [pre + "^", "\\%^"];
13733 }
13734 else if (c == "$") {
13735 return [pre + "$", "\\%$"];
13736 }
13737 else if (c == "V") {
13738 return [pre + "V", "\\%V"];
13739 }
13740 else if (c == "#") {
13741 return [pre + "#", "\\%#"];
13742 }
13743 else if (c == "[") {
13744 return this.get_token_percent_sq(pre + "[");
13745 }
13746 else if (c == "(") {
13747 return [pre + "(", "\\%("];
13748 }
13749 else {
13750 return this.get_token_mlcv(pre);
13751 }
13752}
13753
13754// \%[]
13755RegexpParser.prototype.get_token_percent_sq = function(pre) {
13756 var r = "";
13757 while (TRUE) {
13758 var c = this.reader.peek();
13759 if (this.isend(c)) {
13760 throw Err("E69: Missing ] after \\%[", this.reader.getpos());
13761 }
13762 else if (c == "]") {
13763 if (r == "") {
13764 throw Err("E70: Empty \\%[", this.reader.getpos());
13765 }
13766 this.reader.seek_cur(1);
13767 break;
13768 }
13769 this.reader.seek_cur(1);
13770 r += c;
13771 }
13772 return [pre + r + "]", "\\%[" + r + "]"];
13773}
13774
13775// \%'m \%l \%c \%v
13776RegexpParser.prototype.get_token_mlvc = function(pre) {
13777 var r = "";
13778 var cmp = "";
13779 if (this.reader.p(0) == "<" || this.reader.p(0) == ">") {
13780 var cmp = this.reader.get();
13781 r += cmp;
13782 }
13783 if (this.reader.p(0) == "'") {
13784 r += this.reader.get();
13785 var c = this.reader.p(0);
13786 if (this.isend(c)) {
13787 // FIXME: Should be error? Vim allow this.
13788 var c = "";
13789 }
13790 else {
13791 var c = this.reader.get();
13792 }
13793 return [pre + r + c, "\\%" + cmp + "'" + c];
13794 }
13795 else if (isdigit(this.reader.p(0))) {
13796 var d = this.reader.read_digit();
13797 r += d;
13798 var c = this.reader.p(0);
13799 if (c == "l") {
13800 this.reader.get();
13801 return [pre + r + "l", "\\%" + cmp + d + "l"];
13802 }
13803 else if (c == "c") {
13804 this.reader.get();
13805 return [pre + r + "c", "\\%" + cmp + d + "c"];
13806 }
13807 else if (c == "v") {
13808 this.reader.get();
13809 return [pre + r + "v", "\\%" + cmp + d + "v"];
13810 }
13811 }
13812 throw Err("E71: Invalid character after %", this.reader.getpos());
13813}
13814
13815RegexpParser.prototype.getdecchrs = function() {
13816 return this.reader.read_digit();
13817}
13818
13819RegexpParser.prototype.getoctchrs = function() {
13820 return this.reader.read_odigit();
13821}
13822
13823RegexpParser.prototype.gethexchrs = function(n) {
13824 var r = "";
13825 var __c16 = viml_range(n);
13826 for (var __i16 = 0; __i16 < __c16.length; ++__i16) {
13827 var i = __c16[__i16];
13828 var c = this.reader.peek();
13829 if (!isxdigit(c)) {
13830 break;
13831 }
13832 r += this.reader.get();
13833 }
13834 return r;
13835}
13836
13837if (__webpack_require__.c[__webpack_require__.s] === module) {
13838 main();
13839}
13840else {
13841 module.exports = {
13842 VimLParser: VimLParser,
13843 StringReader: StringReader,
13844 Compiler: Compiler
13845 };
13846}
13847
13848/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(53)(module)))
13849
13850/***/ }),
13851/* 53 */
13852/***/ (function(module, exports) {
13853
13854module.exports = function(module) {
13855 if (!module.webpackPolyfill) {
13856 module.deprecate = function() {};
13857 module.paths = [];
13858 // module.parent = undefined by default
13859 if (!module.children) module.children = [];
13860 Object.defineProperty(module, "loaded", {
13861 enumerable: true,
13862 get: function() {
13863 return module.l;
13864 }
13865 });
13866 Object.defineProperty(module, "id", {
13867 enumerable: true,
13868 get: function() {
13869 return module.i;
13870 }
13871 });
13872 module.webpackPolyfill = 1;
13873 }
13874 return module;
13875};
13876
13877
13878/***/ }),
13879/* 54 */
13880/***/ (function(module, exports, __webpack_require__) {
13881
13882"use strict";
13883
13884Object.defineProperty(exports, "__esModule", { value: true });
13885exports.errorLinePattern = /[^:]+:\s*(.+?):\s*line\s*([0-9]+)\s*col\s*([0-9]+)/;
13886exports.commentPattern = /^[ \t]*("|')/;
13887exports.keywordPattern = /[\w#&$<>.:]/;
13888exports.builtinFunctionPattern = /^((<SID>|\b(v|g|b|s|l|a):)?[\w#&]+)[ \t]*\([^)]*\)/;
13889exports.wordPrePattern = /^.*?(((<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+)|(<SID>|<SID|<SI|<S|<|\b(v|g|b|s|l|a):))$/;
13890exports.wordNextPattern = /^((SID>|ID>|D>|>|<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+|(:[\w#&$.]+)).*?(\r\n|\r|\n)?$/;
13891exports.colorschemePattern = /\bcolorscheme[ \t]+\w*$/;
13892exports.mapCommandPattern = /^([ \t]*(\[ \t]*)?)\w*map[ \t]+/;
13893exports.highlightLinkPattern = /^[ \t]*(hi|highlight)[ \t]+link([ \t]+[^ \t]+)*[ \t]*$/;
13894exports.highlightPattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]*$/;
13895exports.highlightValuePattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]+([^ \t=]+)=[^ \t=]*$/;
13896exports.autocmdPattern = /^[ \t]*(au|autocmd)!?[ \t]+([^ \t,]+,)*[^ \t,]*$/;
13897exports.builtinVariablePattern = [
13898 /\bv:\w*$/,
13899];
13900exports.optionPattern = [
13901 /(^|[ \t]+)&\w*$/,
13902 /(^|[ \t]+)set(l|local|g|global)?[ \t]+\w+$/,
13903];
13904exports.notFunctionPattern = [
13905 /^[ \t]*\\$/,
13906 /^[ \t]*\w+$/,
13907 /^[ \t]*"/,
13908 /(let|set|colorscheme)[ \t][^ \t]*$/,
13909 /[^([,\\ \t\w#>]\w*$/,
13910 /^[ \t]*(hi|highlight)([ \t]+link)?([ \t]+[^ \t]+)*[ \t]*$/,
13911 exports.autocmdPattern,
13912];
13913exports.commandPattern = [
13914 /(^|[ \t]):\w+$/,
13915 /^[ \t]*\w+$/,
13916 /:?silent!?[ \t]\w+/,
13917];
13918exports.featurePattern = [
13919 /\bhas\([ \t]*["']\w*/,
13920];
13921exports.expandPattern = [
13922 /\bexpand\(['"]<\w*$/,
13923 /\bexpand\([ \t]*['"]\w*$/,
13924];
13925exports.notIdentifierPattern = [
13926 exports.commentPattern,
13927 /("|'):\w*$/,
13928 /^[ \t]*\\$/,
13929 /^[ \t]*call[ \t]+[^ \t()]*$/,
13930 /('|"|#|&|\$|<)\w*$/,
13931];
13932
13933
13934/***/ }),
13935/* 55 */,
13936/* 56 */,
13937/* 57 */,
13938/* 58 */,
13939/* 59 */,
13940/* 60 */
13941/***/ (function(module, exports, __webpack_require__) {
13942
13943"use strict";
13944
13945const taskManager = __webpack_require__(61);
13946const async_1 = __webpack_require__(98);
13947const stream_1 = __webpack_require__(133);
13948const sync_1 = __webpack_require__(134);
13949const settings_1 = __webpack_require__(136);
13950const utils = __webpack_require__(62);
13951async function FastGlob(source, options) {
13952 assertPatternsInput(source);
13953 const works = getWorks(source, async_1.default, options);
13954 const result = await Promise.all(works);
13955 return utils.array.flatten(result);
13956}
13957// https://github.com/typescript-eslint/typescript-eslint/issues/60
13958// eslint-disable-next-line no-redeclare
13959(function (FastGlob) {
13960 function sync(source, options) {
13961 assertPatternsInput(source);
13962 const works = getWorks(source, sync_1.default, options);
13963 return utils.array.flatten(works);
13964 }
13965 FastGlob.sync = sync;
13966 function stream(source, options) {
13967 assertPatternsInput(source);
13968 const works = getWorks(source, stream_1.default, options);
13969 /**
13970 * The stream returned by the provider cannot work with an asynchronous iterator.
13971 * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
13972 * This affects performance (+25%). I don't see best solution right now.
13973 */
13974 return utils.stream.merge(works);
13975 }
13976 FastGlob.stream = stream;
13977 function generateTasks(source, options) {
13978 assertPatternsInput(source);
13979 const patterns = [].concat(source);
13980 const settings = new settings_1.default(options);
13981 return taskManager.generate(patterns, settings);
13982 }
13983 FastGlob.generateTasks = generateTasks;
13984 function isDynamicPattern(source, options) {
13985 assertPatternsInput(source);
13986 const settings = new settings_1.default(options);
13987 return utils.pattern.isDynamicPattern(source, settings);
13988 }
13989 FastGlob.isDynamicPattern = isDynamicPattern;
13990 function escapePath(source) {
13991 assertPatternsInput(source);
13992 return utils.path.escape(source);
13993 }
13994 FastGlob.escapePath = escapePath;
13995})(FastGlob || (FastGlob = {}));
13996function getWorks(source, _Provider, options) {
13997 const patterns = [].concat(source);
13998 const settings = new settings_1.default(options);
13999 const tasks = taskManager.generate(patterns, settings);
14000 const provider = new _Provider(settings);
14001 return tasks.map(provider.read, provider);
14002}
14003function assertPatternsInput(input) {
14004 const source = [].concat(input);
14005 const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
14006 if (!isValidSource) {
14007 throw new TypeError('Patterns must be a string (non empty) or an array of strings');
14008 }
14009}
14010module.exports = FastGlob;
14011
14012
14013/***/ }),
14014/* 61 */
14015/***/ (function(module, exports, __webpack_require__) {
14016
14017"use strict";
14018
14019Object.defineProperty(exports, "__esModule", { value: true });
14020exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
14021const utils = __webpack_require__(62);
14022function generate(patterns, settings) {
14023 const positivePatterns = getPositivePatterns(patterns);
14024 const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
14025 const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
14026 const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
14027 const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
14028 const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
14029 return staticTasks.concat(dynamicTasks);
14030}
14031exports.generate = generate;
14032function convertPatternsToTasks(positive, negative, dynamic) {
14033 const positivePatternsGroup = groupPatternsByBaseDirectory(positive);
14034 // When we have a global group – there is no reason to divide the patterns into independent tasks.
14035 // In this case, the global task covers the rest.
14036 if ('.' in positivePatternsGroup) {
14037 const task = convertPatternGroupToTask('.', positive, negative, dynamic);
14038 return [task];
14039 }
14040 return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic);
14041}
14042exports.convertPatternsToTasks = convertPatternsToTasks;
14043function getPositivePatterns(patterns) {
14044 return utils.pattern.getPositivePatterns(patterns);
14045}
14046exports.getPositivePatterns = getPositivePatterns;
14047function getNegativePatternsAsPositive(patterns, ignore) {
14048 const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
14049 const positive = negative.map(utils.pattern.convertToPositivePattern);
14050 return positive;
14051}
14052exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
14053function groupPatternsByBaseDirectory(patterns) {
14054 const group = {};
14055 return patterns.reduce((collection, pattern) => {
14056 const base = utils.pattern.getBaseDirectory(pattern);
14057 if (base in collection) {
14058 collection[base].push(pattern);
14059 }
14060 else {
14061 collection[base] = [pattern];
14062 }
14063 return collection;
14064 }, group);
14065}
14066exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
14067function convertPatternGroupsToTasks(positive, negative, dynamic) {
14068 return Object.keys(positive).map((base) => {
14069 return convertPatternGroupToTask(base, positive[base], negative, dynamic);
14070 });
14071}
14072exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
14073function convertPatternGroupToTask(base, positive, negative, dynamic) {
14074 return {
14075 dynamic,
14076 positive,
14077 negative,
14078 base,
14079 patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
14080 };
14081}
14082exports.convertPatternGroupToTask = convertPatternGroupToTask;
14083
14084
14085/***/ }),
14086/* 62 */
14087/***/ (function(module, exports, __webpack_require__) {
14088
14089"use strict";
14090
14091Object.defineProperty(exports, "__esModule", { value: true });
14092exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;
14093const array = __webpack_require__(63);
14094exports.array = array;
14095const errno = __webpack_require__(64);
14096exports.errno = errno;
14097const fs = __webpack_require__(65);
14098exports.fs = fs;
14099const path = __webpack_require__(66);
14100exports.path = path;
14101const pattern = __webpack_require__(67);
14102exports.pattern = pattern;
14103const stream = __webpack_require__(94);
14104exports.stream = stream;
14105const string = __webpack_require__(97);
14106exports.string = string;
14107
14108
14109/***/ }),
14110/* 63 */
14111/***/ (function(module, exports, __webpack_require__) {
14112
14113"use strict";
14114
14115Object.defineProperty(exports, "__esModule", { value: true });
14116exports.splitWhen = exports.flatten = void 0;
14117function flatten(items) {
14118 return items.reduce((collection, item) => [].concat(collection, item), []);
14119}
14120exports.flatten = flatten;
14121function splitWhen(items, predicate) {
14122 const result = [[]];
14123 let groupIndex = 0;
14124 for (const item of items) {
14125 if (predicate(item)) {
14126 groupIndex++;
14127 result[groupIndex] = [];
14128 }
14129 else {
14130 result[groupIndex].push(item);
14131 }
14132 }
14133 return result;
14134}
14135exports.splitWhen = splitWhen;
14136
14137
14138/***/ }),
14139/* 64 */
14140/***/ (function(module, exports, __webpack_require__) {
14141
14142"use strict";
14143
14144Object.defineProperty(exports, "__esModule", { value: true });
14145exports.isEnoentCodeError = void 0;
14146function isEnoentCodeError(error) {
14147 return error.code === 'ENOENT';
14148}
14149exports.isEnoentCodeError = isEnoentCodeError;
14150
14151
14152/***/ }),
14153/* 65 */
14154/***/ (function(module, exports, __webpack_require__) {
14155
14156"use strict";
14157
14158Object.defineProperty(exports, "__esModule", { value: true });
14159exports.createDirentFromStats = void 0;
14160class DirentFromStats {
14161 constructor(name, stats) {
14162 this.name = name;
14163 this.isBlockDevice = stats.isBlockDevice.bind(stats);
14164 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
14165 this.isDirectory = stats.isDirectory.bind(stats);
14166 this.isFIFO = stats.isFIFO.bind(stats);
14167 this.isFile = stats.isFile.bind(stats);
14168 this.isSocket = stats.isSocket.bind(stats);
14169 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
14170 }
14171}
14172function createDirentFromStats(name, stats) {
14173 return new DirentFromStats(name, stats);
14174}
14175exports.createDirentFromStats = createDirentFromStats;
14176
14177
14178/***/ }),
14179/* 66 */
14180/***/ (function(module, exports, __webpack_require__) {
14181
14182"use strict";
14183
14184Object.defineProperty(exports, "__esModule", { value: true });
14185exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0;
14186const path = __webpack_require__(13);
14187const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
14188const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
14189/**
14190 * Designed to work only with simple paths: `dir\\file`.
14191 */
14192function unixify(filepath) {
14193 return filepath.replace(/\\/g, '/');
14194}
14195exports.unixify = unixify;
14196function makeAbsolute(cwd, filepath) {
14197 return path.resolve(cwd, filepath);
14198}
14199exports.makeAbsolute = makeAbsolute;
14200function escape(pattern) {
14201 return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
14202}
14203exports.escape = escape;
14204function removeLeadingDotSegment(entry) {
14205 // We do not use `startsWith` because this is 10x slower than current implementation for some cases.
14206 // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
14207 if (entry.charAt(0) === '.') {
14208 const secondCharactery = entry.charAt(1);
14209 if (secondCharactery === '/' || secondCharactery === '\\') {
14210 return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
14211 }
14212 }
14213 return entry;
14214}
14215exports.removeLeadingDotSegment = removeLeadingDotSegment;
14216
14217
14218/***/ }),
14219/* 67 */
14220/***/ (function(module, exports, __webpack_require__) {
14221
14222"use strict";
14223
14224Object.defineProperty(exports, "__esModule", { value: true });
14225exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
14226const path = __webpack_require__(13);
14227const globParent = __webpack_require__(68);
14228const micromatch = __webpack_require__(71);
14229const picomatch = __webpack_require__(88);
14230const GLOBSTAR = '**';
14231const ESCAPE_SYMBOL = '\\';
14232const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
14233const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/;
14234const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/;
14235const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/;
14236const BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/;
14237function isStaticPattern(pattern, options = {}) {
14238 return !isDynamicPattern(pattern, options);
14239}
14240exports.isStaticPattern = isStaticPattern;
14241function isDynamicPattern(pattern, options = {}) {
14242 /**
14243 * A special case with an empty string is necessary for matching patterns that start with a forward slash.
14244 * An empty string cannot be a dynamic pattern.
14245 * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
14246 */
14247 if (pattern === '') {
14248 return false;
14249 }
14250 /**
14251 * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
14252 * filepath directly (without read directory).
14253 */
14254 if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
14255 return true;
14256 }
14257 if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
14258 return true;
14259 }
14260 if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
14261 return true;
14262 }
14263 if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) {
14264 return true;
14265 }
14266 return false;
14267}
14268exports.isDynamicPattern = isDynamicPattern;
14269function convertToPositivePattern(pattern) {
14270 return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
14271}
14272exports.convertToPositivePattern = convertToPositivePattern;
14273function convertToNegativePattern(pattern) {
14274 return '!' + pattern;
14275}
14276exports.convertToNegativePattern = convertToNegativePattern;
14277function isNegativePattern(pattern) {
14278 return pattern.startsWith('!') && pattern[1] !== '(';
14279}
14280exports.isNegativePattern = isNegativePattern;
14281function isPositivePattern(pattern) {
14282 return !isNegativePattern(pattern);
14283}
14284exports.isPositivePattern = isPositivePattern;
14285function getNegativePatterns(patterns) {
14286 return patterns.filter(isNegativePattern);
14287}
14288exports.getNegativePatterns = getNegativePatterns;
14289function getPositivePatterns(patterns) {
14290 return patterns.filter(isPositivePattern);
14291}
14292exports.getPositivePatterns = getPositivePatterns;
14293function getBaseDirectory(pattern) {
14294 return globParent(pattern, { flipBackslashes: false });
14295}
14296exports.getBaseDirectory = getBaseDirectory;
14297function hasGlobStar(pattern) {
14298 return pattern.includes(GLOBSTAR);
14299}
14300exports.hasGlobStar = hasGlobStar;
14301function endsWithSlashGlobStar(pattern) {
14302 return pattern.endsWith('/' + GLOBSTAR);
14303}
14304exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
14305function isAffectDepthOfReadingPattern(pattern) {
14306 const basename = path.basename(pattern);
14307 return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
14308}
14309exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
14310function expandPatternsWithBraceExpansion(patterns) {
14311 return patterns.reduce((collection, pattern) => {
14312 return collection.concat(expandBraceExpansion(pattern));
14313 }, []);
14314}
14315exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
14316function expandBraceExpansion(pattern) {
14317 return micromatch.braces(pattern, {
14318 expand: true,
14319 nodupes: true
14320 });
14321}
14322exports.expandBraceExpansion = expandBraceExpansion;
14323function getPatternParts(pattern, options) {
14324 let { parts } = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
14325 /**
14326 * The scan method returns an empty array in some cases.
14327 * See micromatch/picomatch#58 for more details.
14328 */
14329 if (parts.length === 0) {
14330 parts = [pattern];
14331 }
14332 /**
14333 * The scan method does not return an empty part for the pattern with a forward slash.
14334 * This is another part of micromatch/picomatch#58.
14335 */
14336 if (parts[0].startsWith('/')) {
14337 parts[0] = parts[0].slice(1);
14338 parts.unshift('');
14339 }
14340 return parts;
14341}
14342exports.getPatternParts = getPatternParts;
14343function makeRe(pattern, options) {
14344 return micromatch.makeRe(pattern, options);
14345}
14346exports.makeRe = makeRe;
14347function convertPatternsToRe(patterns, options) {
14348 return patterns.map((pattern) => makeRe(pattern, options));
14349}
14350exports.convertPatternsToRe = convertPatternsToRe;
14351function matchAny(entry, patternsRe) {
14352 return patternsRe.some((patternRe) => patternRe.test(entry));
14353}
14354exports.matchAny = matchAny;
14355
14356
14357/***/ }),
14358/* 68 */
14359/***/ (function(module, exports, __webpack_require__) {
14360
14361"use strict";
14362
14363
14364var isGlob = __webpack_require__(69);
14365var pathPosixDirname = __webpack_require__(13).posix.dirname;
14366var isWin32 = __webpack_require__(14).platform() === 'win32';
14367
14368var slash = '/';
14369var backslash = /\\/g;
14370var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
14371var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
14372var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
14373
14374/**
14375 * @param {string} str
14376 * @param {Object} opts
14377 * @param {boolean} [opts.flipBackslashes=true]
14378 */
14379module.exports = function globParent(str, opts) {
14380 var options = Object.assign({ flipBackslashes: true }, opts);
14381
14382 // flip windows path separators
14383 if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
14384 str = str.replace(backslash, slash);
14385 }
14386
14387 // special case for strings ending in enclosure containing path separator
14388 if (enclosure.test(str)) {
14389 str += slash;
14390 }
14391
14392 // preserves full path in case of trailing path separator
14393 str += 'a';
14394
14395 // remove path parts that are globby
14396 do {
14397 str = pathPosixDirname(str);
14398 } while (isGlob(str) || globby.test(str));
14399
14400 // remove escape chars and return result
14401 return str.replace(escaped, '$1');
14402};
14403
14404
14405/***/ }),
14406/* 69 */
14407/***/ (function(module, exports, __webpack_require__) {
14408
14409/*!
14410 * is-glob <https://github.com/jonschlinkert/is-glob>
14411 *
14412 * Copyright (c) 2014-2017, Jon Schlinkert.
14413 * Released under the MIT License.
14414 */
14415
14416var isExtglob = __webpack_require__(70);
14417var chars = { '{': '}', '(': ')', '[': ']'};
14418var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
14419var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
14420
14421module.exports = function isGlob(str, options) {
14422 if (typeof str !== 'string' || str === '') {
14423 return false;
14424 }
14425
14426 if (isExtglob(str)) {
14427 return true;
14428 }
14429
14430 var regex = strictRegex;
14431 var match;
14432
14433 // optionally relax regex
14434 if (options && options.strict === false) {
14435 regex = relaxedRegex;
14436 }
14437
14438 while ((match = regex.exec(str))) {
14439 if (match[2]) return true;
14440 var idx = match.index + match[0].length;
14441
14442 // if an open bracket/brace/paren is escaped,
14443 // set the index to the next closing character
14444 var open = match[1];
14445 var close = open ? chars[open] : null;
14446 if (open && close) {
14447 var n = str.indexOf(close, idx);
14448 if (n !== -1) {
14449 idx = n + 1;
14450 }
14451 }
14452
14453 str = str.slice(idx);
14454 }
14455 return false;
14456};
14457
14458
14459/***/ }),
14460/* 70 */
14461/***/ (function(module, exports) {
14462
14463/*!
14464 * is-extglob <https://github.com/jonschlinkert/is-extglob>
14465 *
14466 * Copyright (c) 2014-2016, Jon Schlinkert.
14467 * Licensed under the MIT License.
14468 */
14469
14470module.exports = function isExtglob(str) {
14471 if (typeof str !== 'string' || str === '') {
14472 return false;
14473 }
14474
14475 var match;
14476 while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
14477 if (match[2]) return true;
14478 str = str.slice(match.index + match[0].length);
14479 }
14480
14481 return false;
14482};
14483
14484
14485/***/ }),
14486/* 71 */
14487/***/ (function(module, exports, __webpack_require__) {
14488
14489"use strict";
14490
14491
14492const util = __webpack_require__(48);
14493const braces = __webpack_require__(72);
14494const picomatch = __webpack_require__(82);
14495const utils = __webpack_require__(85);
14496const isEmptyString = val => typeof val === 'string' && (val === '' || val === './');
14497
14498/**
14499 * Returns an array of strings that match one or more glob patterns.
14500 *
14501 * ```js
14502 * const mm = require('micromatch');
14503 * // mm(list, patterns[, options]);
14504 *
14505 * console.log(mm(['a.js', 'a.txt'], ['*.js']));
14506 * //=> [ 'a.js' ]
14507 * ```
14508 * @param {String|Array<string>} list List of strings to match.
14509 * @param {String|Array<string>} patterns One or more glob patterns to use for matching.
14510 * @param {Object} options See available [options](#options)
14511 * @return {Array} Returns an array of matches
14512 * @summary false
14513 * @api public
14514 */
14515
14516const micromatch = (list, patterns, options) => {
14517 patterns = [].concat(patterns);
14518 list = [].concat(list);
14519
14520 let omit = new Set();
14521 let keep = new Set();
14522 let items = new Set();
14523 let negatives = 0;
14524
14525 let onResult = state => {
14526 items.add(state.output);
14527 if (options && options.onResult) {
14528 options.onResult(state);
14529 }
14530 };
14531
14532 for (let i = 0; i < patterns.length; i++) {
14533 let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
14534 let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
14535 if (negated) negatives++;
14536
14537 for (let item of list) {
14538 let matched = isMatch(item, true);
14539
14540 let match = negated ? !matched.isMatch : matched.isMatch;
14541 if (!match) continue;
14542
14543 if (negated) {
14544 omit.add(matched.output);
14545 } else {
14546 omit.delete(matched.output);
14547 keep.add(matched.output);
14548 }
14549 }
14550 }
14551
14552 let result = negatives === patterns.length ? [...items] : [...keep];
14553 let matches = result.filter(item => !omit.has(item));
14554
14555 if (options && matches.length === 0) {
14556 if (options.failglob === true) {
14557 throw new Error(`No matches found for "${patterns.join(', ')}"`);
14558 }
14559
14560 if (options.nonull === true || options.nullglob === true) {
14561 return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns;
14562 }
14563 }
14564
14565 return matches;
14566};
14567
14568/**
14569 * Backwards compatibility
14570 */
14571
14572micromatch.match = micromatch;
14573
14574/**
14575 * Returns a matcher function from the given glob `pattern` and `options`.
14576 * The returned function takes a string to match as its only argument and returns
14577 * true if the string is a match.
14578 *
14579 * ```js
14580 * const mm = require('micromatch');
14581 * // mm.matcher(pattern[, options]);
14582 *
14583 * const isMatch = mm.matcher('*.!(*a)');
14584 * console.log(isMatch('a.a')); //=> false
14585 * console.log(isMatch('a.b')); //=> true
14586 * ```
14587 * @param {String} `pattern` Glob pattern
14588 * @param {Object} `options`
14589 * @return {Function} Returns a matcher function.
14590 * @api public
14591 */
14592
14593micromatch.matcher = (pattern, options) => picomatch(pattern, options);
14594
14595/**
14596 * Returns true if **any** of the given glob `patterns` match the specified `string`.
14597 *
14598 * ```js
14599 * const mm = require('micromatch');
14600 * // mm.isMatch(string, patterns[, options]);
14601 *
14602 * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
14603 * console.log(mm.isMatch('a.a', 'b.*')); //=> false
14604 * ```
14605 * @param {String} str The string to test.
14606 * @param {String|Array} patterns One or more glob patterns to use for matching.
14607 * @param {Object} [options] See available [options](#options).
14608 * @return {Boolean} Returns true if any patterns match `str`
14609 * @api public
14610 */
14611
14612micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
14613
14614/**
14615 * Backwards compatibility
14616 */
14617
14618micromatch.any = micromatch.isMatch;
14619
14620/**
14621 * Returns a list of strings that _**do not match any**_ of the given `patterns`.
14622 *
14623 * ```js
14624 * const mm = require('micromatch');
14625 * // mm.not(list, patterns[, options]);
14626 *
14627 * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
14628 * //=> ['b.b', 'c.c']
14629 * ```
14630 * @param {Array} `list` Array of strings to match.
14631 * @param {String|Array} `patterns` One or more glob pattern to use for matching.
14632 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14633 * @return {Array} Returns an array of strings that **do not match** the given patterns.
14634 * @api public
14635 */
14636
14637micromatch.not = (list, patterns, options = {}) => {
14638 patterns = [].concat(patterns).map(String);
14639 let result = new Set();
14640 let items = [];
14641
14642 let onResult = state => {
14643 if (options.onResult) options.onResult(state);
14644 items.push(state.output);
14645 };
14646
14647 let matches = micromatch(list, patterns, { ...options, onResult });
14648
14649 for (let item of items) {
14650 if (!matches.includes(item)) {
14651 result.add(item);
14652 }
14653 }
14654 return [...result];
14655};
14656
14657/**
14658 * Returns true if the given `string` contains the given pattern. Similar
14659 * to [.isMatch](#isMatch) but the pattern can match any part of the string.
14660 *
14661 * ```js
14662 * var mm = require('micromatch');
14663 * // mm.contains(string, pattern[, options]);
14664 *
14665 * console.log(mm.contains('aa/bb/cc', '*b'));
14666 * //=> true
14667 * console.log(mm.contains('aa/bb/cc', '*d'));
14668 * //=> false
14669 * ```
14670 * @param {String} `str` The string to match.
14671 * @param {String|Array} `patterns` Glob pattern to use for matching.
14672 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14673 * @return {Boolean} Returns true if the patter matches any part of `str`.
14674 * @api public
14675 */
14676
14677micromatch.contains = (str, pattern, options) => {
14678 if (typeof str !== 'string') {
14679 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
14680 }
14681
14682 if (Array.isArray(pattern)) {
14683 return pattern.some(p => micromatch.contains(str, p, options));
14684 }
14685
14686 if (typeof pattern === 'string') {
14687 if (isEmptyString(str) || isEmptyString(pattern)) {
14688 return false;
14689 }
14690
14691 if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {
14692 return true;
14693 }
14694 }
14695
14696 return micromatch.isMatch(str, pattern, { ...options, contains: true });
14697};
14698
14699/**
14700 * Filter the keys of the given object with the given `glob` pattern
14701 * and `options`. Does not attempt to match nested keys. If you need this feature,
14702 * use [glob-object][] instead.
14703 *
14704 * ```js
14705 * const mm = require('micromatch');
14706 * // mm.matchKeys(object, patterns[, options]);
14707 *
14708 * const obj = { aa: 'a', ab: 'b', ac: 'c' };
14709 * console.log(mm.matchKeys(obj, '*b'));
14710 * //=> { ab: 'b' }
14711 * ```
14712 * @param {Object} `object` The object with keys to filter.
14713 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14714 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14715 * @return {Object} Returns an object with only keys that match the given patterns.
14716 * @api public
14717 */
14718
14719micromatch.matchKeys = (obj, patterns, options) => {
14720 if (!utils.isObject(obj)) {
14721 throw new TypeError('Expected the first argument to be an object');
14722 }
14723 let keys = micromatch(Object.keys(obj), patterns, options);
14724 let res = {};
14725 for (let key of keys) res[key] = obj[key];
14726 return res;
14727};
14728
14729/**
14730 * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
14731 *
14732 * ```js
14733 * const mm = require('micromatch');
14734 * // mm.some(list, patterns[, options]);
14735 *
14736 * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
14737 * // true
14738 * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
14739 * // false
14740 * ```
14741 * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
14742 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14743 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14744 * @return {Boolean} Returns true if any patterns match `str`
14745 * @api public
14746 */
14747
14748micromatch.some = (list, patterns, options) => {
14749 let items = [].concat(list);
14750
14751 for (let pattern of [].concat(patterns)) {
14752 let isMatch = picomatch(String(pattern), options);
14753 if (items.some(item => isMatch(item))) {
14754 return true;
14755 }
14756 }
14757 return false;
14758};
14759
14760/**
14761 * Returns true if every string in the given `list` matches
14762 * any of the given glob `patterns`.
14763 *
14764 * ```js
14765 * const mm = require('micromatch');
14766 * // mm.every(list, patterns[, options]);
14767 *
14768 * console.log(mm.every('foo.js', ['foo.js']));
14769 * // true
14770 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
14771 * // true
14772 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
14773 * // false
14774 * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
14775 * // false
14776 * ```
14777 * @param {String|Array} `list` The string or array of strings to test.
14778 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14779 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14780 * @return {Boolean} Returns true if any patterns match `str`
14781 * @api public
14782 */
14783
14784micromatch.every = (list, patterns, options) => {
14785 let items = [].concat(list);
14786
14787 for (let pattern of [].concat(patterns)) {
14788 let isMatch = picomatch(String(pattern), options);
14789 if (!items.every(item => isMatch(item))) {
14790 return false;
14791 }
14792 }
14793 return true;
14794};
14795
14796/**
14797 * Returns true if **all** of the given `patterns` match
14798 * the specified string.
14799 *
14800 * ```js
14801 * const mm = require('micromatch');
14802 * // mm.all(string, patterns[, options]);
14803 *
14804 * console.log(mm.all('foo.js', ['foo.js']));
14805 * // true
14806 *
14807 * console.log(mm.all('foo.js', ['*.js', '!foo.js']));
14808 * // false
14809 *
14810 * console.log(mm.all('foo.js', ['*.js', 'foo.js']));
14811 * // true
14812 *
14813 * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
14814 * // true
14815 * ```
14816 * @param {String|Array} `str` The string to test.
14817 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14818 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14819 * @return {Boolean} Returns true if any patterns match `str`
14820 * @api public
14821 */
14822
14823micromatch.all = (str, patterns, options) => {
14824 if (typeof str !== 'string') {
14825 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
14826 }
14827
14828 return [].concat(patterns).every(p => picomatch(p, options)(str));
14829};
14830
14831/**
14832 * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
14833 *
14834 * ```js
14835 * const mm = require('micromatch');
14836 * // mm.capture(pattern, string[, options]);
14837 *
14838 * console.log(mm.capture('test/*.js', 'test/foo.js'));
14839 * //=> ['foo']
14840 * console.log(mm.capture('test/*.js', 'foo/bar.css'));
14841 * //=> null
14842 * ```
14843 * @param {String} `glob` Glob pattern to use for matching.
14844 * @param {String} `input` String to match
14845 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14846 * @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
14847 * @api public
14848 */
14849
14850micromatch.capture = (glob, input, options) => {
14851 let posix = utils.isWindows(options);
14852 let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
14853 let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
14854
14855 if (match) {
14856 return match.slice(1).map(v => v === void 0 ? '' : v);
14857 }
14858};
14859
14860/**
14861 * Create a regular expression from the given glob `pattern`.
14862 *
14863 * ```js
14864 * const mm = require('micromatch');
14865 * // mm.makeRe(pattern[, options]);
14866 *
14867 * console.log(mm.makeRe('*.js'));
14868 * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
14869 * ```
14870 * @param {String} `pattern` A glob pattern to convert to regex.
14871 * @param {Object} `options`
14872 * @return {RegExp} Returns a regex created from the given pattern.
14873 * @api public
14874 */
14875
14876micromatch.makeRe = (...args) => picomatch.makeRe(...args);
14877
14878/**
14879 * Scan a glob pattern to separate the pattern into segments. Used
14880 * by the [split](#split) method.
14881 *
14882 * ```js
14883 * const mm = require('micromatch');
14884 * const state = mm.scan(pattern[, options]);
14885 * ```
14886 * @param {String} `pattern`
14887 * @param {Object} `options`
14888 * @return {Object} Returns an object with
14889 * @api public
14890 */
14891
14892micromatch.scan = (...args) => picomatch.scan(...args);
14893
14894/**
14895 * Parse a glob pattern to create the source string for a regular
14896 * expression.
14897 *
14898 * ```js
14899 * const mm = require('micromatch');
14900 * const state = mm(pattern[, options]);
14901 * ```
14902 * @param {String} `glob`
14903 * @param {Object} `options`
14904 * @return {Object} Returns an object with useful properties and output to be used as regex source string.
14905 * @api public
14906 */
14907
14908micromatch.parse = (patterns, options) => {
14909 let res = [];
14910 for (let pattern of [].concat(patterns || [])) {
14911 for (let str of braces(String(pattern), options)) {
14912 res.push(picomatch.parse(str, options));
14913 }
14914 }
14915 return res;
14916};
14917
14918/**
14919 * Process the given brace `pattern`.
14920 *
14921 * ```js
14922 * const { braces } = require('micromatch');
14923 * console.log(braces('foo/{a,b,c}/bar'));
14924 * //=> [ 'foo/(a|b|c)/bar' ]
14925 *
14926 * console.log(braces('foo/{a,b,c}/bar', { expand: true }));
14927 * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
14928 * ```
14929 * @param {String} `pattern` String with brace pattern to process.
14930 * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
14931 * @return {Array}
14932 * @api public
14933 */
14934
14935micromatch.braces = (pattern, options) => {
14936 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
14937 if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
14938 return [pattern];
14939 }
14940 return braces(pattern, options);
14941};
14942
14943/**
14944 * Expand braces
14945 */
14946
14947micromatch.braceExpand = (pattern, options) => {
14948 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
14949 return micromatch.braces(pattern, { ...options, expand: true });
14950};
14951
14952/**
14953 * Expose micromatch
14954 */
14955
14956module.exports = micromatch;
14957
14958
14959/***/ }),
14960/* 72 */
14961/***/ (function(module, exports, __webpack_require__) {
14962
14963"use strict";
14964
14965
14966const stringify = __webpack_require__(73);
14967const compile = __webpack_require__(75);
14968const expand = __webpack_require__(79);
14969const parse = __webpack_require__(80);
14970
14971/**
14972 * Expand the given pattern or create a regex-compatible string.
14973 *
14974 * ```js
14975 * const braces = require('braces');
14976 * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
14977 * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
14978 * ```
14979 * @param {String} `str`
14980 * @param {Object} `options`
14981 * @return {String}
14982 * @api public
14983 */
14984
14985const braces = (input, options = {}) => {
14986 let output = [];
14987
14988 if (Array.isArray(input)) {
14989 for (let pattern of input) {
14990 let result = braces.create(pattern, options);
14991 if (Array.isArray(result)) {
14992 output.push(...result);
14993 } else {
14994 output.push(result);
14995 }
14996 }
14997 } else {
14998 output = [].concat(braces.create(input, options));
14999 }
15000
15001 if (options && options.expand === true && options.nodupes === true) {
15002 output = [...new Set(output)];
15003 }
15004 return output;
15005};
15006
15007/**
15008 * Parse the given `str` with the given `options`.
15009 *
15010 * ```js
15011 * // braces.parse(pattern, [, options]);
15012 * const ast = braces.parse('a/{b,c}/d');
15013 * console.log(ast);
15014 * ```
15015 * @param {String} pattern Brace pattern to parse
15016 * @param {Object} options
15017 * @return {Object} Returns an AST
15018 * @api public
15019 */
15020
15021braces.parse = (input, options = {}) => parse(input, options);
15022
15023/**
15024 * Creates a braces string from an AST, or an AST node.
15025 *
15026 * ```js
15027 * const braces = require('braces');
15028 * let ast = braces.parse('foo/{a,b}/bar');
15029 * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
15030 * ```
15031 * @param {String} `input` Brace pattern or AST.
15032 * @param {Object} `options`
15033 * @return {Array} Returns an array of expanded values.
15034 * @api public
15035 */
15036
15037braces.stringify = (input, options = {}) => {
15038 if (typeof input === 'string') {
15039 return stringify(braces.parse(input, options), options);
15040 }
15041 return stringify(input, options);
15042};
15043
15044/**
15045 * Compiles a brace pattern into a regex-compatible, optimized string.
15046 * This method is called by the main [braces](#braces) function by default.
15047 *
15048 * ```js
15049 * const braces = require('braces');
15050 * console.log(braces.compile('a/{b,c}/d'));
15051 * //=> ['a/(b|c)/d']
15052 * ```
15053 * @param {String} `input` Brace pattern or AST.
15054 * @param {Object} `options`
15055 * @return {Array} Returns an array of expanded values.
15056 * @api public
15057 */
15058
15059braces.compile = (input, options = {}) => {
15060 if (typeof input === 'string') {
15061 input = braces.parse(input, options);
15062 }
15063 return compile(input, options);
15064};
15065
15066/**
15067 * Expands a brace pattern into an array. This method is called by the
15068 * main [braces](#braces) function when `options.expand` is true. Before
15069 * using this method it's recommended that you read the [performance notes](#performance))
15070 * and advantages of using [.compile](#compile) instead.
15071 *
15072 * ```js
15073 * const braces = require('braces');
15074 * console.log(braces.expand('a/{b,c}/d'));
15075 * //=> ['a/b/d', 'a/c/d'];
15076 * ```
15077 * @param {String} `pattern` Brace pattern
15078 * @param {Object} `options`
15079 * @return {Array} Returns an array of expanded values.
15080 * @api public
15081 */
15082
15083braces.expand = (input, options = {}) => {
15084 if (typeof input === 'string') {
15085 input = braces.parse(input, options);
15086 }
15087
15088 let result = expand(input, options);
15089
15090 // filter out empty strings if specified
15091 if (options.noempty === true) {
15092 result = result.filter(Boolean);
15093 }
15094
15095 // filter out duplicates if specified
15096 if (options.nodupes === true) {
15097 result = [...new Set(result)];
15098 }
15099
15100 return result;
15101};
15102
15103/**
15104 * Processes a brace pattern and returns either an expanded array
15105 * (if `options.expand` is true), a highly optimized regex-compatible string.
15106 * This method is called by the main [braces](#braces) function.
15107 *
15108 * ```js
15109 * const braces = require('braces');
15110 * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
15111 * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
15112 * ```
15113 * @param {String} `pattern` Brace pattern
15114 * @param {Object} `options`
15115 * @return {Array} Returns an array of expanded values.
15116 * @api public
15117 */
15118
15119braces.create = (input, options = {}) => {
15120 if (input === '' || input.length < 3) {
15121 return [input];
15122 }
15123
15124 return options.expand !== true
15125 ? braces.compile(input, options)
15126 : braces.expand(input, options);
15127};
15128
15129/**
15130 * Expose "braces"
15131 */
15132
15133module.exports = braces;
15134
15135
15136/***/ }),
15137/* 73 */
15138/***/ (function(module, exports, __webpack_require__) {
15139
15140"use strict";
15141
15142
15143const utils = __webpack_require__(74);
15144
15145module.exports = (ast, options = {}) => {
15146 let stringify = (node, parent = {}) => {
15147 let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
15148 let invalidNode = node.invalid === true && options.escapeInvalid === true;
15149 let output = '';
15150
15151 if (node.value) {
15152 if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
15153 return '\\' + node.value;
15154 }
15155 return node.value;
15156 }
15157
15158 if (node.value) {
15159 return node.value;
15160 }
15161
15162 if (node.nodes) {
15163 for (let child of node.nodes) {
15164 output += stringify(child);
15165 }
15166 }
15167 return output;
15168 };
15169
15170 return stringify(ast);
15171};
15172
15173
15174
15175/***/ }),
15176/* 74 */
15177/***/ (function(module, exports, __webpack_require__) {
15178
15179"use strict";
15180
15181
15182exports.isInteger = num => {
15183 if (typeof num === 'number') {
15184 return Number.isInteger(num);
15185 }
15186 if (typeof num === 'string' && num.trim() !== '') {
15187 return Number.isInteger(Number(num));
15188 }
15189 return false;
15190};
15191
15192/**
15193 * Find a node of the given type
15194 */
15195
15196exports.find = (node, type) => node.nodes.find(node => node.type === type);
15197
15198/**
15199 * Find a node of the given type
15200 */
15201
15202exports.exceedsLimit = (min, max, step = 1, limit) => {
15203 if (limit === false) return false;
15204 if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
15205 return ((Number(max) - Number(min)) / Number(step)) >= limit;
15206};
15207
15208/**
15209 * Escape the given node with '\\' before node.value
15210 */
15211
15212exports.escapeNode = (block, n = 0, type) => {
15213 let node = block.nodes[n];
15214 if (!node) return;
15215
15216 if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
15217 if (node.escaped !== true) {
15218 node.value = '\\' + node.value;
15219 node.escaped = true;
15220 }
15221 }
15222};
15223
15224/**
15225 * Returns true if the given brace node should be enclosed in literal braces
15226 */
15227
15228exports.encloseBrace = node => {
15229 if (node.type !== 'brace') return false;
15230 if ((node.commas >> 0 + node.ranges >> 0) === 0) {
15231 node.invalid = true;
15232 return true;
15233 }
15234 return false;
15235};
15236
15237/**
15238 * Returns true if a brace node is invalid.
15239 */
15240
15241exports.isInvalidBrace = block => {
15242 if (block.type !== 'brace') return false;
15243 if (block.invalid === true || block.dollar) return true;
15244 if ((block.commas >> 0 + block.ranges >> 0) === 0) {
15245 block.invalid = true;
15246 return true;
15247 }
15248 if (block.open !== true || block.close !== true) {
15249 block.invalid = true;
15250 return true;
15251 }
15252 return false;
15253};
15254
15255/**
15256 * Returns true if a node is an open or close node
15257 */
15258
15259exports.isOpenOrClose = node => {
15260 if (node.type === 'open' || node.type === 'close') {
15261 return true;
15262 }
15263 return node.open === true || node.close === true;
15264};
15265
15266/**
15267 * Reduce an array of text nodes.
15268 */
15269
15270exports.reduce = nodes => nodes.reduce((acc, node) => {
15271 if (node.type === 'text') acc.push(node.value);
15272 if (node.type === 'range') node.type = 'text';
15273 return acc;
15274}, []);
15275
15276/**
15277 * Flatten an array
15278 */
15279
15280exports.flatten = (...args) => {
15281 const result = [];
15282 const flat = arr => {
15283 for (let i = 0; i < arr.length; i++) {
15284 let ele = arr[i];
15285 Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
15286 }
15287 return result;
15288 };
15289 flat(args);
15290 return result;
15291};
15292
15293
15294/***/ }),
15295/* 75 */
15296/***/ (function(module, exports, __webpack_require__) {
15297
15298"use strict";
15299
15300
15301const fill = __webpack_require__(76);
15302const utils = __webpack_require__(74);
15303
15304const compile = (ast, options = {}) => {
15305 let walk = (node, parent = {}) => {
15306 let invalidBlock = utils.isInvalidBrace(parent);
15307 let invalidNode = node.invalid === true && options.escapeInvalid === true;
15308 let invalid = invalidBlock === true || invalidNode === true;
15309 let prefix = options.escapeInvalid === true ? '\\' : '';
15310 let output = '';
15311
15312 if (node.isOpen === true) {
15313 return prefix + node.value;
15314 }
15315 if (node.isClose === true) {
15316 return prefix + node.value;
15317 }
15318
15319 if (node.type === 'open') {
15320 return invalid ? (prefix + node.value) : '(';
15321 }
15322
15323 if (node.type === 'close') {
15324 return invalid ? (prefix + node.value) : ')';
15325 }
15326
15327 if (node.type === 'comma') {
15328 return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
15329 }
15330
15331 if (node.value) {
15332 return node.value;
15333 }
15334
15335 if (node.nodes && node.ranges > 0) {
15336 let args = utils.reduce(node.nodes);
15337 let range = fill(...args, { ...options, wrap: false, toRegex: true });
15338
15339 if (range.length !== 0) {
15340 return args.length > 1 && range.length > 1 ? `(${range})` : range;
15341 }
15342 }
15343
15344 if (node.nodes) {
15345 for (let child of node.nodes) {
15346 output += walk(child, node);
15347 }
15348 }
15349 return output;
15350 };
15351
15352 return walk(ast);
15353};
15354
15355module.exports = compile;
15356
15357
15358/***/ }),
15359/* 76 */
15360/***/ (function(module, exports, __webpack_require__) {
15361
15362"use strict";
15363/*!
15364 * fill-range <https://github.com/jonschlinkert/fill-range>
15365 *
15366 * Copyright (c) 2014-present, Jon Schlinkert.
15367 * Licensed under the MIT License.
15368 */
15369
15370
15371
15372const util = __webpack_require__(48);
15373const toRegexRange = __webpack_require__(77);
15374
15375const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
15376
15377const transform = toNumber => {
15378 return value => toNumber === true ? Number(value) : String(value);
15379};
15380
15381const isValidValue = value => {
15382 return typeof value === 'number' || (typeof value === 'string' && value !== '');
15383};
15384
15385const isNumber = num => Number.isInteger(+num);
15386
15387const zeros = input => {
15388 let value = `${input}`;
15389 let index = -1;
15390 if (value[0] === '-') value = value.slice(1);
15391 if (value === '0') return false;
15392 while (value[++index] === '0');
15393 return index > 0;
15394};
15395
15396const stringify = (start, end, options) => {
15397 if (typeof start === 'string' || typeof end === 'string') {
15398 return true;
15399 }
15400 return options.stringify === true;
15401};
15402
15403const pad = (input, maxLength, toNumber) => {
15404 if (maxLength > 0) {
15405 let dash = input[0] === '-' ? '-' : '';
15406 if (dash) input = input.slice(1);
15407 input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
15408 }
15409 if (toNumber === false) {
15410 return String(input);
15411 }
15412 return input;
15413};
15414
15415const toMaxLen = (input, maxLength) => {
15416 let negative = input[0] === '-' ? '-' : '';
15417 if (negative) {
15418 input = input.slice(1);
15419 maxLength--;
15420 }
15421 while (input.length < maxLength) input = '0' + input;
15422 return negative ? ('-' + input) : input;
15423};
15424
15425const toSequence = (parts, options) => {
15426 parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
15427 parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
15428
15429 let prefix = options.capture ? '' : '?:';
15430 let positives = '';
15431 let negatives = '';
15432 let result;
15433
15434 if (parts.positives.length) {
15435 positives = parts.positives.join('|');
15436 }
15437
15438 if (parts.negatives.length) {
15439 negatives = `-(${prefix}${parts.negatives.join('|')})`;
15440 }
15441
15442 if (positives && negatives) {
15443 result = `${positives}|${negatives}`;
15444 } else {
15445 result = positives || negatives;
15446 }
15447
15448 if (options.wrap) {
15449 return `(${prefix}${result})`;
15450 }
15451
15452 return result;
15453};
15454
15455const toRange = (a, b, isNumbers, options) => {
15456 if (isNumbers) {
15457 return toRegexRange(a, b, { wrap: false, ...options });
15458 }
15459
15460 let start = String.fromCharCode(a);
15461 if (a === b) return start;
15462
15463 let stop = String.fromCharCode(b);
15464 return `[${start}-${stop}]`;
15465};
15466
15467const toRegex = (start, end, options) => {
15468 if (Array.isArray(start)) {
15469 let wrap = options.wrap === true;
15470 let prefix = options.capture ? '' : '?:';
15471 return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
15472 }
15473 return toRegexRange(start, end, options);
15474};
15475
15476const rangeError = (...args) => {
15477 return new RangeError('Invalid range arguments: ' + util.inspect(...args));
15478};
15479
15480const invalidRange = (start, end, options) => {
15481 if (options.strictRanges === true) throw rangeError([start, end]);
15482 return [];
15483};
15484
15485const invalidStep = (step, options) => {
15486 if (options.strictRanges === true) {
15487 throw new TypeError(`Expected step "${step}" to be a number`);
15488 }
15489 return [];
15490};
15491
15492const fillNumbers = (start, end, step = 1, options = {}) => {
15493 let a = Number(start);
15494 let b = Number(end);
15495
15496 if (!Number.isInteger(a) || !Number.isInteger(b)) {
15497 if (options.strictRanges === true) throw rangeError([start, end]);
15498 return [];
15499 }
15500
15501 // fix negative zero
15502 if (a === 0) a = 0;
15503 if (b === 0) b = 0;
15504
15505 let descending = a > b;
15506 let startString = String(start);
15507 let endString = String(end);
15508 let stepString = String(step);
15509 step = Math.max(Math.abs(step), 1);
15510
15511 let padded = zeros(startString) || zeros(endString) || zeros(stepString);
15512 let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
15513 let toNumber = padded === false && stringify(start, end, options) === false;
15514 let format = options.transform || transform(toNumber);
15515
15516 if (options.toRegex && step === 1) {
15517 return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
15518 }
15519
15520 let parts = { negatives: [], positives: [] };
15521 let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
15522 let range = [];
15523 let index = 0;
15524
15525 while (descending ? a >= b : a <= b) {
15526 if (options.toRegex === true && step > 1) {
15527 push(a);
15528 } else {
15529 range.push(pad(format(a, index), maxLen, toNumber));
15530 }
15531 a = descending ? a - step : a + step;
15532 index++;
15533 }
15534
15535 if (options.toRegex === true) {
15536 return step > 1
15537 ? toSequence(parts, options)
15538 : toRegex(range, null, { wrap: false, ...options });
15539 }
15540
15541 return range;
15542};
15543
15544const fillLetters = (start, end, step = 1, options = {}) => {
15545 if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
15546 return invalidRange(start, end, options);
15547 }
15548
15549
15550 let format = options.transform || (val => String.fromCharCode(val));
15551 let a = `${start}`.charCodeAt(0);
15552 let b = `${end}`.charCodeAt(0);
15553
15554 let descending = a > b;
15555 let min = Math.min(a, b);
15556 let max = Math.max(a, b);
15557
15558 if (options.toRegex && step === 1) {
15559 return toRange(min, max, false, options);
15560 }
15561
15562 let range = [];
15563 let index = 0;
15564
15565 while (descending ? a >= b : a <= b) {
15566 range.push(format(a, index));
15567 a = descending ? a - step : a + step;
15568 index++;
15569 }
15570
15571 if (options.toRegex === true) {
15572 return toRegex(range, null, { wrap: false, options });
15573 }
15574
15575 return range;
15576};
15577
15578const fill = (start, end, step, options = {}) => {
15579 if (end == null && isValidValue(start)) {
15580 return [start];
15581 }
15582
15583 if (!isValidValue(start) || !isValidValue(end)) {
15584 return invalidRange(start, end, options);
15585 }
15586
15587 if (typeof step === 'function') {
15588 return fill(start, end, 1, { transform: step });
15589 }
15590
15591 if (isObject(step)) {
15592 return fill(start, end, 0, step);
15593 }
15594
15595 let opts = { ...options };
15596 if (opts.capture === true) opts.wrap = true;
15597 step = step || opts.step || 1;
15598
15599 if (!isNumber(step)) {
15600 if (step != null && !isObject(step)) return invalidStep(step, opts);
15601 return fill(start, end, 1, step);
15602 }
15603
15604 if (isNumber(start) && isNumber(end)) {
15605 return fillNumbers(start, end, step, opts);
15606 }
15607
15608 return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
15609};
15610
15611module.exports = fill;
15612
15613
15614/***/ }),
15615/* 77 */
15616/***/ (function(module, exports, __webpack_require__) {
15617
15618"use strict";
15619/*!
15620 * to-regex-range <https://github.com/micromatch/to-regex-range>
15621 *
15622 * Copyright (c) 2015-present, Jon Schlinkert.
15623 * Released under the MIT License.
15624 */
15625
15626
15627
15628const isNumber = __webpack_require__(78);
15629
15630const toRegexRange = (min, max, options) => {
15631 if (isNumber(min) === false) {
15632 throw new TypeError('toRegexRange: expected the first argument to be a number');
15633 }
15634
15635 if (max === void 0 || min === max) {
15636 return String(min);
15637 }
15638
15639 if (isNumber(max) === false) {
15640 throw new TypeError('toRegexRange: expected the second argument to be a number.');
15641 }
15642
15643 let opts = { relaxZeros: true, ...options };
15644 if (typeof opts.strictZeros === 'boolean') {
15645 opts.relaxZeros = opts.strictZeros === false;
15646 }
15647
15648 let relax = String(opts.relaxZeros);
15649 let shorthand = String(opts.shorthand);
15650 let capture = String(opts.capture);
15651 let wrap = String(opts.wrap);
15652 let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
15653
15654 if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
15655 return toRegexRange.cache[cacheKey].result;
15656 }
15657
15658 let a = Math.min(min, max);
15659 let b = Math.max(min, max);
15660
15661 if (Math.abs(a - b) === 1) {
15662 let result = min + '|' + max;
15663 if (opts.capture) {
15664 return `(${result})`;
15665 }
15666 if (opts.wrap === false) {
15667 return result;
15668 }
15669 return `(?:${result})`;
15670 }
15671
15672 let isPadded = hasPadding(min) || hasPadding(max);
15673 let state = { min, max, a, b };
15674 let positives = [];
15675 let negatives = [];
15676
15677 if (isPadded) {
15678 state.isPadded = isPadded;
15679 state.maxLen = String(state.max).length;
15680 }
15681
15682 if (a < 0) {
15683 let newMin = b < 0 ? Math.abs(b) : 1;
15684 negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
15685 a = state.a = 0;
15686 }
15687
15688 if (b >= 0) {
15689 positives = splitToPatterns(a, b, state, opts);
15690 }
15691
15692 state.negatives = negatives;
15693 state.positives = positives;
15694 state.result = collatePatterns(negatives, positives, opts);
15695
15696 if (opts.capture === true) {
15697 state.result = `(${state.result})`;
15698 } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
15699 state.result = `(?:${state.result})`;
15700 }
15701
15702 toRegexRange.cache[cacheKey] = state;
15703 return state.result;
15704};
15705
15706function collatePatterns(neg, pos, options) {
15707 let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
15708 let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
15709 let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
15710 let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
15711 return subpatterns.join('|');
15712}
15713
15714function splitToRanges(min, max) {
15715 let nines = 1;
15716 let zeros = 1;
15717
15718 let stop = countNines(min, nines);
15719 let stops = new Set([max]);
15720
15721 while (min <= stop && stop <= max) {
15722 stops.add(stop);
15723 nines += 1;
15724 stop = countNines(min, nines);
15725 }
15726
15727 stop = countZeros(max + 1, zeros) - 1;
15728
15729 while (min < stop && stop <= max) {
15730 stops.add(stop);
15731 zeros += 1;
15732 stop = countZeros(max + 1, zeros) - 1;
15733 }
15734
15735 stops = [...stops];
15736 stops.sort(compare);
15737 return stops;
15738}
15739
15740/**
15741 * Convert a range to a regex pattern
15742 * @param {Number} `start`
15743 * @param {Number} `stop`
15744 * @return {String}
15745 */
15746
15747function rangeToPattern(start, stop, options) {
15748 if (start === stop) {
15749 return { pattern: start, count: [], digits: 0 };
15750 }
15751
15752 let zipped = zip(start, stop);
15753 let digits = zipped.length;
15754 let pattern = '';
15755 let count = 0;
15756
15757 for (let i = 0; i < digits; i++) {
15758 let [startDigit, stopDigit] = zipped[i];
15759
15760 if (startDigit === stopDigit) {
15761 pattern += startDigit;
15762
15763 } else if (startDigit !== '0' || stopDigit !== '9') {
15764 pattern += toCharacterClass(startDigit, stopDigit, options);
15765
15766 } else {
15767 count++;
15768 }
15769 }
15770
15771 if (count) {
15772 pattern += options.shorthand === true ? '\\d' : '[0-9]';
15773 }
15774
15775 return { pattern, count: [count], digits };
15776}
15777
15778function splitToPatterns(min, max, tok, options) {
15779 let ranges = splitToRanges(min, max);
15780 let tokens = [];
15781 let start = min;
15782 let prev;
15783
15784 for (let i = 0; i < ranges.length; i++) {
15785 let max = ranges[i];
15786 let obj = rangeToPattern(String(start), String(max), options);
15787 let zeros = '';
15788
15789 if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
15790 if (prev.count.length > 1) {
15791 prev.count.pop();
15792 }
15793
15794 prev.count.push(obj.count[0]);
15795 prev.string = prev.pattern + toQuantifier(prev.count);
15796 start = max + 1;
15797 continue;
15798 }
15799
15800 if (tok.isPadded) {
15801 zeros = padZeros(max, tok, options);
15802 }
15803
15804 obj.string = zeros + obj.pattern + toQuantifier(obj.count);
15805 tokens.push(obj);
15806 start = max + 1;
15807 prev = obj;
15808 }
15809
15810 return tokens;
15811}
15812
15813function filterPatterns(arr, comparison, prefix, intersection, options) {
15814 let result = [];
15815
15816 for (let ele of arr) {
15817 let { string } = ele;
15818
15819 // only push if _both_ are negative...
15820 if (!intersection && !contains(comparison, 'string', string)) {
15821 result.push(prefix + string);
15822 }
15823
15824 // or _both_ are positive
15825 if (intersection && contains(comparison, 'string', string)) {
15826 result.push(prefix + string);
15827 }
15828 }
15829 return result;
15830}
15831
15832/**
15833 * Zip strings
15834 */
15835
15836function zip(a, b) {
15837 let arr = [];
15838 for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
15839 return arr;
15840}
15841
15842function compare(a, b) {
15843 return a > b ? 1 : b > a ? -1 : 0;
15844}
15845
15846function contains(arr, key, val) {
15847 return arr.some(ele => ele[key] === val);
15848}
15849
15850function countNines(min, len) {
15851 return Number(String(min).slice(0, -len) + '9'.repeat(len));
15852}
15853
15854function countZeros(integer, zeros) {
15855 return integer - (integer % Math.pow(10, zeros));
15856}
15857
15858function toQuantifier(digits) {
15859 let [start = 0, stop = ''] = digits;
15860 if (stop || start > 1) {
15861 return `{${start + (stop ? ',' + stop : '')}}`;
15862 }
15863 return '';
15864}
15865
15866function toCharacterClass(a, b, options) {
15867 return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
15868}
15869
15870function hasPadding(str) {
15871 return /^-?(0+)\d/.test(str);
15872}
15873
15874function padZeros(value, tok, options) {
15875 if (!tok.isPadded) {
15876 return value;
15877 }
15878
15879 let diff = Math.abs(tok.maxLen - String(value).length);
15880 let relax = options.relaxZeros !== false;
15881
15882 switch (diff) {
15883 case 0:
15884 return '';
15885 case 1:
15886 return relax ? '0?' : '0';
15887 case 2:
15888 return relax ? '0{0,2}' : '00';
15889 default: {
15890 return relax ? `0{0,${diff}}` : `0{${diff}}`;
15891 }
15892 }
15893}
15894
15895/**
15896 * Cache
15897 */
15898
15899toRegexRange.cache = {};
15900toRegexRange.clearCache = () => (toRegexRange.cache = {});
15901
15902/**
15903 * Expose `toRegexRange`
15904 */
15905
15906module.exports = toRegexRange;
15907
15908
15909/***/ }),
15910/* 78 */
15911/***/ (function(module, exports, __webpack_require__) {
15912
15913"use strict";
15914/*!
15915 * is-number <https://github.com/jonschlinkert/is-number>
15916 *
15917 * Copyright (c) 2014-present, Jon Schlinkert.
15918 * Released under the MIT License.
15919 */
15920
15921
15922
15923module.exports = function(num) {
15924 if (typeof num === 'number') {
15925 return num - num === 0;
15926 }
15927 if (typeof num === 'string' && num.trim() !== '') {
15928 return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
15929 }
15930 return false;
15931};
15932
15933
15934/***/ }),
15935/* 79 */
15936/***/ (function(module, exports, __webpack_require__) {
15937
15938"use strict";
15939
15940
15941const fill = __webpack_require__(76);
15942const stringify = __webpack_require__(73);
15943const utils = __webpack_require__(74);
15944
15945const append = (queue = '', stash = '', enclose = false) => {
15946 let result = [];
15947
15948 queue = [].concat(queue);
15949 stash = [].concat(stash);
15950
15951 if (!stash.length) return queue;
15952 if (!queue.length) {
15953 return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
15954 }
15955
15956 for (let item of queue) {
15957 if (Array.isArray(item)) {
15958 for (let value of item) {
15959 result.push(append(value, stash, enclose));
15960 }
15961 } else {
15962 for (let ele of stash) {
15963 if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
15964 result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));
15965 }
15966 }
15967 }
15968 return utils.flatten(result);
15969};
15970
15971const expand = (ast, options = {}) => {
15972 let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
15973
15974 let walk = (node, parent = {}) => {
15975 node.queue = [];
15976
15977 let p = parent;
15978 let q = parent.queue;
15979
15980 while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
15981 p = p.parent;
15982 q = p.queue;
15983 }
15984
15985 if (node.invalid || node.dollar) {
15986 q.push(append(q.pop(), stringify(node, options)));
15987 return;
15988 }
15989
15990 if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
15991 q.push(append(q.pop(), ['{}']));
15992 return;
15993 }
15994
15995 if (node.nodes && node.ranges > 0) {
15996 let args = utils.reduce(node.nodes);
15997
15998 if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
15999 throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
16000 }
16001
16002 let range = fill(...args, options);
16003 if (range.length === 0) {
16004 range = stringify(node, options);
16005 }
16006
16007 q.push(append(q.pop(), range));
16008 node.nodes = [];
16009 return;
16010 }
16011
16012 let enclose = utils.encloseBrace(node);
16013 let queue = node.queue;
16014 let block = node;
16015
16016 while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
16017 block = block.parent;
16018 queue = block.queue;
16019 }
16020
16021 for (let i = 0; i < node.nodes.length; i++) {
16022 let child = node.nodes[i];
16023
16024 if (child.type === 'comma' && node.type === 'brace') {
16025 if (i === 1) queue.push('');
16026 queue.push('');
16027 continue;
16028 }
16029
16030 if (child.type === 'close') {
16031 q.push(append(q.pop(), queue, enclose));
16032 continue;
16033 }
16034
16035 if (child.value && child.type !== 'open') {
16036 queue.push(append(queue.pop(), child.value));
16037 continue;
16038 }
16039
16040 if (child.nodes) {
16041 walk(child, node);
16042 }
16043 }
16044
16045 return queue;
16046 };
16047
16048 return utils.flatten(walk(ast));
16049};
16050
16051module.exports = expand;
16052
16053
16054/***/ }),
16055/* 80 */
16056/***/ (function(module, exports, __webpack_require__) {
16057
16058"use strict";
16059
16060
16061const stringify = __webpack_require__(73);
16062
16063/**
16064 * Constants
16065 */
16066
16067const {
16068 MAX_LENGTH,
16069 CHAR_BACKSLASH, /* \ */
16070 CHAR_BACKTICK, /* ` */
16071 CHAR_COMMA, /* , */
16072 CHAR_DOT, /* . */
16073 CHAR_LEFT_PARENTHESES, /* ( */
16074 CHAR_RIGHT_PARENTHESES, /* ) */
16075 CHAR_LEFT_CURLY_BRACE, /* { */
16076 CHAR_RIGHT_CURLY_BRACE, /* } */
16077 CHAR_LEFT_SQUARE_BRACKET, /* [ */
16078 CHAR_RIGHT_SQUARE_BRACKET, /* ] */
16079 CHAR_DOUBLE_QUOTE, /* " */
16080 CHAR_SINGLE_QUOTE, /* ' */
16081 CHAR_NO_BREAK_SPACE,
16082 CHAR_ZERO_WIDTH_NOBREAK_SPACE
16083} = __webpack_require__(81);
16084
16085/**
16086 * parse
16087 */
16088
16089const parse = (input, options = {}) => {
16090 if (typeof input !== 'string') {
16091 throw new TypeError('Expected a string');
16092 }
16093
16094 let opts = options || {};
16095 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
16096 if (input.length > max) {
16097 throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
16098 }
16099
16100 let ast = { type: 'root', input, nodes: [] };
16101 let stack = [ast];
16102 let block = ast;
16103 let prev = ast;
16104 let brackets = 0;
16105 let length = input.length;
16106 let index = 0;
16107 let depth = 0;
16108 let value;
16109 let memo = {};
16110
16111 /**
16112 * Helpers
16113 */
16114
16115 const advance = () => input[index++];
16116 const push = node => {
16117 if (node.type === 'text' && prev.type === 'dot') {
16118 prev.type = 'text';
16119 }
16120
16121 if (prev && prev.type === 'text' && node.type === 'text') {
16122 prev.value += node.value;
16123 return;
16124 }
16125
16126 block.nodes.push(node);
16127 node.parent = block;
16128 node.prev = prev;
16129 prev = node;
16130 return node;
16131 };
16132
16133 push({ type: 'bos' });
16134
16135 while (index < length) {
16136 block = stack[stack.length - 1];
16137 value = advance();
16138
16139 /**
16140 * Invalid chars
16141 */
16142
16143 if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
16144 continue;
16145 }
16146
16147 /**
16148 * Escaped chars
16149 */
16150
16151 if (value === CHAR_BACKSLASH) {
16152 push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
16153 continue;
16154 }
16155
16156 /**
16157 * Right square bracket (literal): ']'
16158 */
16159
16160 if (value === CHAR_RIGHT_SQUARE_BRACKET) {
16161 push({ type: 'text', value: '\\' + value });
16162 continue;
16163 }
16164
16165 /**
16166 * Left square bracket: '['
16167 */
16168
16169 if (value === CHAR_LEFT_SQUARE_BRACKET) {
16170 brackets++;
16171
16172 let closed = true;
16173 let next;
16174
16175 while (index < length && (next = advance())) {
16176 value += next;
16177
16178 if (next === CHAR_LEFT_SQUARE_BRACKET) {
16179 brackets++;
16180 continue;
16181 }
16182
16183 if (next === CHAR_BACKSLASH) {
16184 value += advance();
16185 continue;
16186 }
16187
16188 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
16189 brackets--;
16190
16191 if (brackets === 0) {
16192 break;
16193 }
16194 }
16195 }
16196
16197 push({ type: 'text', value });
16198 continue;
16199 }
16200
16201 /**
16202 * Parentheses
16203 */
16204
16205 if (value === CHAR_LEFT_PARENTHESES) {
16206 block = push({ type: 'paren', nodes: [] });
16207 stack.push(block);
16208 push({ type: 'text', value });
16209 continue;
16210 }
16211
16212 if (value === CHAR_RIGHT_PARENTHESES) {
16213 if (block.type !== 'paren') {
16214 push({ type: 'text', value });
16215 continue;
16216 }
16217 block = stack.pop();
16218 push({ type: 'text', value });
16219 block = stack[stack.length - 1];
16220 continue;
16221 }
16222
16223 /**
16224 * Quotes: '|"|`
16225 */
16226
16227 if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
16228 let open = value;
16229 let next;
16230
16231 if (options.keepQuotes !== true) {
16232 value = '';
16233 }
16234
16235 while (index < length && (next = advance())) {
16236 if (next === CHAR_BACKSLASH) {
16237 value += next + advance();
16238 continue;
16239 }
16240
16241 if (next === open) {
16242 if (options.keepQuotes === true) value += next;
16243 break;
16244 }
16245
16246 value += next;
16247 }
16248
16249 push({ type: 'text', value });
16250 continue;
16251 }
16252
16253 /**
16254 * Left curly brace: '{'
16255 */
16256
16257 if (value === CHAR_LEFT_CURLY_BRACE) {
16258 depth++;
16259
16260 let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
16261 let brace = {
16262 type: 'brace',
16263 open: true,
16264 close: false,
16265 dollar,
16266 depth,
16267 commas: 0,
16268 ranges: 0,
16269 nodes: []
16270 };
16271
16272 block = push(brace);
16273 stack.push(block);
16274 push({ type: 'open', value });
16275 continue;
16276 }
16277
16278 /**
16279 * Right curly brace: '}'
16280 */
16281
16282 if (value === CHAR_RIGHT_CURLY_BRACE) {
16283 if (block.type !== 'brace') {
16284 push({ type: 'text', value });
16285 continue;
16286 }
16287
16288 let type = 'close';
16289 block = stack.pop();
16290 block.close = true;
16291
16292 push({ type, value });
16293 depth--;
16294
16295 block = stack[stack.length - 1];
16296 continue;
16297 }
16298
16299 /**
16300 * Comma: ','
16301 */
16302
16303 if (value === CHAR_COMMA && depth > 0) {
16304 if (block.ranges > 0) {
16305 block.ranges = 0;
16306 let open = block.nodes.shift();
16307 block.nodes = [open, { type: 'text', value: stringify(block) }];
16308 }
16309
16310 push({ type: 'comma', value });
16311 block.commas++;
16312 continue;
16313 }
16314
16315 /**
16316 * Dot: '.'
16317 */
16318
16319 if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
16320 let siblings = block.nodes;
16321
16322 if (depth === 0 || siblings.length === 0) {
16323 push({ type: 'text', value });
16324 continue;
16325 }
16326
16327 if (prev.type === 'dot') {
16328 block.range = [];
16329 prev.value += value;
16330 prev.type = 'range';
16331
16332 if (block.nodes.length !== 3 && block.nodes.length !== 5) {
16333 block.invalid = true;
16334 block.ranges = 0;
16335 prev.type = 'text';
16336 continue;
16337 }
16338
16339 block.ranges++;
16340 block.args = [];
16341 continue;
16342 }
16343
16344 if (prev.type === 'range') {
16345 siblings.pop();
16346
16347 let before = siblings[siblings.length - 1];
16348 before.value += prev.value + value;
16349 prev = before;
16350 block.ranges--;
16351 continue;
16352 }
16353
16354 push({ type: 'dot', value });
16355 continue;
16356 }
16357
16358 /**
16359 * Text
16360 */
16361
16362 push({ type: 'text', value });
16363 }
16364
16365 // Mark imbalanced braces and brackets as invalid
16366 do {
16367 block = stack.pop();
16368
16369 if (block.type !== 'root') {
16370 block.nodes.forEach(node => {
16371 if (!node.nodes) {
16372 if (node.type === 'open') node.isOpen = true;
16373 if (node.type === 'close') node.isClose = true;
16374 if (!node.nodes) node.type = 'text';
16375 node.invalid = true;
16376 }
16377 });
16378
16379 // get the location of the block on parent.nodes (block's siblings)
16380 let parent = stack[stack.length - 1];
16381 let index = parent.nodes.indexOf(block);
16382 // replace the (invalid) block with it's nodes
16383 parent.nodes.splice(index, 1, ...block.nodes);
16384 }
16385 } while (stack.length > 0);
16386
16387 push({ type: 'eos' });
16388 return ast;
16389};
16390
16391module.exports = parse;
16392
16393
16394/***/ }),
16395/* 81 */
16396/***/ (function(module, exports, __webpack_require__) {
16397
16398"use strict";
16399
16400
16401module.exports = {
16402 MAX_LENGTH: 1024 * 64,
16403
16404 // Digits
16405 CHAR_0: '0', /* 0 */
16406 CHAR_9: '9', /* 9 */
16407
16408 // Alphabet chars.
16409 CHAR_UPPERCASE_A: 'A', /* A */
16410 CHAR_LOWERCASE_A: 'a', /* a */
16411 CHAR_UPPERCASE_Z: 'Z', /* Z */
16412 CHAR_LOWERCASE_Z: 'z', /* z */
16413
16414 CHAR_LEFT_PARENTHESES: '(', /* ( */
16415 CHAR_RIGHT_PARENTHESES: ')', /* ) */
16416
16417 CHAR_ASTERISK: '*', /* * */
16418
16419 // Non-alphabetic chars.
16420 CHAR_AMPERSAND: '&', /* & */
16421 CHAR_AT: '@', /* @ */
16422 CHAR_BACKSLASH: '\\', /* \ */
16423 CHAR_BACKTICK: '`', /* ` */
16424 CHAR_CARRIAGE_RETURN: '\r', /* \r */
16425 CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
16426 CHAR_COLON: ':', /* : */
16427 CHAR_COMMA: ',', /* , */
16428 CHAR_DOLLAR: '$', /* . */
16429 CHAR_DOT: '.', /* . */
16430 CHAR_DOUBLE_QUOTE: '"', /* " */
16431 CHAR_EQUAL: '=', /* = */
16432 CHAR_EXCLAMATION_MARK: '!', /* ! */
16433 CHAR_FORM_FEED: '\f', /* \f */
16434 CHAR_FORWARD_SLASH: '/', /* / */
16435 CHAR_HASH: '#', /* # */
16436 CHAR_HYPHEN_MINUS: '-', /* - */
16437 CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
16438 CHAR_LEFT_CURLY_BRACE: '{', /* { */
16439 CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
16440 CHAR_LINE_FEED: '\n', /* \n */
16441 CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
16442 CHAR_PERCENT: '%', /* % */
16443 CHAR_PLUS: '+', /* + */
16444 CHAR_QUESTION_MARK: '?', /* ? */
16445 CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
16446 CHAR_RIGHT_CURLY_BRACE: '}', /* } */
16447 CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
16448 CHAR_SEMICOLON: ';', /* ; */
16449 CHAR_SINGLE_QUOTE: '\'', /* ' */
16450 CHAR_SPACE: ' ', /* */
16451 CHAR_TAB: '\t', /* \t */
16452 CHAR_UNDERSCORE: '_', /* _ */
16453 CHAR_VERTICAL_LINE: '|', /* | */
16454 CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
16455};
16456
16457
16458/***/ }),
16459/* 82 */
16460/***/ (function(module, exports, __webpack_require__) {
16461
16462"use strict";
16463
16464
16465module.exports = __webpack_require__(83);
16466
16467
16468/***/ }),
16469/* 83 */
16470/***/ (function(module, exports, __webpack_require__) {
16471
16472"use strict";
16473
16474
16475const path = __webpack_require__(13);
16476const scan = __webpack_require__(84);
16477const parse = __webpack_require__(87);
16478const utils = __webpack_require__(85);
16479
16480/**
16481 * Creates a matcher function from one or more glob patterns. The
16482 * returned function takes a string to match as its first argument,
16483 * and returns true if the string is a match. The returned matcher
16484 * function also takes a boolean as the second argument that, when true,
16485 * returns an object with additional information.
16486 *
16487 * ```js
16488 * const picomatch = require('picomatch');
16489 * // picomatch(glob[, options]);
16490 *
16491 * const isMatch = picomatch('*.!(*a)');
16492 * console.log(isMatch('a.a')); //=> false
16493 * console.log(isMatch('a.b')); //=> true
16494 * ```
16495 * @name picomatch
16496 * @param {String|Array} `globs` One or more glob patterns.
16497 * @param {Object=} `options`
16498 * @return {Function=} Returns a matcher function.
16499 * @api public
16500 */
16501
16502const picomatch = (glob, options, returnState = false) => {
16503 if (Array.isArray(glob)) {
16504 let fns = glob.map(input => picomatch(input, options, returnState));
16505 return str => {
16506 for (let isMatch of fns) {
16507 let state = isMatch(str);
16508 if (state) return state;
16509 }
16510 return false;
16511 };
16512 }
16513
16514 if (typeof glob !== 'string' || glob === '') {
16515 throw new TypeError('Expected pattern to be a non-empty string');
16516 }
16517
16518 let opts = options || {};
16519 let posix = utils.isWindows(options);
16520 let regex = picomatch.makeRe(glob, options, false, true);
16521 let state = regex.state;
16522 delete regex.state;
16523
16524 let isIgnored = () => false;
16525 if (opts.ignore) {
16526 let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
16527 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
16528 }
16529
16530 const matcher = (input, returnObject = false) => {
16531 let { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
16532 let result = { glob, state, regex, posix, input, output, match, isMatch };
16533
16534 if (typeof opts.onResult === 'function') {
16535 opts.onResult(result);
16536 }
16537
16538 if (isMatch === false) {
16539 result.isMatch = false;
16540 return returnObject ? result : false;
16541 }
16542
16543 if (isIgnored(input)) {
16544 if (typeof opts.onIgnore === 'function') {
16545 opts.onIgnore(result);
16546 }
16547 result.isMatch = false;
16548 return returnObject ? result : false;
16549 }
16550
16551 if (typeof opts.onMatch === 'function') {
16552 opts.onMatch(result);
16553 }
16554 return returnObject ? result : true;
16555 };
16556
16557 if (returnState) {
16558 matcher.state = state;
16559 }
16560
16561 return matcher;
16562};
16563
16564/**
16565 * Test `input` with the given `regex`. This is used by the main
16566 * `picomatch()` function to test the input string.
16567 *
16568 * ```js
16569 * const picomatch = require('picomatch');
16570 * // picomatch.test(input, regex[, options]);
16571 *
16572 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
16573 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
16574 * ```
16575 * @param {String} `input` String to test.
16576 * @param {RegExp} `regex`
16577 * @return {Object} Returns an object with matching info.
16578 * @api public
16579 */
16580
16581picomatch.test = (input, regex, options, { glob, posix } = {}) => {
16582 if (typeof input !== 'string') {
16583 throw new TypeError('Expected input to be a string');
16584 }
16585
16586 if (input === '') {
16587 return { isMatch: false, output: '' };
16588 }
16589
16590 let opts = options || {};
16591 let format = opts.format || (posix ? utils.toPosixSlashes : null);
16592 let match = input === glob;
16593 let output = (match && format) ? format(input) : input;
16594
16595 if (match === false) {
16596 output = format ? format(input) : input;
16597 match = output === glob;
16598 }
16599
16600 if (match === false || opts.capture === true) {
16601 if (opts.matchBase === true || opts.basename === true) {
16602 match = picomatch.matchBase(input, regex, options, posix);
16603 } else {
16604 match = regex.exec(output);
16605 }
16606 }
16607
16608 return { isMatch: !!match, match, output };
16609};
16610
16611/**
16612 * Match the basename of a filepath.
16613 *
16614 * ```js
16615 * const picomatch = require('picomatch');
16616 * // picomatch.matchBase(input, glob[, options]);
16617 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
16618 * ```
16619 * @param {String} `input` String to test.
16620 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
16621 * @return {Boolean}
16622 * @api public
16623 */
16624
16625picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
16626 let regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
16627 return regex.test(path.basename(input));
16628};
16629
16630/**
16631 * Returns true if **any** of the given glob `patterns` match the specified `string`.
16632 *
16633 * ```js
16634 * const picomatch = require('picomatch');
16635 * // picomatch.isMatch(string, patterns[, options]);
16636 *
16637 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
16638 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
16639 * ```
16640 * @param {String|Array} str The string to test.
16641 * @param {String|Array} patterns One or more glob patterns to use for matching.
16642 * @param {Object} [options] See available [options](#options).
16643 * @return {Boolean} Returns true if any patterns match `str`
16644 * @api public
16645 */
16646
16647picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
16648
16649/**
16650 * Parse a glob pattern to create the source string for a regular
16651 * expression.
16652 *
16653 * ```js
16654 * const picomatch = require('picomatch');
16655 * const result = picomatch.parse(glob[, options]);
16656 * ```
16657 * @param {String} `glob`
16658 * @param {Object} `options`
16659 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
16660 * @api public
16661 */
16662
16663picomatch.parse = (glob, options) => parse(glob, options);
16664
16665/**
16666 * Scan a glob pattern to separate the pattern into segments.
16667 *
16668 * ```js
16669 * const picomatch = require('picomatch');
16670 * // picomatch.scan(input[, options]);
16671 *
16672 * const result = picomatch.scan('!./foo/*.js');
16673 * console.log(result);
16674 * // { prefix: '!./',
16675 * // input: '!./foo/*.js',
16676 * // base: 'foo',
16677 * // glob: '*.js',
16678 * // negated: true,
16679 * // isGlob: true }
16680 * ```
16681 * @param {String} `input` Glob pattern to scan.
16682 * @param {Object} `options`
16683 * @return {Object} Returns an object with
16684 * @api public
16685 */
16686
16687picomatch.scan = (input, options) => scan(input, options);
16688
16689/**
16690 * Create a regular expression from a glob pattern.
16691 *
16692 * ```js
16693 * const picomatch = require('picomatch');
16694 * // picomatch.makeRe(input[, options]);
16695 *
16696 * console.log(picomatch.makeRe('*.js'));
16697 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
16698 * ```
16699 * @param {String} `input` A glob pattern to convert to regex.
16700 * @param {Object} `options`
16701 * @return {RegExp} Returns a regex created from the given pattern.
16702 * @api public
16703 */
16704
16705picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
16706 if (!input || typeof input !== 'string') {
16707 throw new TypeError('Expected a non-empty string');
16708 }
16709
16710 let opts = options || {};
16711 let prepend = opts.contains ? '' : '^';
16712 let append = opts.contains ? '' : '$';
16713 let state = { negated: false, fastpaths: true };
16714 let prefix = '';
16715 let output;
16716
16717 if (input.startsWith('./')) {
16718 input = input.slice(2);
16719 prefix = state.prefix = './';
16720 }
16721
16722 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
16723 output = parse.fastpaths(input, options);
16724 }
16725
16726 if (output === void 0) {
16727 state = picomatch.parse(input, options);
16728 state.prefix = prefix + (state.prefix || '');
16729 output = state.output;
16730 }
16731
16732 if (returnOutput === true) {
16733 return output;
16734 }
16735
16736 let source = `${prepend}(?:${output})${append}`;
16737 if (state && state.negated === true) {
16738 source = `^(?!${source}).*$`;
16739 }
16740
16741 let regex = picomatch.toRegex(source, options);
16742 if (returnState === true) {
16743 regex.state = state;
16744 }
16745
16746 return regex;
16747};
16748
16749/**
16750 * Create a regular expression from the given regex source string.
16751 *
16752 * ```js
16753 * const picomatch = require('picomatch');
16754 * // picomatch.toRegex(source[, options]);
16755 *
16756 * const { output } = picomatch.parse('*.js');
16757 * console.log(picomatch.toRegex(output));
16758 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
16759 * ```
16760 * @param {String} `source` Regular expression source string.
16761 * @param {Object} `options`
16762 * @return {RegExp}
16763 * @api public
16764 */
16765
16766picomatch.toRegex = (source, options) => {
16767 try {
16768 let opts = options || {};
16769 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
16770 } catch (err) {
16771 if (options && options.debug === true) throw err;
16772 return /$^/;
16773 }
16774};
16775
16776/**
16777 * Picomatch constants.
16778 * @return {Object}
16779 */
16780
16781picomatch.constants = __webpack_require__(86);
16782
16783/**
16784 * Expose "picomatch"
16785 */
16786
16787module.exports = picomatch;
16788
16789
16790/***/ }),
16791/* 84 */
16792/***/ (function(module, exports, __webpack_require__) {
16793
16794"use strict";
16795
16796
16797const utils = __webpack_require__(85);
16798
16799const {
16800 CHAR_ASTERISK, /* * */
16801 CHAR_AT, /* @ */
16802 CHAR_BACKWARD_SLASH, /* \ */
16803 CHAR_COMMA, /* , */
16804 CHAR_DOT, /* . */
16805 CHAR_EXCLAMATION_MARK, /* ! */
16806 CHAR_FORWARD_SLASH, /* / */
16807 CHAR_LEFT_CURLY_BRACE, /* { */
16808 CHAR_LEFT_PARENTHESES, /* ( */
16809 CHAR_LEFT_SQUARE_BRACKET, /* [ */
16810 CHAR_PLUS, /* + */
16811 CHAR_QUESTION_MARK, /* ? */
16812 CHAR_RIGHT_CURLY_BRACE, /* } */
16813 CHAR_RIGHT_PARENTHESES, /* ) */
16814 CHAR_RIGHT_SQUARE_BRACKET /* ] */
16815} = __webpack_require__(86);
16816
16817const isPathSeparator = code => {
16818 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
16819};
16820
16821/**
16822 * Quickly scans a glob pattern and returns an object with a handful of
16823 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
16824 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
16825 *
16826 * ```js
16827 * const pm = require('picomatch');
16828 * console.log(pm.scan('foo/bar/*.js'));
16829 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
16830 * ```
16831 * @param {String} `str`
16832 * @param {Object} `options`
16833 * @return {Object} Returns an object with tokens and regex source string.
16834 * @api public
16835 */
16836
16837module.exports = (input, options) => {
16838 let opts = options || {};
16839 let length = input.length - 1;
16840 let index = -1;
16841 let start = 0;
16842 let lastIndex = 0;
16843 let isGlob = false;
16844 let backslashes = false;
16845 let negated = false;
16846 let braces = 0;
16847 let prev;
16848 let code;
16849
16850 let braceEscaped = false;
16851
16852 let eos = () => index >= length;
16853 let advance = () => {
16854 prev = code;
16855 return input.charCodeAt(++index);
16856 };
16857
16858 while (index < length) {
16859 code = advance();
16860 let next;
16861
16862 if (code === CHAR_BACKWARD_SLASH) {
16863 backslashes = true;
16864 next = advance();
16865
16866 if (next === CHAR_LEFT_CURLY_BRACE) {
16867 braceEscaped = true;
16868 }
16869 continue;
16870 }
16871
16872 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
16873 braces++;
16874
16875 while (!eos() && (next = advance())) {
16876 if (next === CHAR_BACKWARD_SLASH) {
16877 backslashes = true;
16878 next = advance();
16879 continue;
16880 }
16881
16882 if (next === CHAR_LEFT_CURLY_BRACE) {
16883 braces++;
16884 continue;
16885 }
16886
16887 if (!braceEscaped && next === CHAR_DOT && (next = advance()) === CHAR_DOT) {
16888 isGlob = true;
16889 break;
16890 }
16891
16892 if (!braceEscaped && next === CHAR_COMMA) {
16893 isGlob = true;
16894 break;
16895 }
16896
16897 if (next === CHAR_RIGHT_CURLY_BRACE) {
16898 braces--;
16899 if (braces === 0) {
16900 braceEscaped = false;
16901 break;
16902 }
16903 }
16904 }
16905 }
16906
16907 if (code === CHAR_FORWARD_SLASH) {
16908 if (prev === CHAR_DOT && index === (start + 1)) {
16909 start += 2;
16910 continue;
16911 }
16912
16913 lastIndex = index + 1;
16914 continue;
16915 }
16916
16917 if (code === CHAR_ASTERISK) {
16918 isGlob = true;
16919 break;
16920 }
16921
16922 if (code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK) {
16923 isGlob = true;
16924 break;
16925 }
16926
16927 if (code === CHAR_LEFT_SQUARE_BRACKET) {
16928 while (!eos() && (next = advance())) {
16929 if (next === CHAR_BACKWARD_SLASH) {
16930 backslashes = true;
16931 next = advance();
16932 continue;
16933 }
16934
16935 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
16936 isGlob = true;
16937 break;
16938 }
16939 }
16940 }
16941
16942 let isExtglobChar = code === CHAR_PLUS
16943 || code === CHAR_AT
16944 || code === CHAR_EXCLAMATION_MARK;
16945
16946 if (isExtglobChar && input.charCodeAt(index + 1) === CHAR_LEFT_PARENTHESES) {
16947 isGlob = true;
16948 break;
16949 }
16950
16951 if (code === CHAR_EXCLAMATION_MARK && index === start) {
16952 negated = true;
16953 start++;
16954 continue;
16955 }
16956
16957 if (code === CHAR_LEFT_PARENTHESES) {
16958 while (!eos() && (next = advance())) {
16959 if (next === CHAR_BACKWARD_SLASH) {
16960 backslashes = true;
16961 next = advance();
16962 continue;
16963 }
16964
16965 if (next === CHAR_RIGHT_PARENTHESES) {
16966 isGlob = true;
16967 break;
16968 }
16969 }
16970 }
16971
16972 if (isGlob) {
16973 break;
16974 }
16975 }
16976
16977 let prefix = '';
16978 let orig = input;
16979 let base = input;
16980 let glob = '';
16981
16982 if (start > 0) {
16983 prefix = input.slice(0, start);
16984 input = input.slice(start);
16985 lastIndex -= start;
16986 }
16987
16988 if (base && isGlob === true && lastIndex > 0) {
16989 base = input.slice(0, lastIndex);
16990 glob = input.slice(lastIndex);
16991 } else if (isGlob === true) {
16992 base = '';
16993 glob = input;
16994 } else {
16995 base = input;
16996 }
16997
16998 if (base && base !== '' && base !== '/' && base !== input) {
16999 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
17000 base = base.slice(0, -1);
17001 }
17002 }
17003
17004 if (opts.unescape === true) {
17005 if (glob) glob = utils.removeBackslashes(glob);
17006
17007 if (base && backslashes === true) {
17008 base = utils.removeBackslashes(base);
17009 }
17010 }
17011
17012 return { prefix, input: orig, base, glob, negated, isGlob };
17013};
17014
17015
17016/***/ }),
17017/* 85 */
17018/***/ (function(module, exports, __webpack_require__) {
17019
17020"use strict";
17021
17022
17023const path = __webpack_require__(13);
17024const win32 = process.platform === 'win32';
17025const {
17026 REGEX_SPECIAL_CHARS,
17027 REGEX_SPECIAL_CHARS_GLOBAL,
17028 REGEX_REMOVE_BACKSLASH
17029} = __webpack_require__(86);
17030
17031exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
17032exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
17033exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
17034exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
17035exports.toPosixSlashes = str => str.replace(/\\/g, '/');
17036
17037exports.removeBackslashes = str => {
17038 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
17039 return match === '\\' ? '' : match;
17040 });
17041}
17042
17043exports.supportsLookbehinds = () => {
17044 let segs = process.version.slice(1).split('.');
17045 if (segs.length === 3 && +segs[0] >= 9 || (+segs[0] === 8 && +segs[1] >= 10)) {
17046 return true;
17047 }
17048 return false;
17049};
17050
17051exports.isWindows = options => {
17052 if (options && typeof options.windows === 'boolean') {
17053 return options.windows;
17054 }
17055 return win32 === true || path.sep === '\\';
17056};
17057
17058exports.escapeLast = (input, char, lastIdx) => {
17059 let idx = input.lastIndexOf(char, lastIdx);
17060 if (idx === -1) return input;
17061 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
17062 return input.slice(0, idx) + '\\' + input.slice(idx);
17063};
17064
17065
17066/***/ }),
17067/* 86 */
17068/***/ (function(module, exports, __webpack_require__) {
17069
17070"use strict";
17071
17072
17073const path = __webpack_require__(13);
17074const WIN_SLASH = '\\\\/';
17075const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
17076
17077/**
17078 * Posix glob regex
17079 */
17080
17081const DOT_LITERAL = '\\.';
17082const PLUS_LITERAL = '\\+';
17083const QMARK_LITERAL = '\\?';
17084const SLASH_LITERAL = '\\/';
17085const ONE_CHAR = '(?=.)';
17086const QMARK = '[^/]';
17087const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
17088const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
17089const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
17090const NO_DOT = `(?!${DOT_LITERAL})`;
17091const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
17092const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
17093const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
17094const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
17095const STAR = `${QMARK}*?`;
17096
17097const POSIX_CHARS = {
17098 DOT_LITERAL,
17099 PLUS_LITERAL,
17100 QMARK_LITERAL,
17101 SLASH_LITERAL,
17102 ONE_CHAR,
17103 QMARK,
17104 END_ANCHOR,
17105 DOTS_SLASH,
17106 NO_DOT,
17107 NO_DOTS,
17108 NO_DOT_SLASH,
17109 NO_DOTS_SLASH,
17110 QMARK_NO_DOT,
17111 STAR,
17112 START_ANCHOR
17113};
17114
17115/**
17116 * Windows glob regex
17117 */
17118
17119const WINDOWS_CHARS = {
17120 ...POSIX_CHARS,
17121
17122 SLASH_LITERAL: `[${WIN_SLASH}]`,
17123 QMARK: WIN_NO_SLASH,
17124 STAR: `${WIN_NO_SLASH}*?`,
17125 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
17126 NO_DOT: `(?!${DOT_LITERAL})`,
17127 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
17128 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
17129 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
17130 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
17131 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
17132 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
17133};
17134
17135/**
17136 * POSIX Bracket Regex
17137 */
17138
17139const POSIX_REGEX_SOURCE = {
17140 alnum: 'a-zA-Z0-9',
17141 alpha: 'a-zA-Z',
17142 ascii: '\\x00-\\x7F',
17143 blank: ' \\t',
17144 cntrl: '\\x00-\\x1F\\x7F',
17145 digit: '0-9',
17146 graph: '\\x21-\\x7E',
17147 lower: 'a-z',
17148 print: '\\x20-\\x7E ',
17149 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
17150 space: ' \\t\\r\\n\\v\\f',
17151 upper: 'A-Z',
17152 word: 'A-Za-z0-9_',
17153 xdigit: 'A-Fa-f0-9'
17154};
17155
17156module.exports = {
17157 MAX_LENGTH: 1024 * 64,
17158 POSIX_REGEX_SOURCE,
17159
17160 // regular expressions
17161 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
17162 REGEX_NON_SPECIAL_CHAR: /^[^@![\].,$*+?^{}()|\\/]+/,
17163 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
17164 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
17165 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
17166 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
17167
17168 // Replace globs with equivalent patterns to reduce parsing time.
17169 REPLACEMENTS: {
17170 '***': '*',
17171 '**/**': '**',
17172 '**/**/**': '**'
17173 },
17174
17175 // Digits
17176 CHAR_0: 48, /* 0 */
17177 CHAR_9: 57, /* 9 */
17178
17179 // Alphabet chars.
17180 CHAR_UPPERCASE_A: 65, /* A */
17181 CHAR_LOWERCASE_A: 97, /* a */
17182 CHAR_UPPERCASE_Z: 90, /* Z */
17183 CHAR_LOWERCASE_Z: 122, /* z */
17184
17185 CHAR_LEFT_PARENTHESES: 40, /* ( */
17186 CHAR_RIGHT_PARENTHESES: 41, /* ) */
17187
17188 CHAR_ASTERISK: 42, /* * */
17189
17190 // Non-alphabetic chars.
17191 CHAR_AMPERSAND: 38, /* & */
17192 CHAR_AT: 64, /* @ */
17193 CHAR_BACKWARD_SLASH: 92, /* \ */
17194 CHAR_CARRIAGE_RETURN: 13, /* \r */
17195 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
17196 CHAR_COLON: 58, /* : */
17197 CHAR_COMMA: 44, /* , */
17198 CHAR_DOT: 46, /* . */
17199 CHAR_DOUBLE_QUOTE: 34, /* " */
17200 CHAR_EQUAL: 61, /* = */
17201 CHAR_EXCLAMATION_MARK: 33, /* ! */
17202 CHAR_FORM_FEED: 12, /* \f */
17203 CHAR_FORWARD_SLASH: 47, /* / */
17204 CHAR_GRAVE_ACCENT: 96, /* ` */
17205 CHAR_HASH: 35, /* # */
17206 CHAR_HYPHEN_MINUS: 45, /* - */
17207 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
17208 CHAR_LEFT_CURLY_BRACE: 123, /* { */
17209 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
17210 CHAR_LINE_FEED: 10, /* \n */
17211 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
17212 CHAR_PERCENT: 37, /* % */
17213 CHAR_PLUS: 43, /* + */
17214 CHAR_QUESTION_MARK: 63, /* ? */
17215 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
17216 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
17217 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
17218 CHAR_SEMICOLON: 59, /* ; */
17219 CHAR_SINGLE_QUOTE: 39, /* ' */
17220 CHAR_SPACE: 32, /* */
17221 CHAR_TAB: 9, /* \t */
17222 CHAR_UNDERSCORE: 95, /* _ */
17223 CHAR_VERTICAL_LINE: 124, /* | */
17224 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
17225
17226 SEP: path.sep,
17227
17228 /**
17229 * Create EXTGLOB_CHARS
17230 */
17231
17232 extglobChars(chars) {
17233 return {
17234 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
17235 '?': { type: 'qmark', open: '(?:', close: ')?' },
17236 '+': { type: 'plus', open: '(?:', close: ')+' },
17237 '*': { type: 'star', open: '(?:', close: ')*' },
17238 '@': { type: 'at', open: '(?:', close: ')' }
17239 };
17240 },
17241
17242 /**
17243 * Create GLOB_CHARS
17244 */
17245
17246 globChars(win32) {
17247 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
17248 }
17249};
17250
17251
17252/***/ }),
17253/* 87 */
17254/***/ (function(module, exports, __webpack_require__) {
17255
17256"use strict";
17257
17258
17259const utils = __webpack_require__(85);
17260const constants = __webpack_require__(86);
17261
17262/**
17263 * Constants
17264 */
17265
17266const {
17267 MAX_LENGTH,
17268 POSIX_REGEX_SOURCE,
17269 REGEX_NON_SPECIAL_CHAR,
17270 REGEX_SPECIAL_CHARS_BACKREF,
17271 REPLACEMENTS
17272} = constants;
17273
17274/**
17275 * Helpers
17276 */
17277
17278const expandRange = (args, options) => {
17279 if (typeof options.expandRange === 'function') {
17280 return options.expandRange(...args, options);
17281 }
17282
17283 args.sort();
17284 let value = `[${args.join('-')}]`;
17285
17286 try {
17287 /* eslint-disable no-new */
17288 new RegExp(value);
17289 } catch (ex) {
17290 return args.map(v => utils.escapeRegex(v)).join('..');
17291 }
17292
17293 return value;
17294};
17295
17296const negate = state => {
17297 let count = 1;
17298
17299 while (state.peek() === '!' && (state.peek(2) !== '(' || state.peek(3) === '?')) {
17300 state.advance();
17301 state.start++;
17302 count++;
17303 }
17304
17305 if (count % 2 === 0) {
17306 return false;
17307 }
17308
17309 state.negated = true;
17310 state.start++;
17311 return true;
17312};
17313
17314/**
17315 * Create the message for a syntax error
17316 */
17317
17318const syntaxError = (type, char) => {
17319 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
17320};
17321
17322/**
17323 * Parse the given input string.
17324 * @param {String} input
17325 * @param {Object} options
17326 * @return {Object}
17327 */
17328
17329const parse = (input, options) => {
17330 if (typeof input !== 'string') {
17331 throw new TypeError('Expected a string');
17332 }
17333
17334 input = REPLACEMENTS[input] || input;
17335
17336 let opts = { ...options };
17337 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
17338 let len = input.length;
17339 if (len > max) {
17340 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
17341 }
17342
17343 let bos = { type: 'bos', value: '', output: opts.prepend || '' };
17344 let tokens = [bos];
17345
17346 let capture = opts.capture ? '' : '?:';
17347 let win32 = utils.isWindows(options);
17348
17349 // create constants based on platform, for windows or posix
17350 const PLATFORM_CHARS = constants.globChars(win32);
17351 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
17352
17353 const {
17354 DOT_LITERAL,
17355 PLUS_LITERAL,
17356 SLASH_LITERAL,
17357 ONE_CHAR,
17358 DOTS_SLASH,
17359 NO_DOT,
17360 NO_DOT_SLASH,
17361 NO_DOTS_SLASH,
17362 QMARK,
17363 QMARK_NO_DOT,
17364 STAR,
17365 START_ANCHOR
17366 } = PLATFORM_CHARS;
17367
17368 const globstar = (opts) => {
17369 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
17370 };
17371
17372 let nodot = opts.dot ? '' : NO_DOT;
17373 let star = opts.bash === true ? globstar(opts) : STAR;
17374 let qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
17375
17376 if (opts.capture) {
17377 star = `(${star})`;
17378 }
17379
17380 // minimatch options support
17381 if (typeof opts.noext === 'boolean') {
17382 opts.noextglob = opts.noext;
17383 }
17384
17385 let state = {
17386 index: -1,
17387 start: 0,
17388 consumed: '',
17389 output: '',
17390 backtrack: false,
17391 brackets: 0,
17392 braces: 0,
17393 parens: 0,
17394 quotes: 0,
17395 tokens
17396 };
17397
17398 let extglobs = [];
17399 let stack = [];
17400 let prev = bos;
17401 let value;
17402
17403 /**
17404 * Tokenizing helpers
17405 */
17406
17407 const eos = () => state.index === len - 1;
17408 const peek = state.peek = (n = 1) => input[state.index + n];
17409 const advance = state.advance = () => input[++state.index];
17410 const append = token => {
17411 state.output += token.output != null ? token.output : token.value;
17412 state.consumed += token.value || '';
17413 };
17414
17415 const increment = type => {
17416 state[type]++;
17417 stack.push(type);
17418 };
17419
17420 const decrement = type => {
17421 state[type]--;
17422 stack.pop();
17423 };
17424
17425 /**
17426 * Push tokens onto the tokens array. This helper speeds up
17427 * tokenizing by 1) helping us avoid backtracking as much as possible,
17428 * and 2) helping us avoid creating extra tokens when consecutive
17429 * characters are plain text. This improves performance and simplifies
17430 * lookbehinds.
17431 */
17432
17433 const push = tok => {
17434 if (prev.type === 'globstar') {
17435 let isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
17436 let isExtglob = extglobs.length && (tok.type === 'pipe' || tok.type === 'paren');
17437 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
17438 state.output = state.output.slice(0, -prev.output.length);
17439 prev.type = 'star';
17440 prev.value = '*';
17441 prev.output = star;
17442 state.output += prev.output;
17443 }
17444 }
17445
17446 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
17447 extglobs[extglobs.length - 1].inner += tok.value;
17448 }
17449
17450 if (tok.value || tok.output) append(tok);
17451 if (prev && prev.type === 'text' && tok.type === 'text') {
17452 prev.value += tok.value;
17453 return;
17454 }
17455
17456 tok.prev = prev;
17457 tokens.push(tok);
17458 prev = tok;
17459 };
17460
17461 const extglobOpen = (type, value) => {
17462 let token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
17463
17464 token.prev = prev;
17465 token.parens = state.parens;
17466 token.output = state.output;
17467 let output = (opts.capture ? '(' : '') + token.open;
17468
17469 push({ type, value, output: state.output ? '' : ONE_CHAR });
17470 push({ type: 'paren', extglob: true, value: advance(), output });
17471 increment('parens');
17472 extglobs.push(token);
17473 };
17474
17475 const extglobClose = token => {
17476 let output = token.close + (opts.capture ? ')' : '');
17477
17478 if (token.type === 'negate') {
17479 let extglobStar = star;
17480
17481 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
17482 extglobStar = globstar(opts);
17483 }
17484
17485 if (extglobStar !== star || eos() || /^\)+$/.test(input.slice(state.index + 1))) {
17486 output = token.close = ')$))' + extglobStar;
17487 }
17488
17489 if (token.prev.type === 'bos' && eos()) {
17490 state.negatedExtglob = true;
17491 }
17492 }
17493
17494 push({ type: 'paren', extglob: true, value, output });
17495 decrement('parens');
17496 };
17497
17498 if (opts.fastpaths !== false && !/(^[*!]|[/{[()\]}"])/.test(input)) {
17499 let backslashes = false;
17500
17501 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
17502 if (first === '\\') {
17503 backslashes = true;
17504 return m;
17505 }
17506
17507 if (first === '?') {
17508 if (esc) {
17509 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
17510 }
17511 if (index === 0) {
17512 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
17513 }
17514 return QMARK.repeat(chars.length);
17515 }
17516
17517 if (first === '.') {
17518 return DOT_LITERAL.repeat(chars.length);
17519 }
17520
17521 if (first === '*') {
17522 if (esc) {
17523 return esc + first + (rest ? star : '');
17524 }
17525 return star;
17526 }
17527 return esc ? m : '\\' + m;
17528 });
17529
17530 if (backslashes === true) {
17531 if (opts.unescape === true) {
17532 output = output.replace(/\\/g, '');
17533 } else {
17534 output = output.replace(/\\+/g, m => {
17535 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
17536 });
17537 }
17538 }
17539
17540 state.output = output;
17541 return state;
17542 }
17543
17544 /**
17545 * Tokenize input until we reach end-of-string
17546 */
17547
17548 while (!eos()) {
17549 value = advance();
17550
17551 if (value === '\u0000') {
17552 continue;
17553 }
17554
17555 /**
17556 * Escaped characters
17557 */
17558
17559 if (value === '\\') {
17560 let next = peek();
17561
17562 if (next === '/' && opts.bash !== true) {
17563 continue;
17564 }
17565
17566 if (next === '.' || next === ';') {
17567 continue;
17568 }
17569
17570 if (!next) {
17571 value += '\\';
17572 push({ type: 'text', value });
17573 continue;
17574 }
17575
17576 // collapse slashes to reduce potential for exploits
17577 let match = /^\\+/.exec(input.slice(state.index + 1));
17578 let slashes = 0;
17579
17580 if (match && match[0].length > 2) {
17581 slashes = match[0].length;
17582 state.index += slashes;
17583 if (slashes % 2 !== 0) {
17584 value += '\\';
17585 }
17586 }
17587
17588 if (opts.unescape === true) {
17589 value = advance() || '';
17590 } else {
17591 value += advance() || '';
17592 }
17593
17594 if (state.brackets === 0) {
17595 push({ type: 'text', value });
17596 continue;
17597 }
17598 }
17599
17600 /**
17601 * If we're inside a regex character class, continue
17602 * until we reach the closing bracket.
17603 */
17604
17605 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
17606 if (opts.posix !== false && value === ':') {
17607 let inner = prev.value.slice(1);
17608 if (inner.includes('[')) {
17609 prev.posix = true;
17610
17611 if (inner.includes(':')) {
17612 let idx = prev.value.lastIndexOf('[');
17613 let pre = prev.value.slice(0, idx);
17614 let rest = prev.value.slice(idx + 2);
17615 let posix = POSIX_REGEX_SOURCE[rest];
17616 if (posix) {
17617 prev.value = pre + posix;
17618 state.backtrack = true;
17619 advance();
17620
17621 if (!bos.output && tokens.indexOf(prev) === 1) {
17622 bos.output = ONE_CHAR;
17623 }
17624 continue;
17625 }
17626 }
17627 }
17628 }
17629
17630 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
17631 value = '\\' + value;
17632 }
17633
17634 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
17635 value = '\\' + value;
17636 }
17637
17638 if (opts.posix === true && value === '!' && prev.value === '[') {
17639 value = '^';
17640 }
17641
17642 prev.value += value;
17643 append({ value });
17644 continue;
17645 }
17646
17647 /**
17648 * If we're inside a quoted string, continue
17649 * until we reach the closing double quote.
17650 */
17651
17652 if (state.quotes === 1 && value !== '"') {
17653 value = utils.escapeRegex(value);
17654 prev.value += value;
17655 append({ value });
17656 continue;
17657 }
17658
17659 /**
17660 * Double quotes
17661 */
17662
17663 if (value === '"') {
17664 state.quotes = state.quotes === 1 ? 0 : 1;
17665 if (opts.keepQuotes === true) {
17666 push({ type: 'text', value });
17667 }
17668 continue;
17669 }
17670
17671 /**
17672 * Parentheses
17673 */
17674
17675 if (value === '(') {
17676 push({ type: 'paren', value });
17677 increment('parens');
17678 continue;
17679 }
17680
17681 if (value === ')') {
17682 if (state.parens === 0 && opts.strictBrackets === true) {
17683 throw new SyntaxError(syntaxError('opening', '('));
17684 }
17685
17686 let extglob = extglobs[extglobs.length - 1];
17687 if (extglob && state.parens === extglob.parens + 1) {
17688 extglobClose(extglobs.pop());
17689 continue;
17690 }
17691
17692 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
17693 decrement('parens');
17694 continue;
17695 }
17696
17697 /**
17698 * Brackets
17699 */
17700
17701 if (value === '[') {
17702 if (opts.nobracket === true || !input.slice(state.index + 1).includes(']')) {
17703 if (opts.nobracket !== true && opts.strictBrackets === true) {
17704 throw new SyntaxError(syntaxError('closing', ']'));
17705 }
17706
17707 value = '\\' + value;
17708 } else {
17709 increment('brackets');
17710 }
17711
17712 push({ type: 'bracket', value });
17713 continue;
17714 }
17715
17716 if (value === ']') {
17717 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
17718 push({ type: 'text', value, output: '\\' + value });
17719 continue;
17720 }
17721
17722 if (state.brackets === 0) {
17723 if (opts.strictBrackets === true) {
17724 throw new SyntaxError(syntaxError('opening', '['));
17725 }
17726
17727 push({ type: 'text', value, output: '\\' + value });
17728 continue;
17729 }
17730
17731 decrement('brackets');
17732
17733 let prevValue = prev.value.slice(1);
17734 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
17735 value = '/' + value;
17736 }
17737
17738 prev.value += value;
17739 append({ value });
17740
17741 // when literal brackets are explicitly disabled
17742 // assume we should match with a regex character class
17743 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
17744 continue;
17745 }
17746
17747 let escaped = utils.escapeRegex(prev.value);
17748 state.output = state.output.slice(0, -prev.value.length);
17749
17750 // when literal brackets are explicitly enabled
17751 // assume we should escape the brackets to match literal characters
17752 if (opts.literalBrackets === true) {
17753 state.output += escaped;
17754 prev.value = escaped;
17755 continue;
17756 }
17757
17758 // when the user specifies nothing, try to match both
17759 prev.value = `(${capture}${escaped}|${prev.value})`;
17760 state.output += prev.value;
17761 continue;
17762 }
17763
17764 /**
17765 * Braces
17766 */
17767
17768 if (value === '{' && opts.nobrace !== true) {
17769 push({ type: 'brace', value, output: '(' });
17770 increment('braces');
17771 continue;
17772 }
17773
17774 if (value === '}') {
17775 if (opts.nobrace === true || state.braces === 0) {
17776 push({ type: 'text', value, output: '\\' + value });
17777 continue;
17778 }
17779
17780 let output = ')';
17781
17782 if (state.dots === true) {
17783 let arr = tokens.slice();
17784 let range = [];
17785
17786 for (let i = arr.length - 1; i >= 0; i--) {
17787 tokens.pop();
17788 if (arr[i].type === 'brace') {
17789 break;
17790 }
17791 if (arr[i].type !== 'dots') {
17792 range.unshift(arr[i].value);
17793 }
17794 }
17795
17796 output = expandRange(range, opts);
17797 state.backtrack = true;
17798 }
17799
17800 push({ type: 'brace', value, output });
17801 decrement('braces');
17802 continue;
17803 }
17804
17805 /**
17806 * Pipes
17807 */
17808
17809 if (value === '|') {
17810 if (extglobs.length > 0) {
17811 extglobs[extglobs.length - 1].conditions++;
17812 }
17813 push({ type: 'text', value });
17814 continue;
17815 }
17816
17817 /**
17818 * Commas
17819 */
17820
17821 if (value === ',') {
17822 let output = value;
17823
17824 if (state.braces > 0 && stack[stack.length - 1] === 'braces') {
17825 output = '|';
17826 }
17827
17828 push({ type: 'comma', value, output });
17829 continue;
17830 }
17831
17832 /**
17833 * Slashes
17834 */
17835
17836 if (value === '/') {
17837 // if the beginning of the glob is "./", advance the start
17838 // to the current index, and don't add the "./" characters
17839 // to the state. This greatly simplifies lookbehinds when
17840 // checking for BOS characters like "!" and "." (not "./")
17841 if (prev.type === 'dot' && state.index === 1) {
17842 state.start = state.index + 1;
17843 state.consumed = '';
17844 state.output = '';
17845 tokens.pop();
17846 prev = bos; // reset "prev" to the first token
17847 continue;
17848 }
17849
17850 push({ type: 'slash', value, output: SLASH_LITERAL });
17851 continue;
17852 }
17853
17854 /**
17855 * Dots
17856 */
17857
17858 if (value === '.') {
17859 if (state.braces > 0 && prev.type === 'dot') {
17860 if (prev.value === '.') prev.output = DOT_LITERAL;
17861 prev.type = 'dots';
17862 prev.output += value;
17863 prev.value += value;
17864 state.dots = true;
17865 continue;
17866 }
17867
17868 push({ type: 'dot', value, output: DOT_LITERAL });
17869 continue;
17870 }
17871
17872 /**
17873 * Question marks
17874 */
17875
17876 if (value === '?') {
17877 if (prev && prev.type === 'paren') {
17878 let next = peek();
17879 let output = value;
17880
17881 if (next === '<' && !utils.supportsLookbehinds()) {
17882 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
17883 }
17884
17885 if (prev.value === '(' && !/[!=<:]/.test(next) || (next === '<' && !/[!=]/.test(peek(2)))) {
17886 output = '\\' + value;
17887 }
17888
17889 push({ type: 'text', value, output });
17890 continue;
17891 }
17892
17893 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17894 extglobOpen('qmark', value);
17895 continue;
17896 }
17897
17898 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
17899 push({ type: 'qmark', value, output: QMARK_NO_DOT });
17900 continue;
17901 }
17902
17903 push({ type: 'qmark', value, output: QMARK });
17904 continue;
17905 }
17906
17907 /**
17908 * Exclamation
17909 */
17910
17911 if (value === '!') {
17912 if (opts.noextglob !== true && peek() === '(') {
17913 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
17914 extglobOpen('negate', value);
17915 continue;
17916 }
17917 }
17918
17919 if (opts.nonegate !== true && state.index === 0) {
17920 negate(state);
17921 continue;
17922 }
17923 }
17924
17925 /**
17926 * Plus
17927 */
17928
17929 if (value === '+') {
17930 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17931 extglobOpen('plus', value);
17932 continue;
17933 }
17934
17935 if (prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) {
17936 let output = prev.extglob === true ? '\\' + value : value;
17937 push({ type: 'plus', value, output });
17938 continue;
17939 }
17940
17941 // use regex behavior inside parens
17942 if (state.parens > 0 && opts.regex !== false) {
17943 push({ type: 'plus', value });
17944 continue;
17945 }
17946
17947 push({ type: 'plus', value: PLUS_LITERAL });
17948 continue;
17949 }
17950
17951 /**
17952 * Plain text
17953 */
17954
17955 if (value === '@') {
17956 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17957 push({ type: 'at', value, output: '' });
17958 continue;
17959 }
17960
17961 push({ type: 'text', value });
17962 continue;
17963 }
17964
17965 /**
17966 * Plain text
17967 */
17968
17969 if (value !== '*') {
17970 if (value === '$' || value === '^') {
17971 value = '\\' + value;
17972 }
17973
17974 let match = REGEX_NON_SPECIAL_CHAR.exec(input.slice(state.index + 1));
17975 if (match) {
17976 value += match[0];
17977 state.index += match[0].length;
17978 }
17979
17980 push({ type: 'text', value });
17981 continue;
17982 }
17983
17984 /**
17985 * Stars
17986 */
17987
17988 if (prev && (prev.type === 'globstar' || prev.star === true)) {
17989 prev.type = 'star';
17990 prev.star = true;
17991 prev.value += value;
17992 prev.output = star;
17993 state.backtrack = true;
17994 state.consumed += value;
17995 continue;
17996 }
17997
17998 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17999 extglobOpen('star', value);
18000 continue;
18001 }
18002
18003 if (prev.type === 'star') {
18004 if (opts.noglobstar === true) {
18005 state.consumed += value;
18006 continue;
18007 }
18008
18009 let prior = prev.prev;
18010 let before = prior.prev;
18011 let isStart = prior.type === 'slash' || prior.type === 'bos';
18012 let afterStar = before && (before.type === 'star' || before.type === 'globstar');
18013
18014 if (opts.bash === true && (!isStart || (!eos() && peek() !== '/'))) {
18015 push({ type: 'star', value, output: '' });
18016 continue;
18017 }
18018
18019 let isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
18020 let isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
18021 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
18022 push({ type: 'star', value, output: '' });
18023 continue;
18024 }
18025
18026 // strip consecutive `/**/`
18027 while (input.slice(state.index + 1, state.index + 4) === '/**') {
18028 let after = input[state.index + 4];
18029 if (after && after !== '/') {
18030 break;
18031 }
18032 state.consumed += '/**';
18033 state.index += 3;
18034 }
18035
18036 if (prior.type === 'bos' && eos()) {
18037 prev.type = 'globstar';
18038 prev.value += value;
18039 prev.output = globstar(opts);
18040 state.output = prev.output;
18041 state.consumed += value;
18042 continue;
18043 }
18044
18045 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
18046 state.output = state.output.slice(0, -(prior.output + prev.output).length);
18047 prior.output = '(?:' + prior.output;
18048
18049 prev.type = 'globstar';
18050 prev.output = globstar(opts) + '|$)';
18051 prev.value += value;
18052
18053 state.output += prior.output + prev.output;
18054 state.consumed += value;
18055 continue;
18056 }
18057
18058 let next = peek();
18059 if (prior.type === 'slash' && prior.prev.type !== 'bos' && next === '/') {
18060 let end = peek(2) !== void 0 ? '|$' : '';
18061
18062 state.output = state.output.slice(0, -(prior.output + prev.output).length);
18063 prior.output = '(?:' + prior.output;
18064
18065 prev.type = 'globstar';
18066 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
18067 prev.value += value;
18068
18069 state.output += prior.output + prev.output;
18070 state.consumed += value + advance();
18071
18072 push({ type: 'slash', value, output: '' });
18073 continue;
18074 }
18075
18076 if (prior.type === 'bos' && next === '/') {
18077 prev.type = 'globstar';
18078 prev.value += value;
18079 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
18080 state.output = prev.output;
18081 state.consumed += value + advance();
18082 push({ type: 'slash', value, output: '' });
18083 continue;
18084 }
18085
18086 // remove single star from output
18087 state.output = state.output.slice(0, -prev.output.length);
18088
18089 // reset previous token to globstar
18090 prev.type = 'globstar';
18091 prev.output = globstar(opts);
18092 prev.value += value;
18093
18094 // reset output with globstar
18095 state.output += prev.output;
18096 state.consumed += value;
18097 continue;
18098 }
18099
18100 let token = { type: 'star', value, output: star };
18101
18102 if (opts.bash === true) {
18103 token.output = '.*?';
18104 if (prev.type === 'bos' || prev.type === 'slash') {
18105 token.output = nodot + token.output;
18106 }
18107 push(token);
18108 continue;
18109 }
18110
18111 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
18112 token.output = value;
18113 push(token);
18114 continue;
18115 }
18116
18117 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
18118 if (prev.type === 'dot') {
18119 state.output += NO_DOT_SLASH;
18120 prev.output += NO_DOT_SLASH;
18121
18122 } else if (opts.dot === true) {
18123 state.output += NO_DOTS_SLASH;
18124 prev.output += NO_DOTS_SLASH;
18125
18126 } else {
18127 state.output += nodot;
18128 prev.output += nodot;
18129 }
18130
18131 if (peek() !== '*') {
18132 state.output += ONE_CHAR;
18133 prev.output += ONE_CHAR;
18134 }
18135 }
18136
18137 push(token);
18138 }
18139
18140 while (state.brackets > 0) {
18141 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
18142 state.output = utils.escapeLast(state.output, '[');
18143 decrement('brackets');
18144 }
18145
18146 while (state.parens > 0) {
18147 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
18148 state.output = utils.escapeLast(state.output, '(');
18149 decrement('parens');
18150 }
18151
18152 while (state.braces > 0) {
18153 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
18154 state.output = utils.escapeLast(state.output, '{');
18155 decrement('braces');
18156 }
18157
18158 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
18159 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
18160 }
18161
18162 // rebuild the output if we had to backtrack at any point
18163 if (state.backtrack === true) {
18164 state.output = '';
18165
18166 for (let token of state.tokens) {
18167 state.output += token.output != null ? token.output : token.value;
18168
18169 if (token.suffix) {
18170 state.output += token.suffix;
18171 }
18172 }
18173 }
18174
18175 return state;
18176};
18177
18178/**
18179 * Fast paths for creating regular expressions for common glob patterns.
18180 * This can significantly speed up processing and has very little downside
18181 * impact when none of the fast paths match.
18182 */
18183
18184parse.fastpaths = (input, options) => {
18185 let opts = { ...options };
18186 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
18187 let len = input.length;
18188 if (len > max) {
18189 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
18190 }
18191
18192 input = REPLACEMENTS[input] || input;
18193 let win32 = utils.isWindows(options);
18194
18195 // create constants based on platform, for windows or posix
18196 const {
18197 DOT_LITERAL,
18198 SLASH_LITERAL,
18199 ONE_CHAR,
18200 DOTS_SLASH,
18201 NO_DOT,
18202 NO_DOTS,
18203 NO_DOTS_SLASH,
18204 STAR,
18205 START_ANCHOR
18206 } = constants.globChars(win32);
18207
18208 let capture = opts.capture ? '' : '?:';
18209 let star = opts.bash === true ? '.*?' : STAR;
18210 let nodot = opts.dot ? NO_DOTS : NO_DOT;
18211 let slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
18212
18213 if (opts.capture) {
18214 star = `(${star})`;
18215 }
18216
18217 const globstar = (opts) => {
18218 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
18219 };
18220
18221 const create = str => {
18222 switch (str) {
18223 case '*':
18224 return `${nodot}${ONE_CHAR}${star}`;
18225
18226 case '.*':
18227 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
18228
18229 case '*.*':
18230 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
18231
18232 case '*/*':
18233 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
18234
18235 case '**':
18236 return nodot + globstar(opts);
18237
18238 case '**/*':
18239 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
18240
18241 case '**/*.*':
18242 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
18243
18244 case '**/.*':
18245 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
18246
18247 default: {
18248 let match = /^(.*?)\.(\w+)$/.exec(str);
18249 if (!match) return;
18250
18251 let source = create(match[1], options);
18252 if (!source) return;
18253
18254 return source + DOT_LITERAL + match[2];
18255 }
18256 }
18257 };
18258
18259 let output = create(input);
18260 if (output && opts.strictSlashes !== true) {
18261 output += `${SLASH_LITERAL}?`;
18262 }
18263
18264 return output;
18265};
18266
18267module.exports = parse;
18268
18269
18270/***/ }),
18271/* 88 */
18272/***/ (function(module, exports, __webpack_require__) {
18273
18274"use strict";
18275
18276
18277module.exports = __webpack_require__(89);
18278
18279
18280/***/ }),
18281/* 89 */
18282/***/ (function(module, exports, __webpack_require__) {
18283
18284"use strict";
18285
18286
18287const path = __webpack_require__(13);
18288const scan = __webpack_require__(90);
18289const parse = __webpack_require__(93);
18290const utils = __webpack_require__(91);
18291const constants = __webpack_require__(92);
18292const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
18293
18294/**
18295 * Creates a matcher function from one or more glob patterns. The
18296 * returned function takes a string to match as its first argument,
18297 * and returns true if the string is a match. The returned matcher
18298 * function also takes a boolean as the second argument that, when true,
18299 * returns an object with additional information.
18300 *
18301 * ```js
18302 * const picomatch = require('picomatch');
18303 * // picomatch(glob[, options]);
18304 *
18305 * const isMatch = picomatch('*.!(*a)');
18306 * console.log(isMatch('a.a')); //=> false
18307 * console.log(isMatch('a.b')); //=> true
18308 * ```
18309 * @name picomatch
18310 * @param {String|Array} `globs` One or more glob patterns.
18311 * @param {Object=} `options`
18312 * @return {Function=} Returns a matcher function.
18313 * @api public
18314 */
18315
18316const picomatch = (glob, options, returnState = false) => {
18317 if (Array.isArray(glob)) {
18318 const fns = glob.map(input => picomatch(input, options, returnState));
18319 const arrayMatcher = str => {
18320 for (const isMatch of fns) {
18321 const state = isMatch(str);
18322 if (state) return state;
18323 }
18324 return false;
18325 };
18326 return arrayMatcher;
18327 }
18328
18329 const isState = isObject(glob) && glob.tokens && glob.input;
18330
18331 if (glob === '' || (typeof glob !== 'string' && !isState)) {
18332 throw new TypeError('Expected pattern to be a non-empty string');
18333 }
18334
18335 const opts = options || {};
18336 const posix = utils.isWindows(options);
18337 const regex = isState
18338 ? picomatch.compileRe(glob, options)
18339 : picomatch.makeRe(glob, options, false, true);
18340
18341 const state = regex.state;
18342 delete regex.state;
18343
18344 let isIgnored = () => false;
18345 if (opts.ignore) {
18346 const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
18347 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
18348 }
18349
18350 const matcher = (input, returnObject = false) => {
18351 const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
18352 const result = { glob, state, regex, posix, input, output, match, isMatch };
18353
18354 if (typeof opts.onResult === 'function') {
18355 opts.onResult(result);
18356 }
18357
18358 if (isMatch === false) {
18359 result.isMatch = false;
18360 return returnObject ? result : false;
18361 }
18362
18363 if (isIgnored(input)) {
18364 if (typeof opts.onIgnore === 'function') {
18365 opts.onIgnore(result);
18366 }
18367 result.isMatch = false;
18368 return returnObject ? result : false;
18369 }
18370
18371 if (typeof opts.onMatch === 'function') {
18372 opts.onMatch(result);
18373 }
18374 return returnObject ? result : true;
18375 };
18376
18377 if (returnState) {
18378 matcher.state = state;
18379 }
18380
18381 return matcher;
18382};
18383
18384/**
18385 * Test `input` with the given `regex`. This is used by the main
18386 * `picomatch()` function to test the input string.
18387 *
18388 * ```js
18389 * const picomatch = require('picomatch');
18390 * // picomatch.test(input, regex[, options]);
18391 *
18392 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
18393 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
18394 * ```
18395 * @param {String} `input` String to test.
18396 * @param {RegExp} `regex`
18397 * @return {Object} Returns an object with matching info.
18398 * @api public
18399 */
18400
18401picomatch.test = (input, regex, options, { glob, posix } = {}) => {
18402 if (typeof input !== 'string') {
18403 throw new TypeError('Expected input to be a string');
18404 }
18405
18406 if (input === '') {
18407 return { isMatch: false, output: '' };
18408 }
18409
18410 const opts = options || {};
18411 const format = opts.format || (posix ? utils.toPosixSlashes : null);
18412 let match = input === glob;
18413 let output = (match && format) ? format(input) : input;
18414
18415 if (match === false) {
18416 output = format ? format(input) : input;
18417 match = output === glob;
18418 }
18419
18420 if (match === false || opts.capture === true) {
18421 if (opts.matchBase === true || opts.basename === true) {
18422 match = picomatch.matchBase(input, regex, options, posix);
18423 } else {
18424 match = regex.exec(output);
18425 }
18426 }
18427
18428 return { isMatch: Boolean(match), match, output };
18429};
18430
18431/**
18432 * Match the basename of a filepath.
18433 *
18434 * ```js
18435 * const picomatch = require('picomatch');
18436 * // picomatch.matchBase(input, glob[, options]);
18437 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
18438 * ```
18439 * @param {String} `input` String to test.
18440 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
18441 * @return {Boolean}
18442 * @api public
18443 */
18444
18445picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
18446 const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
18447 return regex.test(path.basename(input));
18448};
18449
18450/**
18451 * Returns true if **any** of the given glob `patterns` match the specified `string`.
18452 *
18453 * ```js
18454 * const picomatch = require('picomatch');
18455 * // picomatch.isMatch(string, patterns[, options]);
18456 *
18457 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
18458 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
18459 * ```
18460 * @param {String|Array} str The string to test.
18461 * @param {String|Array} patterns One or more glob patterns to use for matching.
18462 * @param {Object} [options] See available [options](#options).
18463 * @return {Boolean} Returns true if any patterns match `str`
18464 * @api public
18465 */
18466
18467picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
18468
18469/**
18470 * Parse a glob pattern to create the source string for a regular
18471 * expression.
18472 *
18473 * ```js
18474 * const picomatch = require('picomatch');
18475 * const result = picomatch.parse(pattern[, options]);
18476 * ```
18477 * @param {String} `pattern`
18478 * @param {Object} `options`
18479 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
18480 * @api public
18481 */
18482
18483picomatch.parse = (pattern, options) => {
18484 if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
18485 return parse(pattern, { ...options, fastpaths: false });
18486};
18487
18488/**
18489 * Scan a glob pattern to separate the pattern into segments.
18490 *
18491 * ```js
18492 * const picomatch = require('picomatch');
18493 * // picomatch.scan(input[, options]);
18494 *
18495 * const result = picomatch.scan('!./foo/*.js');
18496 * console.log(result);
18497 * { prefix: '!./',
18498 * input: '!./foo/*.js',
18499 * start: 3,
18500 * base: 'foo',
18501 * glob: '*.js',
18502 * isBrace: false,
18503 * isBracket: false,
18504 * isGlob: true,
18505 * isExtglob: false,
18506 * isGlobstar: false,
18507 * negated: true }
18508 * ```
18509 * @param {String} `input` Glob pattern to scan.
18510 * @param {Object} `options`
18511 * @return {Object} Returns an object with
18512 * @api public
18513 */
18514
18515picomatch.scan = (input, options) => scan(input, options);
18516
18517/**
18518 * Create a regular expression from a parsed glob pattern.
18519 *
18520 * ```js
18521 * const picomatch = require('picomatch');
18522 * const state = picomatch.parse('*.js');
18523 * // picomatch.compileRe(state[, options]);
18524 *
18525 * console.log(picomatch.compileRe(state));
18526 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
18527 * ```
18528 * @param {String} `state` The object returned from the `.parse` method.
18529 * @param {Object} `options`
18530 * @return {RegExp} Returns a regex created from the given pattern.
18531 * @api public
18532 */
18533
18534picomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {
18535 if (returnOutput === true) {
18536 return parsed.output;
18537 }
18538
18539 const opts = options || {};
18540 const prepend = opts.contains ? '' : '^';
18541 const append = opts.contains ? '' : '$';
18542
18543 let source = `${prepend}(?:${parsed.output})${append}`;
18544 if (parsed && parsed.negated === true) {
18545 source = `^(?!${source}).*$`;
18546 }
18547
18548 const regex = picomatch.toRegex(source, options);
18549 if (returnState === true) {
18550 regex.state = parsed;
18551 }
18552
18553 return regex;
18554};
18555
18556picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
18557 if (!input || typeof input !== 'string') {
18558 throw new TypeError('Expected a non-empty string');
18559 }
18560
18561 const opts = options || {};
18562 let parsed = { negated: false, fastpaths: true };
18563 let prefix = '';
18564 let output;
18565
18566 if (input.startsWith('./')) {
18567 input = input.slice(2);
18568 prefix = parsed.prefix = './';
18569 }
18570
18571 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
18572 output = parse.fastpaths(input, options);
18573 }
18574
18575 if (output === undefined) {
18576 parsed = parse(input, options);
18577 parsed.prefix = prefix + (parsed.prefix || '');
18578 } else {
18579 parsed.output = output;
18580 }
18581
18582 return picomatch.compileRe(parsed, options, returnOutput, returnState);
18583};
18584
18585/**
18586 * Create a regular expression from the given regex source string.
18587 *
18588 * ```js
18589 * const picomatch = require('picomatch');
18590 * // picomatch.toRegex(source[, options]);
18591 *
18592 * const { output } = picomatch.parse('*.js');
18593 * console.log(picomatch.toRegex(output));
18594 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
18595 * ```
18596 * @param {String} `source` Regular expression source string.
18597 * @param {Object} `options`
18598 * @return {RegExp}
18599 * @api public
18600 */
18601
18602picomatch.toRegex = (source, options) => {
18603 try {
18604 const opts = options || {};
18605 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
18606 } catch (err) {
18607 if (options && options.debug === true) throw err;
18608 return /$^/;
18609 }
18610};
18611
18612/**
18613 * Picomatch constants.
18614 * @return {Object}
18615 */
18616
18617picomatch.constants = constants;
18618
18619/**
18620 * Expose "picomatch"
18621 */
18622
18623module.exports = picomatch;
18624
18625
18626/***/ }),
18627/* 90 */
18628/***/ (function(module, exports, __webpack_require__) {
18629
18630"use strict";
18631
18632
18633const utils = __webpack_require__(91);
18634const {
18635 CHAR_ASTERISK, /* * */
18636 CHAR_AT, /* @ */
18637 CHAR_BACKWARD_SLASH, /* \ */
18638 CHAR_COMMA, /* , */
18639 CHAR_DOT, /* . */
18640 CHAR_EXCLAMATION_MARK, /* ! */
18641 CHAR_FORWARD_SLASH, /* / */
18642 CHAR_LEFT_CURLY_BRACE, /* { */
18643 CHAR_LEFT_PARENTHESES, /* ( */
18644 CHAR_LEFT_SQUARE_BRACKET, /* [ */
18645 CHAR_PLUS, /* + */
18646 CHAR_QUESTION_MARK, /* ? */
18647 CHAR_RIGHT_CURLY_BRACE, /* } */
18648 CHAR_RIGHT_PARENTHESES, /* ) */
18649 CHAR_RIGHT_SQUARE_BRACKET /* ] */
18650} = __webpack_require__(92);
18651
18652const isPathSeparator = code => {
18653 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
18654};
18655
18656const depth = token => {
18657 if (token.isPrefix !== true) {
18658 token.depth = token.isGlobstar ? Infinity : 1;
18659 }
18660};
18661
18662/**
18663 * Quickly scans a glob pattern and returns an object with a handful of
18664 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
18665 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
18666 *
18667 * ```js
18668 * const pm = require('picomatch');
18669 * console.log(pm.scan('foo/bar/*.js'));
18670 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
18671 * ```
18672 * @param {String} `str`
18673 * @param {Object} `options`
18674 * @return {Object} Returns an object with tokens and regex source string.
18675 * @api public
18676 */
18677
18678const scan = (input, options) => {
18679 const opts = options || {};
18680
18681 const length = input.length - 1;
18682 const scanToEnd = opts.parts === true || opts.scanToEnd === true;
18683 const slashes = [];
18684 const tokens = [];
18685 const parts = [];
18686
18687 let str = input;
18688 let index = -1;
18689 let start = 0;
18690 let lastIndex = 0;
18691 let isBrace = false;
18692 let isBracket = false;
18693 let isGlob = false;
18694 let isExtglob = false;
18695 let isGlobstar = false;
18696 let braceEscaped = false;
18697 let backslashes = false;
18698 let negated = false;
18699 let finished = false;
18700 let braces = 0;
18701 let prev;
18702 let code;
18703 let token = { value: '', depth: 0, isGlob: false };
18704
18705 const eos = () => index >= length;
18706 const peek = () => str.charCodeAt(index + 1);
18707 const advance = () => {
18708 prev = code;
18709 return str.charCodeAt(++index);
18710 };
18711
18712 while (index < length) {
18713 code = advance();
18714 let next;
18715
18716 if (code === CHAR_BACKWARD_SLASH) {
18717 backslashes = token.backslashes = true;
18718 code = advance();
18719
18720 if (code === CHAR_LEFT_CURLY_BRACE) {
18721 braceEscaped = true;
18722 }
18723 continue;
18724 }
18725
18726 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
18727 braces++;
18728
18729 while (eos() !== true && (code = advance())) {
18730 if (code === CHAR_BACKWARD_SLASH) {
18731 backslashes = token.backslashes = true;
18732 advance();
18733 continue;
18734 }
18735
18736 if (code === CHAR_LEFT_CURLY_BRACE) {
18737 braces++;
18738 continue;
18739 }
18740
18741 if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
18742 isBrace = token.isBrace = true;
18743 isGlob = token.isGlob = true;
18744 finished = true;
18745
18746 if (scanToEnd === true) {
18747 continue;
18748 }
18749
18750 break;
18751 }
18752
18753 if (braceEscaped !== true && code === CHAR_COMMA) {
18754 isBrace = token.isBrace = true;
18755 isGlob = token.isGlob = true;
18756 finished = true;
18757
18758 if (scanToEnd === true) {
18759 continue;
18760 }
18761
18762 break;
18763 }
18764
18765 if (code === CHAR_RIGHT_CURLY_BRACE) {
18766 braces--;
18767
18768 if (braces === 0) {
18769 braceEscaped = false;
18770 isBrace = token.isBrace = true;
18771 finished = true;
18772 break;
18773 }
18774 }
18775 }
18776
18777 if (scanToEnd === true) {
18778 continue;
18779 }
18780
18781 break;
18782 }
18783
18784 if (code === CHAR_FORWARD_SLASH) {
18785 slashes.push(index);
18786 tokens.push(token);
18787 token = { value: '', depth: 0, isGlob: false };
18788
18789 if (finished === true) continue;
18790 if (prev === CHAR_DOT && index === (start + 1)) {
18791 start += 2;
18792 continue;
18793 }
18794
18795 lastIndex = index + 1;
18796 continue;
18797 }
18798
18799 if (opts.noext !== true) {
18800 const isExtglobChar = code === CHAR_PLUS
18801 || code === CHAR_AT
18802 || code === CHAR_ASTERISK
18803 || code === CHAR_QUESTION_MARK
18804 || code === CHAR_EXCLAMATION_MARK;
18805
18806 if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
18807 isGlob = token.isGlob = true;
18808 isExtglob = token.isExtglob = true;
18809 finished = true;
18810
18811 if (scanToEnd === true) {
18812 while (eos() !== true && (code = advance())) {
18813 if (code === CHAR_BACKWARD_SLASH) {
18814 backslashes = token.backslashes = true;
18815 code = advance();
18816 continue;
18817 }
18818
18819 if (code === CHAR_RIGHT_PARENTHESES) {
18820 isGlob = token.isGlob = true;
18821 finished = true;
18822 break;
18823 }
18824 }
18825 continue;
18826 }
18827 break;
18828 }
18829 }
18830
18831 if (code === CHAR_ASTERISK) {
18832 if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
18833 isGlob = token.isGlob = true;
18834 finished = true;
18835
18836 if (scanToEnd === true) {
18837 continue;
18838 }
18839 break;
18840 }
18841
18842 if (code === CHAR_QUESTION_MARK) {
18843 isGlob = token.isGlob = true;
18844 finished = true;
18845
18846 if (scanToEnd === true) {
18847 continue;
18848 }
18849 break;
18850 }
18851
18852 if (code === CHAR_LEFT_SQUARE_BRACKET) {
18853 while (eos() !== true && (next = advance())) {
18854 if (next === CHAR_BACKWARD_SLASH) {
18855 backslashes = token.backslashes = true;
18856 advance();
18857 continue;
18858 }
18859
18860 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
18861 isBracket = token.isBracket = true;
18862 isGlob = token.isGlob = true;
18863 finished = true;
18864
18865 if (scanToEnd === true) {
18866 continue;
18867 }
18868 break;
18869 }
18870 }
18871 }
18872
18873 if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
18874 negated = token.negated = true;
18875 start++;
18876 continue;
18877 }
18878
18879 if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
18880 isGlob = token.isGlob = true;
18881
18882 if (scanToEnd === true) {
18883 while (eos() !== true && (code = advance())) {
18884 if (code === CHAR_LEFT_PARENTHESES) {
18885 backslashes = token.backslashes = true;
18886 code = advance();
18887 continue;
18888 }
18889
18890 if (code === CHAR_RIGHT_PARENTHESES) {
18891 finished = true;
18892 break;
18893 }
18894 }
18895 continue;
18896 }
18897 break;
18898 }
18899
18900 if (isGlob === true) {
18901 finished = true;
18902
18903 if (scanToEnd === true) {
18904 continue;
18905 }
18906
18907 break;
18908 }
18909 }
18910
18911 if (opts.noext === true) {
18912 isExtglob = false;
18913 isGlob = false;
18914 }
18915
18916 let base = str;
18917 let prefix = '';
18918 let glob = '';
18919
18920 if (start > 0) {
18921 prefix = str.slice(0, start);
18922 str = str.slice(start);
18923 lastIndex -= start;
18924 }
18925
18926 if (base && isGlob === true && lastIndex > 0) {
18927 base = str.slice(0, lastIndex);
18928 glob = str.slice(lastIndex);
18929 } else if (isGlob === true) {
18930 base = '';
18931 glob = str;
18932 } else {
18933 base = str;
18934 }
18935
18936 if (base && base !== '' && base !== '/' && base !== str) {
18937 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
18938 base = base.slice(0, -1);
18939 }
18940 }
18941
18942 if (opts.unescape === true) {
18943 if (glob) glob = utils.removeBackslashes(glob);
18944
18945 if (base && backslashes === true) {
18946 base = utils.removeBackslashes(base);
18947 }
18948 }
18949
18950 const state = {
18951 prefix,
18952 input,
18953 start,
18954 base,
18955 glob,
18956 isBrace,
18957 isBracket,
18958 isGlob,
18959 isExtglob,
18960 isGlobstar,
18961 negated
18962 };
18963
18964 if (opts.tokens === true) {
18965 state.maxDepth = 0;
18966 if (!isPathSeparator(code)) {
18967 tokens.push(token);
18968 }
18969 state.tokens = tokens;
18970 }
18971
18972 if (opts.parts === true || opts.tokens === true) {
18973 let prevIndex;
18974
18975 for (let idx = 0; idx < slashes.length; idx++) {
18976 const n = prevIndex ? prevIndex + 1 : start;
18977 const i = slashes[idx];
18978 const value = input.slice(n, i);
18979 if (opts.tokens) {
18980 if (idx === 0 && start !== 0) {
18981 tokens[idx].isPrefix = true;
18982 tokens[idx].value = prefix;
18983 } else {
18984 tokens[idx].value = value;
18985 }
18986 depth(tokens[idx]);
18987 state.maxDepth += tokens[idx].depth;
18988 }
18989 if (idx !== 0 || value !== '') {
18990 parts.push(value);
18991 }
18992 prevIndex = i;
18993 }
18994
18995 if (prevIndex && prevIndex + 1 < input.length) {
18996 const value = input.slice(prevIndex + 1);
18997 parts.push(value);
18998
18999 if (opts.tokens) {
19000 tokens[tokens.length - 1].value = value;
19001 depth(tokens[tokens.length - 1]);
19002 state.maxDepth += tokens[tokens.length - 1].depth;
19003 }
19004 }
19005
19006 state.slashes = slashes;
19007 state.parts = parts;
19008 }
19009
19010 return state;
19011};
19012
19013module.exports = scan;
19014
19015
19016/***/ }),
19017/* 91 */
19018/***/ (function(module, exports, __webpack_require__) {
19019
19020"use strict";
19021
19022
19023const path = __webpack_require__(13);
19024const win32 = process.platform === 'win32';
19025const {
19026 REGEX_BACKSLASH,
19027 REGEX_REMOVE_BACKSLASH,
19028 REGEX_SPECIAL_CHARS,
19029 REGEX_SPECIAL_CHARS_GLOBAL
19030} = __webpack_require__(92);
19031
19032exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
19033exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
19034exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
19035exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
19036exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
19037
19038exports.removeBackslashes = str => {
19039 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
19040 return match === '\\' ? '' : match;
19041 });
19042};
19043
19044exports.supportsLookbehinds = () => {
19045 const segs = process.version.slice(1).split('.').map(Number);
19046 if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
19047 return true;
19048 }
19049 return false;
19050};
19051
19052exports.isWindows = options => {
19053 if (options && typeof options.windows === 'boolean') {
19054 return options.windows;
19055 }
19056 return win32 === true || path.sep === '\\';
19057};
19058
19059exports.escapeLast = (input, char, lastIdx) => {
19060 const idx = input.lastIndexOf(char, lastIdx);
19061 if (idx === -1) return input;
19062 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
19063 return `${input.slice(0, idx)}\\${input.slice(idx)}`;
19064};
19065
19066exports.removePrefix = (input, state = {}) => {
19067 let output = input;
19068 if (output.startsWith('./')) {
19069 output = output.slice(2);
19070 state.prefix = './';
19071 }
19072 return output;
19073};
19074
19075exports.wrapOutput = (input, state = {}, options = {}) => {
19076 const prepend = options.contains ? '' : '^';
19077 const append = options.contains ? '' : '$';
19078
19079 let output = `${prepend}(?:${input})${append}`;
19080 if (state.negated === true) {
19081 output = `(?:^(?!${output}).*$)`;
19082 }
19083 return output;
19084};
19085
19086
19087/***/ }),
19088/* 92 */
19089/***/ (function(module, exports, __webpack_require__) {
19090
19091"use strict";
19092
19093
19094const path = __webpack_require__(13);
19095const WIN_SLASH = '\\\\/';
19096const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
19097
19098/**
19099 * Posix glob regex
19100 */
19101
19102const DOT_LITERAL = '\\.';
19103const PLUS_LITERAL = '\\+';
19104const QMARK_LITERAL = '\\?';
19105const SLASH_LITERAL = '\\/';
19106const ONE_CHAR = '(?=.)';
19107const QMARK = '[^/]';
19108const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
19109const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
19110const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
19111const NO_DOT = `(?!${DOT_LITERAL})`;
19112const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
19113const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
19114const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
19115const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
19116const STAR = `${QMARK}*?`;
19117
19118const POSIX_CHARS = {
19119 DOT_LITERAL,
19120 PLUS_LITERAL,
19121 QMARK_LITERAL,
19122 SLASH_LITERAL,
19123 ONE_CHAR,
19124 QMARK,
19125 END_ANCHOR,
19126 DOTS_SLASH,
19127 NO_DOT,
19128 NO_DOTS,
19129 NO_DOT_SLASH,
19130 NO_DOTS_SLASH,
19131 QMARK_NO_DOT,
19132 STAR,
19133 START_ANCHOR
19134};
19135
19136/**
19137 * Windows glob regex
19138 */
19139
19140const WINDOWS_CHARS = {
19141 ...POSIX_CHARS,
19142
19143 SLASH_LITERAL: `[${WIN_SLASH}]`,
19144 QMARK: WIN_NO_SLASH,
19145 STAR: `${WIN_NO_SLASH}*?`,
19146 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
19147 NO_DOT: `(?!${DOT_LITERAL})`,
19148 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
19149 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
19150 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
19151 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
19152 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
19153 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
19154};
19155
19156/**
19157 * POSIX Bracket Regex
19158 */
19159
19160const POSIX_REGEX_SOURCE = {
19161 alnum: 'a-zA-Z0-9',
19162 alpha: 'a-zA-Z',
19163 ascii: '\\x00-\\x7F',
19164 blank: ' \\t',
19165 cntrl: '\\x00-\\x1F\\x7F',
19166 digit: '0-9',
19167 graph: '\\x21-\\x7E',
19168 lower: 'a-z',
19169 print: '\\x20-\\x7E ',
19170 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
19171 space: ' \\t\\r\\n\\v\\f',
19172 upper: 'A-Z',
19173 word: 'A-Za-z0-9_',
19174 xdigit: 'A-Fa-f0-9'
19175};
19176
19177module.exports = {
19178 MAX_LENGTH: 1024 * 64,
19179 POSIX_REGEX_SOURCE,
19180
19181 // regular expressions
19182 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
19183 REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
19184 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
19185 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
19186 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
19187 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
19188
19189 // Replace globs with equivalent patterns to reduce parsing time.
19190 REPLACEMENTS: {
19191 '***': '*',
19192 '**/**': '**',
19193 '**/**/**': '**'
19194 },
19195
19196 // Digits
19197 CHAR_0: 48, /* 0 */
19198 CHAR_9: 57, /* 9 */
19199
19200 // Alphabet chars.
19201 CHAR_UPPERCASE_A: 65, /* A */
19202 CHAR_LOWERCASE_A: 97, /* a */
19203 CHAR_UPPERCASE_Z: 90, /* Z */
19204 CHAR_LOWERCASE_Z: 122, /* z */
19205
19206 CHAR_LEFT_PARENTHESES: 40, /* ( */
19207 CHAR_RIGHT_PARENTHESES: 41, /* ) */
19208
19209 CHAR_ASTERISK: 42, /* * */
19210
19211 // Non-alphabetic chars.
19212 CHAR_AMPERSAND: 38, /* & */
19213 CHAR_AT: 64, /* @ */
19214 CHAR_BACKWARD_SLASH: 92, /* \ */
19215 CHAR_CARRIAGE_RETURN: 13, /* \r */
19216 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
19217 CHAR_COLON: 58, /* : */
19218 CHAR_COMMA: 44, /* , */
19219 CHAR_DOT: 46, /* . */
19220 CHAR_DOUBLE_QUOTE: 34, /* " */
19221 CHAR_EQUAL: 61, /* = */
19222 CHAR_EXCLAMATION_MARK: 33, /* ! */
19223 CHAR_FORM_FEED: 12, /* \f */
19224 CHAR_FORWARD_SLASH: 47, /* / */
19225 CHAR_GRAVE_ACCENT: 96, /* ` */
19226 CHAR_HASH: 35, /* # */
19227 CHAR_HYPHEN_MINUS: 45, /* - */
19228 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
19229 CHAR_LEFT_CURLY_BRACE: 123, /* { */
19230 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
19231 CHAR_LINE_FEED: 10, /* \n */
19232 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
19233 CHAR_PERCENT: 37, /* % */
19234 CHAR_PLUS: 43, /* + */
19235 CHAR_QUESTION_MARK: 63, /* ? */
19236 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
19237 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
19238 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
19239 CHAR_SEMICOLON: 59, /* ; */
19240 CHAR_SINGLE_QUOTE: 39, /* ' */
19241 CHAR_SPACE: 32, /* */
19242 CHAR_TAB: 9, /* \t */
19243 CHAR_UNDERSCORE: 95, /* _ */
19244 CHAR_VERTICAL_LINE: 124, /* | */
19245 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
19246
19247 SEP: path.sep,
19248
19249 /**
19250 * Create EXTGLOB_CHARS
19251 */
19252
19253 extglobChars(chars) {
19254 return {
19255 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
19256 '?': { type: 'qmark', open: '(?:', close: ')?' },
19257 '+': { type: 'plus', open: '(?:', close: ')+' },
19258 '*': { type: 'star', open: '(?:', close: ')*' },
19259 '@': { type: 'at', open: '(?:', close: ')' }
19260 };
19261 },
19262
19263 /**
19264 * Create GLOB_CHARS
19265 */
19266
19267 globChars(win32) {
19268 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
19269 }
19270};
19271
19272
19273/***/ }),
19274/* 93 */
19275/***/ (function(module, exports, __webpack_require__) {
19276
19277"use strict";
19278
19279
19280const constants = __webpack_require__(92);
19281const utils = __webpack_require__(91);
19282
19283/**
19284 * Constants
19285 */
19286
19287const {
19288 MAX_LENGTH,
19289 POSIX_REGEX_SOURCE,
19290 REGEX_NON_SPECIAL_CHARS,
19291 REGEX_SPECIAL_CHARS_BACKREF,
19292 REPLACEMENTS
19293} = constants;
19294
19295/**
19296 * Helpers
19297 */
19298
19299const expandRange = (args, options) => {
19300 if (typeof options.expandRange === 'function') {
19301 return options.expandRange(...args, options);
19302 }
19303
19304 args.sort();
19305 const value = `[${args.join('-')}]`;
19306
19307 try {
19308 /* eslint-disable-next-line no-new */
19309 new RegExp(value);
19310 } catch (ex) {
19311 return args.map(v => utils.escapeRegex(v)).join('..');
19312 }
19313
19314 return value;
19315};
19316
19317/**
19318 * Create the message for a syntax error
19319 */
19320
19321const syntaxError = (type, char) => {
19322 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
19323};
19324
19325/**
19326 * Parse the given input string.
19327 * @param {String} input
19328 * @param {Object} options
19329 * @return {Object}
19330 */
19331
19332const parse = (input, options) => {
19333 if (typeof input !== 'string') {
19334 throw new TypeError('Expected a string');
19335 }
19336
19337 input = REPLACEMENTS[input] || input;
19338
19339 const opts = { ...options };
19340 const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
19341
19342 let len = input.length;
19343 if (len > max) {
19344 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
19345 }
19346
19347 const bos = { type: 'bos', value: '', output: opts.prepend || '' };
19348 const tokens = [bos];
19349
19350 const capture = opts.capture ? '' : '?:';
19351 const win32 = utils.isWindows(options);
19352
19353 // create constants based on platform, for windows or posix
19354 const PLATFORM_CHARS = constants.globChars(win32);
19355 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
19356
19357 const {
19358 DOT_LITERAL,
19359 PLUS_LITERAL,
19360 SLASH_LITERAL,
19361 ONE_CHAR,
19362 DOTS_SLASH,
19363 NO_DOT,
19364 NO_DOT_SLASH,
19365 NO_DOTS_SLASH,
19366 QMARK,
19367 QMARK_NO_DOT,
19368 STAR,
19369 START_ANCHOR
19370 } = PLATFORM_CHARS;
19371
19372 const globstar = (opts) => {
19373 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
19374 };
19375
19376 const nodot = opts.dot ? '' : NO_DOT;
19377 const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
19378 let star = opts.bash === true ? globstar(opts) : STAR;
19379
19380 if (opts.capture) {
19381 star = `(${star})`;
19382 }
19383
19384 // minimatch options support
19385 if (typeof opts.noext === 'boolean') {
19386 opts.noextglob = opts.noext;
19387 }
19388
19389 const state = {
19390 input,
19391 index: -1,
19392 start: 0,
19393 dot: opts.dot === true,
19394 consumed: '',
19395 output: '',
19396 prefix: '',
19397 backtrack: false,
19398 negated: false,
19399 brackets: 0,
19400 braces: 0,
19401 parens: 0,
19402 quotes: 0,
19403 globstar: false,
19404 tokens
19405 };
19406
19407 input = utils.removePrefix(input, state);
19408 len = input.length;
19409
19410 const extglobs = [];
19411 const braces = [];
19412 const stack = [];
19413 let prev = bos;
19414 let value;
19415
19416 /**
19417 * Tokenizing helpers
19418 */
19419
19420 const eos = () => state.index === len - 1;
19421 const peek = state.peek = (n = 1) => input[state.index + n];
19422 const advance = state.advance = () => input[++state.index];
19423 const remaining = () => input.slice(state.index + 1);
19424 const consume = (value = '', num = 0) => {
19425 state.consumed += value;
19426 state.index += num;
19427 };
19428 const append = token => {
19429 state.output += token.output != null ? token.output : token.value;
19430 consume(token.value);
19431 };
19432
19433 const negate = () => {
19434 let count = 1;
19435
19436 while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
19437 advance();
19438 state.start++;
19439 count++;
19440 }
19441
19442 if (count % 2 === 0) {
19443 return false;
19444 }
19445
19446 state.negated = true;
19447 state.start++;
19448 return true;
19449 };
19450
19451 const increment = type => {
19452 state[type]++;
19453 stack.push(type);
19454 };
19455
19456 const decrement = type => {
19457 state[type]--;
19458 stack.pop();
19459 };
19460
19461 /**
19462 * Push tokens onto the tokens array. This helper speeds up
19463 * tokenizing by 1) helping us avoid backtracking as much as possible,
19464 * and 2) helping us avoid creating extra tokens when consecutive
19465 * characters are plain text. This improves performance and simplifies
19466 * lookbehinds.
19467 */
19468
19469 const push = tok => {
19470 if (prev.type === 'globstar') {
19471 const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
19472 const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
19473
19474 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
19475 state.output = state.output.slice(0, -prev.output.length);
19476 prev.type = 'star';
19477 prev.value = '*';
19478 prev.output = star;
19479 state.output += prev.output;
19480 }
19481 }
19482
19483 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
19484 extglobs[extglobs.length - 1].inner += tok.value;
19485 }
19486
19487 if (tok.value || tok.output) append(tok);
19488 if (prev && prev.type === 'text' && tok.type === 'text') {
19489 prev.value += tok.value;
19490 prev.output = (prev.output || '') + tok.value;
19491 return;
19492 }
19493
19494 tok.prev = prev;
19495 tokens.push(tok);
19496 prev = tok;
19497 };
19498
19499 const extglobOpen = (type, value) => {
19500 const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
19501
19502 token.prev = prev;
19503 token.parens = state.parens;
19504 token.output = state.output;
19505 const output = (opts.capture ? '(' : '') + token.open;
19506
19507 increment('parens');
19508 push({ type, value, output: state.output ? '' : ONE_CHAR });
19509 push({ type: 'paren', extglob: true, value: advance(), output });
19510 extglobs.push(token);
19511 };
19512
19513 const extglobClose = token => {
19514 let output = token.close + (opts.capture ? ')' : '');
19515
19516 if (token.type === 'negate') {
19517 let extglobStar = star;
19518
19519 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
19520 extglobStar = globstar(opts);
19521 }
19522
19523 if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
19524 output = token.close = `)$))${extglobStar}`;
19525 }
19526
19527 if (token.prev.type === 'bos' && eos()) {
19528 state.negatedExtglob = true;
19529 }
19530 }
19531
19532 push({ type: 'paren', extglob: true, value, output });
19533 decrement('parens');
19534 };
19535
19536 /**
19537 * Fast paths
19538 */
19539
19540 if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
19541 let backslashes = false;
19542
19543 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
19544 if (first === '\\') {
19545 backslashes = true;
19546 return m;
19547 }
19548
19549 if (first === '?') {
19550 if (esc) {
19551 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
19552 }
19553 if (index === 0) {
19554 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
19555 }
19556 return QMARK.repeat(chars.length);
19557 }
19558
19559 if (first === '.') {
19560 return DOT_LITERAL.repeat(chars.length);
19561 }
19562
19563 if (first === '*') {
19564 if (esc) {
19565 return esc + first + (rest ? star : '');
19566 }
19567 return star;
19568 }
19569 return esc ? m : `\\${m}`;
19570 });
19571
19572 if (backslashes === true) {
19573 if (opts.unescape === true) {
19574 output = output.replace(/\\/g, '');
19575 } else {
19576 output = output.replace(/\\+/g, m => {
19577 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
19578 });
19579 }
19580 }
19581
19582 if (output === input && opts.contains === true) {
19583 state.output = input;
19584 return state;
19585 }
19586
19587 state.output = utils.wrapOutput(output, state, options);
19588 return state;
19589 }
19590
19591 /**
19592 * Tokenize input until we reach end-of-string
19593 */
19594
19595 while (!eos()) {
19596 value = advance();
19597
19598 if (value === '\u0000') {
19599 continue;
19600 }
19601
19602 /**
19603 * Escaped characters
19604 */
19605
19606 if (value === '\\') {
19607 const next = peek();
19608
19609 if (next === '/' && opts.bash !== true) {
19610 continue;
19611 }
19612
19613 if (next === '.' || next === ';') {
19614 continue;
19615 }
19616
19617 if (!next) {
19618 value += '\\';
19619 push({ type: 'text', value });
19620 continue;
19621 }
19622
19623 // collapse slashes to reduce potential for exploits
19624 const match = /^\\+/.exec(remaining());
19625 let slashes = 0;
19626
19627 if (match && match[0].length > 2) {
19628 slashes = match[0].length;
19629 state.index += slashes;
19630 if (slashes % 2 !== 0) {
19631 value += '\\';
19632 }
19633 }
19634
19635 if (opts.unescape === true) {
19636 value = advance() || '';
19637 } else {
19638 value += advance() || '';
19639 }
19640
19641 if (state.brackets === 0) {
19642 push({ type: 'text', value });
19643 continue;
19644 }
19645 }
19646
19647 /**
19648 * If we're inside a regex character class, continue
19649 * until we reach the closing bracket.
19650 */
19651
19652 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
19653 if (opts.posix !== false && value === ':') {
19654 const inner = prev.value.slice(1);
19655 if (inner.includes('[')) {
19656 prev.posix = true;
19657
19658 if (inner.includes(':')) {
19659 const idx = prev.value.lastIndexOf('[');
19660 const pre = prev.value.slice(0, idx);
19661 const rest = prev.value.slice(idx + 2);
19662 const posix = POSIX_REGEX_SOURCE[rest];
19663 if (posix) {
19664 prev.value = pre + posix;
19665 state.backtrack = true;
19666 advance();
19667
19668 if (!bos.output && tokens.indexOf(prev) === 1) {
19669 bos.output = ONE_CHAR;
19670 }
19671 continue;
19672 }
19673 }
19674 }
19675 }
19676
19677 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
19678 value = `\\${value}`;
19679 }
19680
19681 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
19682 value = `\\${value}`;
19683 }
19684
19685 if (opts.posix === true && value === '!' && prev.value === '[') {
19686 value = '^';
19687 }
19688
19689 prev.value += value;
19690 append({ value });
19691 continue;
19692 }
19693
19694 /**
19695 * If we're inside a quoted string, continue
19696 * until we reach the closing double quote.
19697 */
19698
19699 if (state.quotes === 1 && value !== '"') {
19700 value = utils.escapeRegex(value);
19701 prev.value += value;
19702 append({ value });
19703 continue;
19704 }
19705
19706 /**
19707 * Double quotes
19708 */
19709
19710 if (value === '"') {
19711 state.quotes = state.quotes === 1 ? 0 : 1;
19712 if (opts.keepQuotes === true) {
19713 push({ type: 'text', value });
19714 }
19715 continue;
19716 }
19717
19718 /**
19719 * Parentheses
19720 */
19721
19722 if (value === '(') {
19723 increment('parens');
19724 push({ type: 'paren', value });
19725 continue;
19726 }
19727
19728 if (value === ')') {
19729 if (state.parens === 0 && opts.strictBrackets === true) {
19730 throw new SyntaxError(syntaxError('opening', '('));
19731 }
19732
19733 const extglob = extglobs[extglobs.length - 1];
19734 if (extglob && state.parens === extglob.parens + 1) {
19735 extglobClose(extglobs.pop());
19736 continue;
19737 }
19738
19739 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
19740 decrement('parens');
19741 continue;
19742 }
19743
19744 /**
19745 * Square brackets
19746 */
19747
19748 if (value === '[') {
19749 if (opts.nobracket === true || !remaining().includes(']')) {
19750 if (opts.nobracket !== true && opts.strictBrackets === true) {
19751 throw new SyntaxError(syntaxError('closing', ']'));
19752 }
19753
19754 value = `\\${value}`;
19755 } else {
19756 increment('brackets');
19757 }
19758
19759 push({ type: 'bracket', value });
19760 continue;
19761 }
19762
19763 if (value === ']') {
19764 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
19765 push({ type: 'text', value, output: `\\${value}` });
19766 continue;
19767 }
19768
19769 if (state.brackets === 0) {
19770 if (opts.strictBrackets === true) {
19771 throw new SyntaxError(syntaxError('opening', '['));
19772 }
19773
19774 push({ type: 'text', value, output: `\\${value}` });
19775 continue;
19776 }
19777
19778 decrement('brackets');
19779
19780 const prevValue = prev.value.slice(1);
19781 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
19782 value = `/${value}`;
19783 }
19784
19785 prev.value += value;
19786 append({ value });
19787
19788 // when literal brackets are explicitly disabled
19789 // assume we should match with a regex character class
19790 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
19791 continue;
19792 }
19793
19794 const escaped = utils.escapeRegex(prev.value);
19795 state.output = state.output.slice(0, -prev.value.length);
19796
19797 // when literal brackets are explicitly enabled
19798 // assume we should escape the brackets to match literal characters
19799 if (opts.literalBrackets === true) {
19800 state.output += escaped;
19801 prev.value = escaped;
19802 continue;
19803 }
19804
19805 // when the user specifies nothing, try to match both
19806 prev.value = `(${capture}${escaped}|${prev.value})`;
19807 state.output += prev.value;
19808 continue;
19809 }
19810
19811 /**
19812 * Braces
19813 */
19814
19815 if (value === '{' && opts.nobrace !== true) {
19816 increment('braces');
19817
19818 const open = {
19819 type: 'brace',
19820 value,
19821 output: '(',
19822 outputIndex: state.output.length,
19823 tokensIndex: state.tokens.length
19824 };
19825
19826 braces.push(open);
19827 push(open);
19828 continue;
19829 }
19830
19831 if (value === '}') {
19832 const brace = braces[braces.length - 1];
19833
19834 if (opts.nobrace === true || !brace) {
19835 push({ type: 'text', value, output: value });
19836 continue;
19837 }
19838
19839 let output = ')';
19840
19841 if (brace.dots === true) {
19842 const arr = tokens.slice();
19843 const range = [];
19844
19845 for (let i = arr.length - 1; i >= 0; i--) {
19846 tokens.pop();
19847 if (arr[i].type === 'brace') {
19848 break;
19849 }
19850 if (arr[i].type !== 'dots') {
19851 range.unshift(arr[i].value);
19852 }
19853 }
19854
19855 output = expandRange(range, opts);
19856 state.backtrack = true;
19857 }
19858
19859 if (brace.comma !== true && brace.dots !== true) {
19860 const out = state.output.slice(0, brace.outputIndex);
19861 const toks = state.tokens.slice(brace.tokensIndex);
19862 brace.value = brace.output = '\\{';
19863 value = output = '\\}';
19864 state.output = out;
19865 for (const t of toks) {
19866 state.output += (t.output || t.value);
19867 }
19868 }
19869
19870 push({ type: 'brace', value, output });
19871 decrement('braces');
19872 braces.pop();
19873 continue;
19874 }
19875
19876 /**
19877 * Pipes
19878 */
19879
19880 if (value === '|') {
19881 if (extglobs.length > 0) {
19882 extglobs[extglobs.length - 1].conditions++;
19883 }
19884 push({ type: 'text', value });
19885 continue;
19886 }
19887
19888 /**
19889 * Commas
19890 */
19891
19892 if (value === ',') {
19893 let output = value;
19894
19895 const brace = braces[braces.length - 1];
19896 if (brace && stack[stack.length - 1] === 'braces') {
19897 brace.comma = true;
19898 output = '|';
19899 }
19900
19901 push({ type: 'comma', value, output });
19902 continue;
19903 }
19904
19905 /**
19906 * Slashes
19907 */
19908
19909 if (value === '/') {
19910 // if the beginning of the glob is "./", advance the start
19911 // to the current index, and don't add the "./" characters
19912 // to the state. This greatly simplifies lookbehinds when
19913 // checking for BOS characters like "!" and "." (not "./")
19914 if (prev.type === 'dot' && state.index === state.start + 1) {
19915 state.start = state.index + 1;
19916 state.consumed = '';
19917 state.output = '';
19918 tokens.pop();
19919 prev = bos; // reset "prev" to the first token
19920 continue;
19921 }
19922
19923 push({ type: 'slash', value, output: SLASH_LITERAL });
19924 continue;
19925 }
19926
19927 /**
19928 * Dots
19929 */
19930
19931 if (value === '.') {
19932 if (state.braces > 0 && prev.type === 'dot') {
19933 if (prev.value === '.') prev.output = DOT_LITERAL;
19934 const brace = braces[braces.length - 1];
19935 prev.type = 'dots';
19936 prev.output += value;
19937 prev.value += value;
19938 brace.dots = true;
19939 continue;
19940 }
19941
19942 if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
19943 push({ type: 'text', value, output: DOT_LITERAL });
19944 continue;
19945 }
19946
19947 push({ type: 'dot', value, output: DOT_LITERAL });
19948 continue;
19949 }
19950
19951 /**
19952 * Question marks
19953 */
19954
19955 if (value === '?') {
19956 const isGroup = prev && prev.value === '(';
19957 if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
19958 extglobOpen('qmark', value);
19959 continue;
19960 }
19961
19962 if (prev && prev.type === 'paren') {
19963 const next = peek();
19964 let output = value;
19965
19966 if (next === '<' && !utils.supportsLookbehinds()) {
19967 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
19968 }
19969
19970 if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
19971 output = `\\${value}`;
19972 }
19973
19974 push({ type: 'text', value, output });
19975 continue;
19976 }
19977
19978 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
19979 push({ type: 'qmark', value, output: QMARK_NO_DOT });
19980 continue;
19981 }
19982
19983 push({ type: 'qmark', value, output: QMARK });
19984 continue;
19985 }
19986
19987 /**
19988 * Exclamation
19989 */
19990
19991 if (value === '!') {
19992 if (opts.noextglob !== true && peek() === '(') {
19993 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
19994 extglobOpen('negate', value);
19995 continue;
19996 }
19997 }
19998
19999 if (opts.nonegate !== true && state.index === 0) {
20000 negate();
20001 continue;
20002 }
20003 }
20004
20005 /**
20006 * Plus
20007 */
20008
20009 if (value === '+') {
20010 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
20011 extglobOpen('plus', value);
20012 continue;
20013 }
20014
20015 if ((prev && prev.value === '(') || opts.regex === false) {
20016 push({ type: 'plus', value, output: PLUS_LITERAL });
20017 continue;
20018 }
20019
20020 if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
20021 push({ type: 'plus', value });
20022 continue;
20023 }
20024
20025 push({ type: 'plus', value: PLUS_LITERAL });
20026 continue;
20027 }
20028
20029 /**
20030 * Plain text
20031 */
20032
20033 if (value === '@') {
20034 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
20035 push({ type: 'at', extglob: true, value, output: '' });
20036 continue;
20037 }
20038
20039 push({ type: 'text', value });
20040 continue;
20041 }
20042
20043 /**
20044 * Plain text
20045 */
20046
20047 if (value !== '*') {
20048 if (value === '$' || value === '^') {
20049 value = `\\${value}`;
20050 }
20051
20052 const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
20053 if (match) {
20054 value += match[0];
20055 state.index += match[0].length;
20056 }
20057
20058 push({ type: 'text', value });
20059 continue;
20060 }
20061
20062 /**
20063 * Stars
20064 */
20065
20066 if (prev && (prev.type === 'globstar' || prev.star === true)) {
20067 prev.type = 'star';
20068 prev.star = true;
20069 prev.value += value;
20070 prev.output = star;
20071 state.backtrack = true;
20072 state.globstar = true;
20073 consume(value);
20074 continue;
20075 }
20076
20077 let rest = remaining();
20078 if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
20079 extglobOpen('star', value);
20080 continue;
20081 }
20082
20083 if (prev.type === 'star') {
20084 if (opts.noglobstar === true) {
20085 consume(value);
20086 continue;
20087 }
20088
20089 const prior = prev.prev;
20090 const before = prior.prev;
20091 const isStart = prior.type === 'slash' || prior.type === 'bos';
20092 const afterStar = before && (before.type === 'star' || before.type === 'globstar');
20093
20094 if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
20095 push({ type: 'star', value, output: '' });
20096 continue;
20097 }
20098
20099 const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
20100 const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
20101 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
20102 push({ type: 'star', value, output: '' });
20103 continue;
20104 }
20105
20106 // strip consecutive `/**/`
20107 while (rest.slice(0, 3) === '/**') {
20108 const after = input[state.index + 4];
20109 if (after && after !== '/') {
20110 break;
20111 }
20112 rest = rest.slice(3);
20113 consume('/**', 3);
20114 }
20115
20116 if (prior.type === 'bos' && eos()) {
20117 prev.type = 'globstar';
20118 prev.value += value;
20119 prev.output = globstar(opts);
20120 state.output = prev.output;
20121 state.globstar = true;
20122 consume(value);
20123 continue;
20124 }
20125
20126 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
20127 state.output = state.output.slice(0, -(prior.output + prev.output).length);
20128 prior.output = `(?:${prior.output}`;
20129
20130 prev.type = 'globstar';
20131 prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
20132 prev.value += value;
20133 state.globstar = true;
20134 state.output += prior.output + prev.output;
20135 consume(value);
20136 continue;
20137 }
20138
20139 if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
20140 const end = rest[1] !== void 0 ? '|$' : '';
20141
20142 state.output = state.output.slice(0, -(prior.output + prev.output).length);
20143 prior.output = `(?:${prior.output}`;
20144
20145 prev.type = 'globstar';
20146 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
20147 prev.value += value;
20148
20149 state.output += prior.output + prev.output;
20150 state.globstar = true;
20151
20152 consume(value + advance());
20153
20154 push({ type: 'slash', value: '/', output: '' });
20155 continue;
20156 }
20157
20158 if (prior.type === 'bos' && rest[0] === '/') {
20159 prev.type = 'globstar';
20160 prev.value += value;
20161 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
20162 state.output = prev.output;
20163 state.globstar = true;
20164 consume(value + advance());
20165 push({ type: 'slash', value: '/', output: '' });
20166 continue;
20167 }
20168
20169 // remove single star from output
20170 state.output = state.output.slice(0, -prev.output.length);
20171
20172 // reset previous token to globstar
20173 prev.type = 'globstar';
20174 prev.output = globstar(opts);
20175 prev.value += value;
20176
20177 // reset output with globstar
20178 state.output += prev.output;
20179 state.globstar = true;
20180 consume(value);
20181 continue;
20182 }
20183
20184 const token = { type: 'star', value, output: star };
20185
20186 if (opts.bash === true) {
20187 token.output = '.*?';
20188 if (prev.type === 'bos' || prev.type === 'slash') {
20189 token.output = nodot + token.output;
20190 }
20191 push(token);
20192 continue;
20193 }
20194
20195 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
20196 token.output = value;
20197 push(token);
20198 continue;
20199 }
20200
20201 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
20202 if (prev.type === 'dot') {
20203 state.output += NO_DOT_SLASH;
20204 prev.output += NO_DOT_SLASH;
20205
20206 } else if (opts.dot === true) {
20207 state.output += NO_DOTS_SLASH;
20208 prev.output += NO_DOTS_SLASH;
20209
20210 } else {
20211 state.output += nodot;
20212 prev.output += nodot;
20213 }
20214
20215 if (peek() !== '*') {
20216 state.output += ONE_CHAR;
20217 prev.output += ONE_CHAR;
20218 }
20219 }
20220
20221 push(token);
20222 }
20223
20224 while (state.brackets > 0) {
20225 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
20226 state.output = utils.escapeLast(state.output, '[');
20227 decrement('brackets');
20228 }
20229
20230 while (state.parens > 0) {
20231 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
20232 state.output = utils.escapeLast(state.output, '(');
20233 decrement('parens');
20234 }
20235
20236 while (state.braces > 0) {
20237 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
20238 state.output = utils.escapeLast(state.output, '{');
20239 decrement('braces');
20240 }
20241
20242 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
20243 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
20244 }
20245
20246 // rebuild the output if we had to backtrack at any point
20247 if (state.backtrack === true) {
20248 state.output = '';
20249
20250 for (const token of state.tokens) {
20251 state.output += token.output != null ? token.output : token.value;
20252
20253 if (token.suffix) {
20254 state.output += token.suffix;
20255 }
20256 }
20257 }
20258
20259 return state;
20260};
20261
20262/**
20263 * Fast paths for creating regular expressions for common glob patterns.
20264 * This can significantly speed up processing and has very little downside
20265 * impact when none of the fast paths match.
20266 */
20267
20268parse.fastpaths = (input, options) => {
20269 const opts = { ...options };
20270 const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
20271 const len = input.length;
20272 if (len > max) {
20273 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
20274 }
20275
20276 input = REPLACEMENTS[input] || input;
20277 const win32 = utils.isWindows(options);
20278
20279 // create constants based on platform, for windows or posix
20280 const {
20281 DOT_LITERAL,
20282 SLASH_LITERAL,
20283 ONE_CHAR,
20284 DOTS_SLASH,
20285 NO_DOT,
20286 NO_DOTS,
20287 NO_DOTS_SLASH,
20288 STAR,
20289 START_ANCHOR
20290 } = constants.globChars(win32);
20291
20292 const nodot = opts.dot ? NO_DOTS : NO_DOT;
20293 const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
20294 const capture = opts.capture ? '' : '?:';
20295 const state = { negated: false, prefix: '' };
20296 let star = opts.bash === true ? '.*?' : STAR;
20297
20298 if (opts.capture) {
20299 star = `(${star})`;
20300 }
20301
20302 const globstar = (opts) => {
20303 if (opts.noglobstar === true) return star;
20304 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
20305 };
20306
20307 const create = str => {
20308 switch (str) {
20309 case '*':
20310 return `${nodot}${ONE_CHAR}${star}`;
20311
20312 case '.*':
20313 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
20314
20315 case '*.*':
20316 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
20317
20318 case '*/*':
20319 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
20320
20321 case '**':
20322 return nodot + globstar(opts);
20323
20324 case '**/*':
20325 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
20326
20327 case '**/*.*':
20328 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
20329
20330 case '**/.*':
20331 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
20332
20333 default: {
20334 const match = /^(.*?)\.(\w+)$/.exec(str);
20335 if (!match) return;
20336
20337 const source = create(match[1]);
20338 if (!source) return;
20339
20340 return source + DOT_LITERAL + match[2];
20341 }
20342 }
20343 };
20344
20345 const output = utils.removePrefix(input, state);
20346 let source = create(output);
20347
20348 if (source && opts.strictSlashes !== true) {
20349 source += `${SLASH_LITERAL}?`;
20350 }
20351
20352 return source;
20353};
20354
20355module.exports = parse;
20356
20357
20358/***/ }),
20359/* 94 */
20360/***/ (function(module, exports, __webpack_require__) {
20361
20362"use strict";
20363
20364Object.defineProperty(exports, "__esModule", { value: true });
20365exports.merge = void 0;
20366const merge2 = __webpack_require__(95);
20367function merge(streams) {
20368 const mergedStream = merge2(streams);
20369 streams.forEach((stream) => {
20370 stream.once('error', (error) => mergedStream.emit('error', error));
20371 });
20372 mergedStream.once('close', () => propagateCloseEventToSources(streams));
20373 mergedStream.once('end', () => propagateCloseEventToSources(streams));
20374 return mergedStream;
20375}
20376exports.merge = merge;
20377function propagateCloseEventToSources(streams) {
20378 streams.forEach((stream) => stream.emit('close'));
20379}
20380
20381
20382/***/ }),
20383/* 95 */
20384/***/ (function(module, exports, __webpack_require__) {
20385
20386"use strict";
20387
20388/*
20389 * merge2
20390 * https://github.com/teambition/merge2
20391 *
20392 * Copyright (c) 2014-2016 Teambition
20393 * Licensed under the MIT license.
20394 */
20395const Stream = __webpack_require__(96)
20396const PassThrough = Stream.PassThrough
20397const slice = Array.prototype.slice
20398
20399module.exports = merge2
20400
20401function merge2 () {
20402 const streamsQueue = []
20403 let merging = false
20404 const args = slice.call(arguments)
20405 let options = args[args.length - 1]
20406
20407 if (options && !Array.isArray(options) && options.pipe == null) args.pop()
20408 else options = {}
20409
20410 const doEnd = options.end !== false
20411 if (options.objectMode == null) options.objectMode = true
20412 if (options.highWaterMark == null) options.highWaterMark = 64 * 1024
20413 const mergedStream = PassThrough(options)
20414
20415 function addStream () {
20416 for (let i = 0, len = arguments.length; i < len; i++) {
20417 streamsQueue.push(pauseStreams(arguments[i], options))
20418 }
20419 mergeStream()
20420 return this
20421 }
20422
20423 function mergeStream () {
20424 if (merging) return
20425 merging = true
20426
20427 let streams = streamsQueue.shift()
20428 if (!streams) {
20429 process.nextTick(endStream)
20430 return
20431 }
20432 if (!Array.isArray(streams)) streams = [streams]
20433
20434 let pipesCount = streams.length + 1
20435
20436 function next () {
20437 if (--pipesCount > 0) return
20438 merging = false
20439 mergeStream()
20440 }
20441
20442 function pipe (stream) {
20443 function onend () {
20444 stream.removeListener('merge2UnpipeEnd', onend)
20445 stream.removeListener('end', onend)
20446 next()
20447 }
20448 // skip ended stream
20449 if (stream._readableState.endEmitted) return next()
20450
20451 stream.on('merge2UnpipeEnd', onend)
20452 stream.on('end', onend)
20453 stream.pipe(mergedStream, { end: false })
20454 // compatible for old stream
20455 stream.resume()
20456 }
20457
20458 for (let i = 0; i < streams.length; i++) pipe(streams[i])
20459
20460 next()
20461 }
20462
20463 function endStream () {
20464 merging = false
20465 // emit 'queueDrain' when all streams merged.
20466 mergedStream.emit('queueDrain')
20467 return doEnd && mergedStream.end()
20468 }
20469
20470 mergedStream.setMaxListeners(0)
20471 mergedStream.add = addStream
20472 mergedStream.on('unpipe', function (stream) {
20473 stream.emit('merge2UnpipeEnd')
20474 })
20475
20476 if (args.length) addStream.apply(null, args)
20477 return mergedStream
20478}
20479
20480// check and pause streams for pipe.
20481function pauseStreams (streams, options) {
20482 if (!Array.isArray(streams)) {
20483 // Backwards-compat with old-style streams
20484 if (!streams._readableState && streams.pipe) streams = streams.pipe(PassThrough(options))
20485 if (!streams._readableState || !streams.pause || !streams.pipe) {
20486 throw new Error('Only readable stream can be merged.')
20487 }
20488 streams.pause()
20489 } else {
20490 for (let i = 0, len = streams.length; i < len; i++) streams[i] = pauseStreams(streams[i], options)
20491 }
20492 return streams
20493}
20494
20495
20496/***/ }),
20497/* 96 */
20498/***/ (function(module, exports) {
20499
20500module.exports = require("stream");
20501
20502/***/ }),
20503/* 97 */
20504/***/ (function(module, exports, __webpack_require__) {
20505
20506"use strict";
20507
20508Object.defineProperty(exports, "__esModule", { value: true });
20509exports.isEmpty = exports.isString = void 0;
20510function isString(input) {
20511 return typeof input === 'string';
20512}
20513exports.isString = isString;
20514function isEmpty(input) {
20515 return input === '';
20516}
20517exports.isEmpty = isEmpty;
20518
20519
20520/***/ }),
20521/* 98 */
20522/***/ (function(module, exports, __webpack_require__) {
20523
20524"use strict";
20525
20526Object.defineProperty(exports, "__esModule", { value: true });
20527const stream_1 = __webpack_require__(99);
20528const provider_1 = __webpack_require__(126);
20529class ProviderAsync extends provider_1.default {
20530 constructor() {
20531 super(...arguments);
20532 this._reader = new stream_1.default(this._settings);
20533 }
20534 read(task) {
20535 const root = this._getRootDirectory(task);
20536 const options = this._getReaderOptions(task);
20537 const entries = [];
20538 return new Promise((resolve, reject) => {
20539 const stream = this.api(root, task, options);
20540 stream.once('error', reject);
20541 stream.on('data', (entry) => entries.push(options.transform(entry)));
20542 stream.once('end', () => resolve(entries));
20543 });
20544 }
20545 api(root, task, options) {
20546 if (task.dynamic) {
20547 return this._reader.dynamic(root, options);
20548 }
20549 return this._reader.static(task.patterns, options);
20550 }
20551}
20552exports.default = ProviderAsync;
20553
20554
20555/***/ }),
20556/* 99 */
20557/***/ (function(module, exports, __webpack_require__) {
20558
20559"use strict";
20560
20561Object.defineProperty(exports, "__esModule", { value: true });
20562const stream_1 = __webpack_require__(96);
20563const fsStat = __webpack_require__(100);
20564const fsWalk = __webpack_require__(105);
20565const reader_1 = __webpack_require__(125);
20566class ReaderStream extends reader_1.default {
20567 constructor() {
20568 super(...arguments);
20569 this._walkStream = fsWalk.walkStream;
20570 this._stat = fsStat.stat;
20571 }
20572 dynamic(root, options) {
20573 return this._walkStream(root, options);
20574 }
20575 static(patterns, options) {
20576 const filepaths = patterns.map(this._getFullEntryPath, this);
20577 const stream = new stream_1.PassThrough({ objectMode: true });
20578 stream._write = (index, _enc, done) => {
20579 return this._getEntry(filepaths[index], patterns[index], options)
20580 .then((entry) => {
20581 if (entry !== null && options.entryFilter(entry)) {
20582 stream.push(entry);
20583 }
20584 if (index === filepaths.length - 1) {
20585 stream.end();
20586 }
20587 done();
20588 })
20589 .catch(done);
20590 };
20591 for (let i = 0; i < filepaths.length; i++) {
20592 stream.write(i);
20593 }
20594 return stream;
20595 }
20596 _getEntry(filepath, pattern, options) {
20597 return this._getStat(filepath)
20598 .then((stats) => this._makeEntry(stats, pattern))
20599 .catch((error) => {
20600 if (options.errorFilter(error)) {
20601 return null;
20602 }
20603 throw error;
20604 });
20605 }
20606 _getStat(filepath) {
20607 return new Promise((resolve, reject) => {
20608 this._stat(filepath, this._fsStatSettings, (error, stats) => {
20609 return error === null ? resolve(stats) : reject(error);
20610 });
20611 });
20612 }
20613}
20614exports.default = ReaderStream;
20615
20616
20617/***/ }),
20618/* 100 */
20619/***/ (function(module, exports, __webpack_require__) {
20620
20621"use strict";
20622
20623Object.defineProperty(exports, "__esModule", { value: true });
20624const async = __webpack_require__(101);
20625const sync = __webpack_require__(102);
20626const settings_1 = __webpack_require__(103);
20627exports.Settings = settings_1.default;
20628function stat(path, optionsOrSettingsOrCallback, callback) {
20629 if (typeof optionsOrSettingsOrCallback === 'function') {
20630 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
20631 }
20632 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
20633}
20634exports.stat = stat;
20635function statSync(path, optionsOrSettings) {
20636 const settings = getSettings(optionsOrSettings);
20637 return sync.read(path, settings);
20638}
20639exports.statSync = statSync;
20640function getSettings(settingsOrOptions = {}) {
20641 if (settingsOrOptions instanceof settings_1.default) {
20642 return settingsOrOptions;
20643 }
20644 return new settings_1.default(settingsOrOptions);
20645}
20646
20647
20648/***/ }),
20649/* 101 */
20650/***/ (function(module, exports, __webpack_require__) {
20651
20652"use strict";
20653
20654Object.defineProperty(exports, "__esModule", { value: true });
20655function read(path, settings, callback) {
20656 settings.fs.lstat(path, (lstatError, lstat) => {
20657 if (lstatError !== null) {
20658 return callFailureCallback(callback, lstatError);
20659 }
20660 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
20661 return callSuccessCallback(callback, lstat);
20662 }
20663 settings.fs.stat(path, (statError, stat) => {
20664 if (statError !== null) {
20665 if (settings.throwErrorOnBrokenSymbolicLink) {
20666 return callFailureCallback(callback, statError);
20667 }
20668 return callSuccessCallback(callback, lstat);
20669 }
20670 if (settings.markSymbolicLink) {
20671 stat.isSymbolicLink = () => true;
20672 }
20673 callSuccessCallback(callback, stat);
20674 });
20675 });
20676}
20677exports.read = read;
20678function callFailureCallback(callback, error) {
20679 callback(error);
20680}
20681function callSuccessCallback(callback, result) {
20682 callback(null, result);
20683}
20684
20685
20686/***/ }),
20687/* 102 */
20688/***/ (function(module, exports, __webpack_require__) {
20689
20690"use strict";
20691
20692Object.defineProperty(exports, "__esModule", { value: true });
20693function read(path, settings) {
20694 const lstat = settings.fs.lstatSync(path);
20695 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
20696 return lstat;
20697 }
20698 try {
20699 const stat = settings.fs.statSync(path);
20700 if (settings.markSymbolicLink) {
20701 stat.isSymbolicLink = () => true;
20702 }
20703 return stat;
20704 }
20705 catch (error) {
20706 if (!settings.throwErrorOnBrokenSymbolicLink) {
20707 return lstat;
20708 }
20709 throw error;
20710 }
20711}
20712exports.read = read;
20713
20714
20715/***/ }),
20716/* 103 */
20717/***/ (function(module, exports, __webpack_require__) {
20718
20719"use strict";
20720
20721Object.defineProperty(exports, "__esModule", { value: true });
20722const fs = __webpack_require__(104);
20723class Settings {
20724 constructor(_options = {}) {
20725 this._options = _options;
20726 this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
20727 this.fs = fs.createFileSystemAdapter(this._options.fs);
20728 this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
20729 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
20730 }
20731 _getValue(option, value) {
20732 return option === undefined ? value : option;
20733 }
20734}
20735exports.default = Settings;
20736
20737
20738/***/ }),
20739/* 104 */
20740/***/ (function(module, exports, __webpack_require__) {
20741
20742"use strict";
20743
20744Object.defineProperty(exports, "__esModule", { value: true });
20745const fs = __webpack_require__(40);
20746exports.FILE_SYSTEM_ADAPTER = {
20747 lstat: fs.lstat,
20748 stat: fs.stat,
20749 lstatSync: fs.lstatSync,
20750 statSync: fs.statSync
20751};
20752function createFileSystemAdapter(fsMethods) {
20753 if (fsMethods === undefined) {
20754 return exports.FILE_SYSTEM_ADAPTER;
20755 }
20756 return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
20757}
20758exports.createFileSystemAdapter = createFileSystemAdapter;
20759
20760
20761/***/ }),
20762/* 105 */
20763/***/ (function(module, exports, __webpack_require__) {
20764
20765"use strict";
20766
20767Object.defineProperty(exports, "__esModule", { value: true });
20768const async_1 = __webpack_require__(106);
20769const stream_1 = __webpack_require__(121);
20770const sync_1 = __webpack_require__(122);
20771const settings_1 = __webpack_require__(124);
20772exports.Settings = settings_1.default;
20773function walk(directory, optionsOrSettingsOrCallback, callback) {
20774 if (typeof optionsOrSettingsOrCallback === 'function') {
20775 return new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
20776 }
20777 new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
20778}
20779exports.walk = walk;
20780function walkSync(directory, optionsOrSettings) {
20781 const settings = getSettings(optionsOrSettings);
20782 const provider = new sync_1.default(directory, settings);
20783 return provider.read();
20784}
20785exports.walkSync = walkSync;
20786function walkStream(directory, optionsOrSettings) {
20787 const settings = getSettings(optionsOrSettings);
20788 const provider = new stream_1.default(directory, settings);
20789 return provider.read();
20790}
20791exports.walkStream = walkStream;
20792function getSettings(settingsOrOptions = {}) {
20793 if (settingsOrOptions instanceof settings_1.default) {
20794 return settingsOrOptions;
20795 }
20796 return new settings_1.default(settingsOrOptions);
20797}
20798
20799
20800/***/ }),
20801/* 106 */
20802/***/ (function(module, exports, __webpack_require__) {
20803
20804"use strict";
20805
20806Object.defineProperty(exports, "__esModule", { value: true });
20807const async_1 = __webpack_require__(107);
20808class AsyncProvider {
20809 constructor(_root, _settings) {
20810 this._root = _root;
20811 this._settings = _settings;
20812 this._reader = new async_1.default(this._root, this._settings);
20813 this._storage = new Set();
20814 }
20815 read(callback) {
20816 this._reader.onError((error) => {
20817 callFailureCallback(callback, error);
20818 });
20819 this._reader.onEntry((entry) => {
20820 this._storage.add(entry);
20821 });
20822 this._reader.onEnd(() => {
20823 callSuccessCallback(callback, [...this._storage]);
20824 });
20825 this._reader.read();
20826 }
20827}
20828exports.default = AsyncProvider;
20829function callFailureCallback(callback, error) {
20830 callback(error);
20831}
20832function callSuccessCallback(callback, entries) {
20833 callback(null, entries);
20834}
20835
20836
20837/***/ }),
20838/* 107 */
20839/***/ (function(module, exports, __webpack_require__) {
20840
20841"use strict";
20842
20843Object.defineProperty(exports, "__esModule", { value: true });
20844const events_1 = __webpack_require__(51);
20845const fsScandir = __webpack_require__(108);
20846const fastq = __webpack_require__(117);
20847const common = __webpack_require__(119);
20848const reader_1 = __webpack_require__(120);
20849class AsyncReader extends reader_1.default {
20850 constructor(_root, _settings) {
20851 super(_root, _settings);
20852 this._settings = _settings;
20853 this._scandir = fsScandir.scandir;
20854 this._emitter = new events_1.EventEmitter();
20855 this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
20856 this._isFatalError = false;
20857 this._isDestroyed = false;
20858 this._queue.drain = () => {
20859 if (!this._isFatalError) {
20860 this._emitter.emit('end');
20861 }
20862 };
20863 }
20864 read() {
20865 this._isFatalError = false;
20866 this._isDestroyed = false;
20867 setImmediate(() => {
20868 this._pushToQueue(this._root, this._settings.basePath);
20869 });
20870 return this._emitter;
20871 }
20872 destroy() {
20873 if (this._isDestroyed) {
20874 throw new Error('The reader is already destroyed');
20875 }
20876 this._isDestroyed = true;
20877 this._queue.killAndDrain();
20878 }
20879 onEntry(callback) {
20880 this._emitter.on('entry', callback);
20881 }
20882 onError(callback) {
20883 this._emitter.once('error', callback);
20884 }
20885 onEnd(callback) {
20886 this._emitter.once('end', callback);
20887 }
20888 _pushToQueue(directory, base) {
20889 const queueItem = { directory, base };
20890 this._queue.push(queueItem, (error) => {
20891 if (error !== null) {
20892 this._handleError(error);
20893 }
20894 });
20895 }
20896 _worker(item, done) {
20897 this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
20898 if (error !== null) {
20899 return done(error, undefined);
20900 }
20901 for (const entry of entries) {
20902 this._handleEntry(entry, item.base);
20903 }
20904 done(null, undefined);
20905 });
20906 }
20907 _handleError(error) {
20908 if (!common.isFatalError(this._settings, error)) {
20909 return;
20910 }
20911 this._isFatalError = true;
20912 this._isDestroyed = true;
20913 this._emitter.emit('error', error);
20914 }
20915 _handleEntry(entry, base) {
20916 if (this._isDestroyed || this._isFatalError) {
20917 return;
20918 }
20919 const fullpath = entry.path;
20920 if (base !== undefined) {
20921 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
20922 }
20923 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
20924 this._emitEntry(entry);
20925 }
20926 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
20927 this._pushToQueue(fullpath, entry.path);
20928 }
20929 }
20930 _emitEntry(entry) {
20931 this._emitter.emit('entry', entry);
20932 }
20933}
20934exports.default = AsyncReader;
20935
20936
20937/***/ }),
20938/* 108 */
20939/***/ (function(module, exports, __webpack_require__) {
20940
20941"use strict";
20942
20943Object.defineProperty(exports, "__esModule", { value: true });
20944const async = __webpack_require__(109);
20945const sync = __webpack_require__(114);
20946const settings_1 = __webpack_require__(115);
20947exports.Settings = settings_1.default;
20948function scandir(path, optionsOrSettingsOrCallback, callback) {
20949 if (typeof optionsOrSettingsOrCallback === 'function') {
20950 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
20951 }
20952 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
20953}
20954exports.scandir = scandir;
20955function scandirSync(path, optionsOrSettings) {
20956 const settings = getSettings(optionsOrSettings);
20957 return sync.read(path, settings);
20958}
20959exports.scandirSync = scandirSync;
20960function getSettings(settingsOrOptions = {}) {
20961 if (settingsOrOptions instanceof settings_1.default) {
20962 return settingsOrOptions;
20963 }
20964 return new settings_1.default(settingsOrOptions);
20965}
20966
20967
20968/***/ }),
20969/* 109 */
20970/***/ (function(module, exports, __webpack_require__) {
20971
20972"use strict";
20973
20974Object.defineProperty(exports, "__esModule", { value: true });
20975const fsStat = __webpack_require__(100);
20976const rpl = __webpack_require__(110);
20977const constants_1 = __webpack_require__(111);
20978const utils = __webpack_require__(112);
20979function read(directory, settings, callback) {
20980 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
20981 return readdirWithFileTypes(directory, settings, callback);
20982 }
20983 return readdir(directory, settings, callback);
20984}
20985exports.read = read;
20986function readdirWithFileTypes(directory, settings, callback) {
20987 settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
20988 if (readdirError !== null) {
20989 return callFailureCallback(callback, readdirError);
20990 }
20991 const entries = dirents.map((dirent) => ({
20992 dirent,
20993 name: dirent.name,
20994 path: `${directory}${settings.pathSegmentSeparator}${dirent.name}`
20995 }));
20996 if (!settings.followSymbolicLinks) {
20997 return callSuccessCallback(callback, entries);
20998 }
20999 const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
21000 rpl(tasks, (rplError, rplEntries) => {
21001 if (rplError !== null) {
21002 return callFailureCallback(callback, rplError);
21003 }
21004 callSuccessCallback(callback, rplEntries);
21005 });
21006 });
21007}
21008exports.readdirWithFileTypes = readdirWithFileTypes;
21009function makeRplTaskEntry(entry, settings) {
21010 return (done) => {
21011 if (!entry.dirent.isSymbolicLink()) {
21012 return done(null, entry);
21013 }
21014 settings.fs.stat(entry.path, (statError, stats) => {
21015 if (statError !== null) {
21016 if (settings.throwErrorOnBrokenSymbolicLink) {
21017 return done(statError);
21018 }
21019 return done(null, entry);
21020 }
21021 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
21022 return done(null, entry);
21023 });
21024 };
21025}
21026function readdir(directory, settings, callback) {
21027 settings.fs.readdir(directory, (readdirError, names) => {
21028 if (readdirError !== null) {
21029 return callFailureCallback(callback, readdirError);
21030 }
21031 const filepaths = names.map((name) => `${directory}${settings.pathSegmentSeparator}${name}`);
21032 const tasks = filepaths.map((filepath) => {
21033 return (done) => fsStat.stat(filepath, settings.fsStatSettings, done);
21034 });
21035 rpl(tasks, (rplError, results) => {
21036 if (rplError !== null) {
21037 return callFailureCallback(callback, rplError);
21038 }
21039 const entries = [];
21040 names.forEach((name, index) => {
21041 const stats = results[index];
21042 const entry = {
21043 name,
21044 path: filepaths[index],
21045 dirent: utils.fs.createDirentFromStats(name, stats)
21046 };
21047 if (settings.stats) {
21048 entry.stats = stats;
21049 }
21050 entries.push(entry);
21051 });
21052 callSuccessCallback(callback, entries);
21053 });
21054 });
21055}
21056exports.readdir = readdir;
21057function callFailureCallback(callback, error) {
21058 callback(error);
21059}
21060function callSuccessCallback(callback, result) {
21061 callback(null, result);
21062}
21063
21064
21065/***/ }),
21066/* 110 */
21067/***/ (function(module, exports) {
21068
21069module.exports = runParallel
21070
21071function runParallel (tasks, cb) {
21072 var results, pending, keys
21073 var isSync = true
21074
21075 if (Array.isArray(tasks)) {
21076 results = []
21077 pending = tasks.length
21078 } else {
21079 keys = Object.keys(tasks)
21080 results = {}
21081 pending = keys.length
21082 }
21083
21084 function done (err) {
21085 function end () {
21086 if (cb) cb(err, results)
21087 cb = null
21088 }
21089 if (isSync) process.nextTick(end)
21090 else end()
21091 }
21092
21093 function each (i, err, result) {
21094 results[i] = result
21095 if (--pending === 0 || err) {
21096 done(err)
21097 }
21098 }
21099
21100 if (!pending) {
21101 // empty
21102 done(null)
21103 } else if (keys) {
21104 // object
21105 keys.forEach(function (key) {
21106 tasks[key](function (err, result) { each(key, err, result) })
21107 })
21108 } else {
21109 // array
21110 tasks.forEach(function (task, i) {
21111 task(function (err, result) { each(i, err, result) })
21112 })
21113 }
21114
21115 isSync = false
21116}
21117
21118
21119/***/ }),
21120/* 111 */
21121/***/ (function(module, exports, __webpack_require__) {
21122
21123"use strict";
21124
21125Object.defineProperty(exports, "__esModule", { value: true });
21126const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
21127const MAJOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
21128const MINOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
21129const SUPPORTED_MAJOR_VERSION = 10;
21130const SUPPORTED_MINOR_VERSION = 10;
21131const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
21132const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
21133/**
21134 * IS `true` for Node.js 10.10 and greater.
21135 */
21136exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
21137
21138
21139/***/ }),
21140/* 112 */
21141/***/ (function(module, exports, __webpack_require__) {
21142
21143"use strict";
21144
21145Object.defineProperty(exports, "__esModule", { value: true });
21146const fs = __webpack_require__(113);
21147exports.fs = fs;
21148
21149
21150/***/ }),
21151/* 113 */
21152/***/ (function(module, exports, __webpack_require__) {
21153
21154"use strict";
21155
21156Object.defineProperty(exports, "__esModule", { value: true });
21157class DirentFromStats {
21158 constructor(name, stats) {
21159 this.name = name;
21160 this.isBlockDevice = stats.isBlockDevice.bind(stats);
21161 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
21162 this.isDirectory = stats.isDirectory.bind(stats);
21163 this.isFIFO = stats.isFIFO.bind(stats);
21164 this.isFile = stats.isFile.bind(stats);
21165 this.isSocket = stats.isSocket.bind(stats);
21166 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
21167 }
21168}
21169function createDirentFromStats(name, stats) {
21170 return new DirentFromStats(name, stats);
21171}
21172exports.createDirentFromStats = createDirentFromStats;
21173
21174
21175/***/ }),
21176/* 114 */
21177/***/ (function(module, exports, __webpack_require__) {
21178
21179"use strict";
21180
21181Object.defineProperty(exports, "__esModule", { value: true });
21182const fsStat = __webpack_require__(100);
21183const constants_1 = __webpack_require__(111);
21184const utils = __webpack_require__(112);
21185function read(directory, settings) {
21186 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
21187 return readdirWithFileTypes(directory, settings);
21188 }
21189 return readdir(directory, settings);
21190}
21191exports.read = read;
21192function readdirWithFileTypes(directory, settings) {
21193 const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
21194 return dirents.map((dirent) => {
21195 const entry = {
21196 dirent,
21197 name: dirent.name,
21198 path: `${directory}${settings.pathSegmentSeparator}${dirent.name}`
21199 };
21200 if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
21201 try {
21202 const stats = settings.fs.statSync(entry.path);
21203 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
21204 }
21205 catch (error) {
21206 if (settings.throwErrorOnBrokenSymbolicLink) {
21207 throw error;
21208 }
21209 }
21210 }
21211 return entry;
21212 });
21213}
21214exports.readdirWithFileTypes = readdirWithFileTypes;
21215function readdir(directory, settings) {
21216 const names = settings.fs.readdirSync(directory);
21217 return names.map((name) => {
21218 const entryPath = `${directory}${settings.pathSegmentSeparator}${name}`;
21219 const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
21220 const entry = {
21221 name,
21222 path: entryPath,
21223 dirent: utils.fs.createDirentFromStats(name, stats)
21224 };
21225 if (settings.stats) {
21226 entry.stats = stats;
21227 }
21228 return entry;
21229 });
21230}
21231exports.readdir = readdir;
21232
21233
21234/***/ }),
21235/* 115 */
21236/***/ (function(module, exports, __webpack_require__) {
21237
21238"use strict";
21239
21240Object.defineProperty(exports, "__esModule", { value: true });
21241const path = __webpack_require__(13);
21242const fsStat = __webpack_require__(100);
21243const fs = __webpack_require__(116);
21244class Settings {
21245 constructor(_options = {}) {
21246 this._options = _options;
21247 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
21248 this.fs = fs.createFileSystemAdapter(this._options.fs);
21249 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
21250 this.stats = this._getValue(this._options.stats, false);
21251 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
21252 this.fsStatSettings = new fsStat.Settings({
21253 followSymbolicLink: this.followSymbolicLinks,
21254 fs: this.fs,
21255 throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
21256 });
21257 }
21258 _getValue(option, value) {
21259 return option === undefined ? value : option;
21260 }
21261}
21262exports.default = Settings;
21263
21264
21265/***/ }),
21266/* 116 */
21267/***/ (function(module, exports, __webpack_require__) {
21268
21269"use strict";
21270
21271Object.defineProperty(exports, "__esModule", { value: true });
21272const fs = __webpack_require__(40);
21273exports.FILE_SYSTEM_ADAPTER = {
21274 lstat: fs.lstat,
21275 stat: fs.stat,
21276 lstatSync: fs.lstatSync,
21277 statSync: fs.statSync,
21278 readdir: fs.readdir,
21279 readdirSync: fs.readdirSync
21280};
21281function createFileSystemAdapter(fsMethods) {
21282 if (fsMethods === undefined) {
21283 return exports.FILE_SYSTEM_ADAPTER;
21284 }
21285 return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
21286}
21287exports.createFileSystemAdapter = createFileSystemAdapter;
21288
21289
21290/***/ }),
21291/* 117 */
21292/***/ (function(module, exports, __webpack_require__) {
21293
21294"use strict";
21295
21296
21297var reusify = __webpack_require__(118)
21298
21299function fastqueue (context, worker, concurrency) {
21300 if (typeof context === 'function') {
21301 concurrency = worker
21302 worker = context
21303 context = null
21304 }
21305
21306 var cache = reusify(Task)
21307 var queueHead = null
21308 var queueTail = null
21309 var _running = 0
21310
21311 var self = {
21312 push: push,
21313 drain: noop,
21314 saturated: noop,
21315 pause: pause,
21316 paused: false,
21317 concurrency: concurrency,
21318 running: running,
21319 resume: resume,
21320 idle: idle,
21321 length: length,
21322 unshift: unshift,
21323 empty: noop,
21324 kill: kill,
21325 killAndDrain: killAndDrain
21326 }
21327
21328 return self
21329
21330 function running () {
21331 return _running
21332 }
21333
21334 function pause () {
21335 self.paused = true
21336 }
21337
21338 function length () {
21339 var current = queueHead
21340 var counter = 0
21341
21342 while (current) {
21343 current = current.next
21344 counter++
21345 }
21346
21347 return counter
21348 }
21349
21350 function resume () {
21351 if (!self.paused) return
21352 self.paused = false
21353 for (var i = 0; i < self.concurrency; i++) {
21354 _running++
21355 release()
21356 }
21357 }
21358
21359 function idle () {
21360 return _running === 0 && self.length() === 0
21361 }
21362
21363 function push (value, done) {
21364 var current = cache.get()
21365
21366 current.context = context
21367 current.release = release
21368 current.value = value
21369 current.callback = done || noop
21370
21371 if (_running === self.concurrency || self.paused) {
21372 if (queueTail) {
21373 queueTail.next = current
21374 queueTail = current
21375 } else {
21376 queueHead = current
21377 queueTail = current
21378 self.saturated()
21379 }
21380 } else {
21381 _running++
21382 worker.call(context, current.value, current.worked)
21383 }
21384 }
21385
21386 function unshift (value, done) {
21387 var current = cache.get()
21388
21389 current.context = context
21390 current.release = release
21391 current.value = value
21392 current.callback = done || noop
21393
21394 if (_running === self.concurrency || self.paused) {
21395 if (queueHead) {
21396 current.next = queueHead
21397 queueHead = current
21398 } else {
21399 queueHead = current
21400 queueTail = current
21401 self.saturated()
21402 }
21403 } else {
21404 _running++
21405 worker.call(context, current.value, current.worked)
21406 }
21407 }
21408
21409 function release (holder) {
21410 if (holder) {
21411 cache.release(holder)
21412 }
21413 var next = queueHead
21414 if (next) {
21415 if (!self.paused) {
21416 if (queueTail === queueHead) {
21417 queueTail = null
21418 }
21419 queueHead = next.next
21420 next.next = null
21421 worker.call(context, next.value, next.worked)
21422 if (queueTail === null) {
21423 self.empty()
21424 }
21425 } else {
21426 _running--
21427 }
21428 } else if (--_running === 0) {
21429 self.drain()
21430 }
21431 }
21432
21433 function kill () {
21434 queueHead = null
21435 queueTail = null
21436 self.drain = noop
21437 }
21438
21439 function killAndDrain () {
21440 queueHead = null
21441 queueTail = null
21442 self.drain()
21443 self.drain = noop
21444 }
21445}
21446
21447function noop () {}
21448
21449function Task () {
21450 this.value = null
21451 this.callback = noop
21452 this.next = null
21453 this.release = noop
21454 this.context = null
21455
21456 var self = this
21457
21458 this.worked = function worked (err, result) {
21459 var callback = self.callback
21460 self.value = null
21461 self.callback = noop
21462 callback.call(self.context, err, result)
21463 self.release(self)
21464 }
21465}
21466
21467module.exports = fastqueue
21468
21469
21470/***/ }),
21471/* 118 */
21472/***/ (function(module, exports, __webpack_require__) {
21473
21474"use strict";
21475
21476
21477function reusify (Constructor) {
21478 var head = new Constructor()
21479 var tail = head
21480
21481 function get () {
21482 var current = head
21483
21484 if (current.next) {
21485 head = current.next
21486 } else {
21487 head = new Constructor()
21488 tail = head
21489 }
21490
21491 current.next = null
21492
21493 return current
21494 }
21495
21496 function release (obj) {
21497 tail.next = obj
21498 tail = obj
21499 }
21500
21501 return {
21502 get: get,
21503 release: release
21504 }
21505}
21506
21507module.exports = reusify
21508
21509
21510/***/ }),
21511/* 119 */
21512/***/ (function(module, exports, __webpack_require__) {
21513
21514"use strict";
21515
21516Object.defineProperty(exports, "__esModule", { value: true });
21517function isFatalError(settings, error) {
21518 if (settings.errorFilter === null) {
21519 return true;
21520 }
21521 return !settings.errorFilter(error);
21522}
21523exports.isFatalError = isFatalError;
21524function isAppliedFilter(filter, value) {
21525 return filter === null || filter(value);
21526}
21527exports.isAppliedFilter = isAppliedFilter;
21528function replacePathSegmentSeparator(filepath, separator) {
21529 return filepath.split(/[\\/]/).join(separator);
21530}
21531exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
21532function joinPathSegments(a, b, separator) {
21533 if (a === '') {
21534 return b;
21535 }
21536 return a + separator + b;
21537}
21538exports.joinPathSegments = joinPathSegments;
21539
21540
21541/***/ }),
21542/* 120 */
21543/***/ (function(module, exports, __webpack_require__) {
21544
21545"use strict";
21546
21547Object.defineProperty(exports, "__esModule", { value: true });
21548const common = __webpack_require__(119);
21549class Reader {
21550 constructor(_root, _settings) {
21551 this._root = _root;
21552 this._settings = _settings;
21553 this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
21554 }
21555}
21556exports.default = Reader;
21557
21558
21559/***/ }),
21560/* 121 */
21561/***/ (function(module, exports, __webpack_require__) {
21562
21563"use strict";
21564
21565Object.defineProperty(exports, "__esModule", { value: true });
21566const stream_1 = __webpack_require__(96);
21567const async_1 = __webpack_require__(107);
21568class StreamProvider {
21569 constructor(_root, _settings) {
21570 this._root = _root;
21571 this._settings = _settings;
21572 this._reader = new async_1.default(this._root, this._settings);
21573 this._stream = new stream_1.Readable({
21574 objectMode: true,
21575 read: () => { },
21576 destroy: this._reader.destroy.bind(this._reader)
21577 });
21578 }
21579 read() {
21580 this._reader.onError((error) => {
21581 this._stream.emit('error', error);
21582 });
21583 this._reader.onEntry((entry) => {
21584 this._stream.push(entry);
21585 });
21586 this._reader.onEnd(() => {
21587 this._stream.push(null);
21588 });
21589 this._reader.read();
21590 return this._stream;
21591 }
21592}
21593exports.default = StreamProvider;
21594
21595
21596/***/ }),
21597/* 122 */
21598/***/ (function(module, exports, __webpack_require__) {
21599
21600"use strict";
21601
21602Object.defineProperty(exports, "__esModule", { value: true });
21603const sync_1 = __webpack_require__(123);
21604class SyncProvider {
21605 constructor(_root, _settings) {
21606 this._root = _root;
21607 this._settings = _settings;
21608 this._reader = new sync_1.default(this._root, this._settings);
21609 }
21610 read() {
21611 return this._reader.read();
21612 }
21613}
21614exports.default = SyncProvider;
21615
21616
21617/***/ }),
21618/* 123 */
21619/***/ (function(module, exports, __webpack_require__) {
21620
21621"use strict";
21622
21623Object.defineProperty(exports, "__esModule", { value: true });
21624const fsScandir = __webpack_require__(108);
21625const common = __webpack_require__(119);
21626const reader_1 = __webpack_require__(120);
21627class SyncReader extends reader_1.default {
21628 constructor() {
21629 super(...arguments);
21630 this._scandir = fsScandir.scandirSync;
21631 this._storage = new Set();
21632 this._queue = new Set();
21633 }
21634 read() {
21635 this._pushToQueue(this._root, this._settings.basePath);
21636 this._handleQueue();
21637 return [...this._storage];
21638 }
21639 _pushToQueue(directory, base) {
21640 this._queue.add({ directory, base });
21641 }
21642 _handleQueue() {
21643 for (const item of this._queue.values()) {
21644 this._handleDirectory(item.directory, item.base);
21645 }
21646 }
21647 _handleDirectory(directory, base) {
21648 try {
21649 const entries = this._scandir(directory, this._settings.fsScandirSettings);
21650 for (const entry of entries) {
21651 this._handleEntry(entry, base);
21652 }
21653 }
21654 catch (error) {
21655 this._handleError(error);
21656 }
21657 }
21658 _handleError(error) {
21659 if (!common.isFatalError(this._settings, error)) {
21660 return;
21661 }
21662 throw error;
21663 }
21664 _handleEntry(entry, base) {
21665 const fullpath = entry.path;
21666 if (base !== undefined) {
21667 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
21668 }
21669 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
21670 this._pushToStorage(entry);
21671 }
21672 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
21673 this._pushToQueue(fullpath, entry.path);
21674 }
21675 }
21676 _pushToStorage(entry) {
21677 this._storage.add(entry);
21678 }
21679}
21680exports.default = SyncReader;
21681
21682
21683/***/ }),
21684/* 124 */
21685/***/ (function(module, exports, __webpack_require__) {
21686
21687"use strict";
21688
21689Object.defineProperty(exports, "__esModule", { value: true });
21690const path = __webpack_require__(13);
21691const fsScandir = __webpack_require__(108);
21692class Settings {
21693 constructor(_options = {}) {
21694 this._options = _options;
21695 this.basePath = this._getValue(this._options.basePath, undefined);
21696 this.concurrency = this._getValue(this._options.concurrency, Infinity);
21697 this.deepFilter = this._getValue(this._options.deepFilter, null);
21698 this.entryFilter = this._getValue(this._options.entryFilter, null);
21699 this.errorFilter = this._getValue(this._options.errorFilter, null);
21700 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
21701 this.fsScandirSettings = new fsScandir.Settings({
21702 followSymbolicLinks: this._options.followSymbolicLinks,
21703 fs: this._options.fs,
21704 pathSegmentSeparator: this._options.pathSegmentSeparator,
21705 stats: this._options.stats,
21706 throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
21707 });
21708 }
21709 _getValue(option, value) {
21710 return option === undefined ? value : option;
21711 }
21712}
21713exports.default = Settings;
21714
21715
21716/***/ }),
21717/* 125 */
21718/***/ (function(module, exports, __webpack_require__) {
21719
21720"use strict";
21721
21722Object.defineProperty(exports, "__esModule", { value: true });
21723const path = __webpack_require__(13);
21724const fsStat = __webpack_require__(100);
21725const utils = __webpack_require__(62);
21726class Reader {
21727 constructor(_settings) {
21728 this._settings = _settings;
21729 this._fsStatSettings = new fsStat.Settings({
21730 followSymbolicLink: this._settings.followSymbolicLinks,
21731 fs: this._settings.fs,
21732 throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
21733 });
21734 }
21735 _getFullEntryPath(filepath) {
21736 return path.resolve(this._settings.cwd, filepath);
21737 }
21738 _makeEntry(stats, pattern) {
21739 const entry = {
21740 name: pattern,
21741 path: pattern,
21742 dirent: utils.fs.createDirentFromStats(pattern, stats)
21743 };
21744 if (this._settings.stats) {
21745 entry.stats = stats;
21746 }
21747 return entry;
21748 }
21749 _isFatalError(error) {
21750 return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
21751 }
21752}
21753exports.default = Reader;
21754
21755
21756/***/ }),
21757/* 126 */
21758/***/ (function(module, exports, __webpack_require__) {
21759
21760"use strict";
21761
21762Object.defineProperty(exports, "__esModule", { value: true });
21763const path = __webpack_require__(13);
21764const deep_1 = __webpack_require__(127);
21765const entry_1 = __webpack_require__(130);
21766const error_1 = __webpack_require__(131);
21767const entry_2 = __webpack_require__(132);
21768class Provider {
21769 constructor(_settings) {
21770 this._settings = _settings;
21771 this.errorFilter = new error_1.default(this._settings);
21772 this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
21773 this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
21774 this.entryTransformer = new entry_2.default(this._settings);
21775 }
21776 _getRootDirectory(task) {
21777 return path.resolve(this._settings.cwd, task.base);
21778 }
21779 _getReaderOptions(task) {
21780 const basePath = task.base === '.' ? '' : task.base;
21781 return {
21782 basePath,
21783 pathSegmentSeparator: '/',
21784 concurrency: this._settings.concurrency,
21785 deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
21786 entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
21787 errorFilter: this.errorFilter.getFilter(),
21788 followSymbolicLinks: this._settings.followSymbolicLinks,
21789 fs: this._settings.fs,
21790 stats: this._settings.stats,
21791 throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
21792 transform: this.entryTransformer.getTransformer()
21793 };
21794 }
21795 _getMicromatchOptions() {
21796 return {
21797 dot: this._settings.dot,
21798 matchBase: this._settings.baseNameMatch,
21799 nobrace: !this._settings.braceExpansion,
21800 nocase: !this._settings.caseSensitiveMatch,
21801 noext: !this._settings.extglob,
21802 noglobstar: !this._settings.globstar,
21803 posix: true,
21804 strictSlashes: false
21805 };
21806 }
21807}
21808exports.default = Provider;
21809
21810
21811/***/ }),
21812/* 127 */
21813/***/ (function(module, exports, __webpack_require__) {
21814
21815"use strict";
21816
21817Object.defineProperty(exports, "__esModule", { value: true });
21818const utils = __webpack_require__(62);
21819const partial_1 = __webpack_require__(128);
21820class DeepFilter {
21821 constructor(_settings, _micromatchOptions) {
21822 this._settings = _settings;
21823 this._micromatchOptions = _micromatchOptions;
21824 }
21825 getFilter(basePath, positive, negative) {
21826 const matcher = this._getMatcher(positive);
21827 const negativeRe = this._getNegativePatternsRe(negative);
21828 return (entry) => this._filter(basePath, entry, matcher, negativeRe);
21829 }
21830 _getMatcher(patterns) {
21831 return new partial_1.default(patterns, this._settings, this._micromatchOptions);
21832 }
21833 _getNegativePatternsRe(patterns) {
21834 const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
21835 return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
21836 }
21837 _filter(basePath, entry, matcher, negativeRe) {
21838 if (this._isSkippedByDeep(basePath, entry.path)) {
21839 return false;
21840 }
21841 if (this._isSkippedSymbolicLink(entry)) {
21842 return false;
21843 }
21844 const filepath = utils.path.removeLeadingDotSegment(entry.path);
21845 if (this._isSkippedByPositivePatterns(filepath, matcher)) {
21846 return false;
21847 }
21848 return this._isSkippedByNegativePatterns(filepath, negativeRe);
21849 }
21850 _isSkippedByDeep(basePath, entryPath) {
21851 /**
21852 * Avoid unnecessary depth calculations when it doesn't matter.
21853 */
21854 if (this._settings.deep === Infinity) {
21855 return false;
21856 }
21857 return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
21858 }
21859 _getEntryLevel(basePath, entryPath) {
21860 const entryPathDepth = entryPath.split('/').length;
21861 if (basePath === '') {
21862 return entryPathDepth;
21863 }
21864 const basePathDepth = basePath.split('/').length;
21865 return entryPathDepth - basePathDepth;
21866 }
21867 _isSkippedSymbolicLink(entry) {
21868 return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
21869 }
21870 _isSkippedByPositivePatterns(entryPath, matcher) {
21871 return !this._settings.baseNameMatch && !matcher.match(entryPath);
21872 }
21873 _isSkippedByNegativePatterns(entryPath, patternsRe) {
21874 return !utils.pattern.matchAny(entryPath, patternsRe);
21875 }
21876}
21877exports.default = DeepFilter;
21878
21879
21880/***/ }),
21881/* 128 */
21882/***/ (function(module, exports, __webpack_require__) {
21883
21884"use strict";
21885
21886Object.defineProperty(exports, "__esModule", { value: true });
21887const matcher_1 = __webpack_require__(129);
21888class PartialMatcher extends matcher_1.default {
21889 match(filepath) {
21890 const parts = filepath.split('/');
21891 const levels = parts.length;
21892 const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
21893 for (const pattern of patterns) {
21894 const section = pattern.sections[0];
21895 /**
21896 * In this case, the pattern has a globstar and we must read all directories unconditionally,
21897 * but only if the level has reached the end of the first group.
21898 *
21899 * fixtures/{a,b}/**
21900 * ^ true/false ^ always true
21901 */
21902 if (!pattern.complete && levels > section.length) {
21903 return true;
21904 }
21905 const match = parts.every((part, index) => {
21906 const segment = pattern.segments[index];
21907 if (segment.dynamic && segment.patternRe.test(part)) {
21908 return true;
21909 }
21910 if (!segment.dynamic && segment.pattern === part) {
21911 return true;
21912 }
21913 return false;
21914 });
21915 if (match) {
21916 return true;
21917 }
21918 }
21919 return false;
21920 }
21921}
21922exports.default = PartialMatcher;
21923
21924
21925/***/ }),
21926/* 129 */
21927/***/ (function(module, exports, __webpack_require__) {
21928
21929"use strict";
21930
21931Object.defineProperty(exports, "__esModule", { value: true });
21932const utils = __webpack_require__(62);
21933class Matcher {
21934 constructor(_patterns, _settings, _micromatchOptions) {
21935 this._patterns = _patterns;
21936 this._settings = _settings;
21937 this._micromatchOptions = _micromatchOptions;
21938 this._storage = [];
21939 this._fillStorage();
21940 }
21941 _fillStorage() {
21942 /**
21943 * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
21944 * So, before expand patterns with brace expansion into separated patterns.
21945 */
21946 const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns);
21947 for (const pattern of patterns) {
21948 const segments = this._getPatternSegments(pattern);
21949 const sections = this._splitSegmentsIntoSections(segments);
21950 this._storage.push({
21951 complete: sections.length <= 1,
21952 pattern,
21953 segments,
21954 sections
21955 });
21956 }
21957 }
21958 _getPatternSegments(pattern) {
21959 const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
21960 return parts.map((part) => {
21961 const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
21962 if (!dynamic) {
21963 return {
21964 dynamic: false,
21965 pattern: part
21966 };
21967 }
21968 return {
21969 dynamic: true,
21970 pattern: part,
21971 patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
21972 };
21973 });
21974 }
21975 _splitSegmentsIntoSections(segments) {
21976 return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
21977 }
21978}
21979exports.default = Matcher;
21980
21981
21982/***/ }),
21983/* 130 */
21984/***/ (function(module, exports, __webpack_require__) {
21985
21986"use strict";
21987
21988Object.defineProperty(exports, "__esModule", { value: true });
21989const utils = __webpack_require__(62);
21990class EntryFilter {
21991 constructor(_settings, _micromatchOptions) {
21992 this._settings = _settings;
21993 this._micromatchOptions = _micromatchOptions;
21994 this.index = new Map();
21995 }
21996 getFilter(positive, negative) {
21997 const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
21998 const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
21999 return (entry) => this._filter(entry, positiveRe, negativeRe);
22000 }
22001 _filter(entry, positiveRe, negativeRe) {
22002 if (this._settings.unique && this._isDuplicateEntry(entry)) {
22003 return false;
22004 }
22005 if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
22006 return false;
22007 }
22008 if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) {
22009 return false;
22010 }
22011 const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
22012 const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
22013 if (this._settings.unique && isMatched) {
22014 this._createIndexRecord(entry);
22015 }
22016 return isMatched;
22017 }
22018 _isDuplicateEntry(entry) {
22019 return this.index.has(entry.path);
22020 }
22021 _createIndexRecord(entry) {
22022 this.index.set(entry.path, undefined);
22023 }
22024 _onlyFileFilter(entry) {
22025 return this._settings.onlyFiles && !entry.dirent.isFile();
22026 }
22027 _onlyDirectoryFilter(entry) {
22028 return this._settings.onlyDirectories && !entry.dirent.isDirectory();
22029 }
22030 _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
22031 if (!this._settings.absolute) {
22032 return false;
22033 }
22034 const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
22035 return utils.pattern.matchAny(fullpath, patternsRe);
22036 }
22037 _isMatchToPatterns(entryPath, patternsRe) {
22038 const filepath = utils.path.removeLeadingDotSegment(entryPath);
22039 return utils.pattern.matchAny(filepath, patternsRe);
22040 }
22041}
22042exports.default = EntryFilter;
22043
22044
22045/***/ }),
22046/* 131 */
22047/***/ (function(module, exports, __webpack_require__) {
22048
22049"use strict";
22050
22051Object.defineProperty(exports, "__esModule", { value: true });
22052const utils = __webpack_require__(62);
22053class ErrorFilter {
22054 constructor(_settings) {
22055 this._settings = _settings;
22056 }
22057 getFilter() {
22058 return (error) => this._isNonFatalError(error);
22059 }
22060 _isNonFatalError(error) {
22061 return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
22062 }
22063}
22064exports.default = ErrorFilter;
22065
22066
22067/***/ }),
22068/* 132 */
22069/***/ (function(module, exports, __webpack_require__) {
22070
22071"use strict";
22072
22073Object.defineProperty(exports, "__esModule", { value: true });
22074const utils = __webpack_require__(62);
22075class EntryTransformer {
22076 constructor(_settings) {
22077 this._settings = _settings;
22078 }
22079 getTransformer() {
22080 return (entry) => this._transform(entry);
22081 }
22082 _transform(entry) {
22083 let filepath = entry.path;
22084 if (this._settings.absolute) {
22085 filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
22086 filepath = utils.path.unixify(filepath);
22087 }
22088 if (this._settings.markDirectories && entry.dirent.isDirectory()) {
22089 filepath += '/';
22090 }
22091 if (!this._settings.objectMode) {
22092 return filepath;
22093 }
22094 return Object.assign(Object.assign({}, entry), { path: filepath });
22095 }
22096}
22097exports.default = EntryTransformer;
22098
22099
22100/***/ }),
22101/* 133 */
22102/***/ (function(module, exports, __webpack_require__) {
22103
22104"use strict";
22105
22106Object.defineProperty(exports, "__esModule", { value: true });
22107const stream_1 = __webpack_require__(96);
22108const stream_2 = __webpack_require__(99);
22109const provider_1 = __webpack_require__(126);
22110class ProviderStream extends provider_1.default {
22111 constructor() {
22112 super(...arguments);
22113 this._reader = new stream_2.default(this._settings);
22114 }
22115 read(task) {
22116 const root = this._getRootDirectory(task);
22117 const options = this._getReaderOptions(task);
22118 const source = this.api(root, task, options);
22119 const destination = new stream_1.Readable({ objectMode: true, read: () => { } });
22120 source
22121 .once('error', (error) => destination.emit('error', error))
22122 .on('data', (entry) => destination.emit('data', options.transform(entry)))
22123 .once('end', () => destination.emit('end'));
22124 destination
22125 .once('close', () => source.destroy());
22126 return destination;
22127 }
22128 api(root, task, options) {
22129 if (task.dynamic) {
22130 return this._reader.dynamic(root, options);
22131 }
22132 return this._reader.static(task.patterns, options);
22133 }
22134}
22135exports.default = ProviderStream;
22136
22137
22138/***/ }),
22139/* 134 */
22140/***/ (function(module, exports, __webpack_require__) {
22141
22142"use strict";
22143
22144Object.defineProperty(exports, "__esModule", { value: true });
22145const sync_1 = __webpack_require__(135);
22146const provider_1 = __webpack_require__(126);
22147class ProviderSync extends provider_1.default {
22148 constructor() {
22149 super(...arguments);
22150 this._reader = new sync_1.default(this._settings);
22151 }
22152 read(task) {
22153 const root = this._getRootDirectory(task);
22154 const options = this._getReaderOptions(task);
22155 const entries = this.api(root, task, options);
22156 return entries.map(options.transform);
22157 }
22158 api(root, task, options) {
22159 if (task.dynamic) {
22160 return this._reader.dynamic(root, options);
22161 }
22162 return this._reader.static(task.patterns, options);
22163 }
22164}
22165exports.default = ProviderSync;
22166
22167
22168/***/ }),
22169/* 135 */
22170/***/ (function(module, exports, __webpack_require__) {
22171
22172"use strict";
22173
22174Object.defineProperty(exports, "__esModule", { value: true });
22175const fsStat = __webpack_require__(100);
22176const fsWalk = __webpack_require__(105);
22177const reader_1 = __webpack_require__(125);
22178class ReaderSync extends reader_1.default {
22179 constructor() {
22180 super(...arguments);
22181 this._walkSync = fsWalk.walkSync;
22182 this._statSync = fsStat.statSync;
22183 }
22184 dynamic(root, options) {
22185 return this._walkSync(root, options);
22186 }
22187 static(patterns, options) {
22188 const entries = [];
22189 for (const pattern of patterns) {
22190 const filepath = this._getFullEntryPath(pattern);
22191 const entry = this._getEntry(filepath, pattern, options);
22192 if (entry === null || !options.entryFilter(entry)) {
22193 continue;
22194 }
22195 entries.push(entry);
22196 }
22197 return entries;
22198 }
22199 _getEntry(filepath, pattern, options) {
22200 try {
22201 const stats = this._getStat(filepath);
22202 return this._makeEntry(stats, pattern);
22203 }
22204 catch (error) {
22205 if (options.errorFilter(error)) {
22206 return null;
22207 }
22208 throw error;
22209 }
22210 }
22211 _getStat(filepath) {
22212 return this._statSync(filepath, this._fsStatSettings);
22213 }
22214}
22215exports.default = ReaderSync;
22216
22217
22218/***/ }),
22219/* 136 */
22220/***/ (function(module, exports, __webpack_require__) {
22221
22222"use strict";
22223
22224Object.defineProperty(exports, "__esModule", { value: true });
22225exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
22226const fs = __webpack_require__(40);
22227const os = __webpack_require__(14);
22228const CPU_COUNT = os.cpus().length;
22229exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
22230 lstat: fs.lstat,
22231 lstatSync: fs.lstatSync,
22232 stat: fs.stat,
22233 statSync: fs.statSync,
22234 readdir: fs.readdir,
22235 readdirSync: fs.readdirSync
22236};
22237class Settings {
22238 constructor(_options = {}) {
22239 this._options = _options;
22240 this.absolute = this._getValue(this._options.absolute, false);
22241 this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
22242 this.braceExpansion = this._getValue(this._options.braceExpansion, true);
22243 this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
22244 this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
22245 this.cwd = this._getValue(this._options.cwd, process.cwd());
22246 this.deep = this._getValue(this._options.deep, Infinity);
22247 this.dot = this._getValue(this._options.dot, false);
22248 this.extglob = this._getValue(this._options.extglob, true);
22249 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
22250 this.fs = this._getFileSystemMethods(this._options.fs);
22251 this.globstar = this._getValue(this._options.globstar, true);
22252 this.ignore = this._getValue(this._options.ignore, []);
22253 this.markDirectories = this._getValue(this._options.markDirectories, false);
22254 this.objectMode = this._getValue(this._options.objectMode, false);
22255 this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
22256 this.onlyFiles = this._getValue(this._options.onlyFiles, true);
22257 this.stats = this._getValue(this._options.stats, false);
22258 this.suppressErrors = this._getValue(this._options.suppressErrors, false);
22259 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
22260 this.unique = this._getValue(this._options.unique, true);
22261 if (this.onlyDirectories) {
22262 this.onlyFiles = false;
22263 }
22264 if (this.stats) {
22265 this.objectMode = true;
22266 }
22267 }
22268 _getValue(option, value) {
22269 return option === undefined ? value : option;
22270 }
22271 _getFileSystemMethods(methods = {}) {
22272 return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
22273 }
22274}
22275exports.default = Settings;
22276
22277
22278/***/ }),
22279/* 137 */,
22280/* 138 */,
22281/* 139 */,
22282/* 140 */,
22283/* 141 */,
22284/* 142 */,
22285/* 143 */,
22286/* 144 */,
22287/* 145 */,
22288/* 146 */,
22289/* 147 */,
22290/* 148 */,
22291/* 149 */
22292/***/ (function(module, __webpack_exports__, __webpack_require__) {
22293
22294"use strict";
22295__webpack_require__.r(__webpack_exports__);
22296/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; });
22297/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uriToFsPath", function() { return uriToFsPath; });
22298/*---------------------------------------------------------------------------------------------
22299 * Copyright (c) Microsoft Corporation. All rights reserved.
22300 * Licensed under the MIT License. See License.txt in the project root for license information.
22301 *--------------------------------------------------------------------------------------------*/
22302
22303var __extends = (undefined && undefined.__extends) || (function () {
22304 var extendStatics = function (d, b) {
22305 extendStatics = Object.setPrototypeOf ||
22306 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22307 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22308 return extendStatics(d, b);
22309 };
22310 return function (d, b) {
22311 extendStatics(d, b);
22312 function __() { this.constructor = d; }
22313 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22314 };
22315})();
22316var _a;
22317var isWindows;
22318if (typeof process === 'object') {
22319 isWindows = process.platform === 'win32';
22320}
22321else if (typeof navigator === 'object') {
22322 var userAgent = navigator.userAgent;
22323 isWindows = userAgent.indexOf('Windows') >= 0;
22324}
22325function isHighSurrogate(charCode) {
22326 return (0xD800 <= charCode && charCode <= 0xDBFF);
22327}
22328function isLowSurrogate(charCode) {
22329 return (0xDC00 <= charCode && charCode <= 0xDFFF);
22330}
22331function isLowerAsciiHex(code) {
22332 return code >= 97 /* a */ && code <= 102 /* f */;
22333}
22334function isLowerAsciiLetter(code) {
22335 return code >= 97 /* a */ && code <= 122 /* z */;
22336}
22337function isUpperAsciiLetter(code) {
22338 return code >= 65 /* A */ && code <= 90 /* Z */;
22339}
22340function isAsciiLetter(code) {
22341 return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
22342}
22343//#endregion
22344var _schemePattern = /^\w[\w\d+.-]*$/;
22345var _singleSlashStart = /^\//;
22346var _doubleSlashStart = /^\/\//;
22347function _validateUri(ret, _strict) {
22348 // scheme, must be set
22349 if (!ret.scheme && _strict) {
22350 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
22351 }
22352 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
22353 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
22354 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
22355 throw new Error('[UriError]: Scheme contains illegal characters.');
22356 }
22357 // path, http://tools.ietf.org/html/rfc3986#section-3.3
22358 // If a URI contains an authority component, then the path component
22359 // must either be empty or begin with a slash ("/") character. If a URI
22360 // does not contain an authority component, then the path cannot begin
22361 // with two slash characters ("//").
22362 if (ret.path) {
22363 if (ret.authority) {
22364 if (!_singleSlashStart.test(ret.path)) {
22365 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');
22366 }
22367 }
22368 else {
22369 if (_doubleSlashStart.test(ret.path)) {
22370 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
22371 }
22372 }
22373 }
22374}
22375// for a while we allowed uris *without* schemes and this is the migration
22376// for them, e.g. an uri without scheme and without strict-mode warns and falls
22377// back to the file-scheme. that should cause the least carnage and still be a
22378// clear warning
22379function _schemeFix(scheme, _strict) {
22380 if (!scheme && !_strict) {
22381 return 'file';
22382 }
22383 return scheme;
22384}
22385// implements a bit of https://tools.ietf.org/html/rfc3986#section-5
22386function _referenceResolution(scheme, path) {
22387 // the slash-character is our 'default base' as we don't
22388 // support constructing URIs relative to other URIs. This
22389 // also means that we alter and potentially break paths.
22390 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
22391 switch (scheme) {
22392 case 'https':
22393 case 'http':
22394 case 'file':
22395 if (!path) {
22396 path = _slash;
22397 }
22398 else if (path[0] !== _slash) {
22399 path = _slash + path;
22400 }
22401 break;
22402 }
22403 return path;
22404}
22405var _empty = '';
22406var _slash = '/';
22407var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
22408/**
22409 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
22410 * This class is a simple parser which creates the basic component parts
22411 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
22412 * and encoding.
22413 *
22414 * ```txt
22415 * foo://example.com:8042/over/there?name=ferret#nose
22416 * \_/ \______________/\_________/ \_________/ \__/
22417 * | | | | |
22418 * scheme authority path query fragment
22419 * | _____________________|__
22420 * / \ / \
22421 * urn:example:animal:ferret:nose
22422 * ```
22423 */
22424var URI = /** @class */ (function () {
22425 /**
22426 * @internal
22427 */
22428 function URI(schemeOrData, authority, path, query, fragment, _strict) {
22429 if (_strict === void 0) { _strict = false; }
22430 if (typeof schemeOrData === 'object') {
22431 this.scheme = schemeOrData.scheme || _empty;
22432 this.authority = schemeOrData.authority || _empty;
22433 this.path = schemeOrData.path || _empty;
22434 this.query = schemeOrData.query || _empty;
22435 this.fragment = schemeOrData.fragment || _empty;
22436 // no validation because it's this URI
22437 // that creates uri components.
22438 // _validateUri(this);
22439 }
22440 else {
22441 this.scheme = _schemeFix(schemeOrData, _strict);
22442 this.authority = authority || _empty;
22443 this.path = _referenceResolution(this.scheme, path || _empty);
22444 this.query = query || _empty;
22445 this.fragment = fragment || _empty;
22446 _validateUri(this, _strict);
22447 }
22448 }
22449 URI.isUri = function (thing) {
22450 if (thing instanceof URI) {
22451 return true;
22452 }
22453 if (!thing) {
22454 return false;
22455 }
22456 return typeof thing.authority === 'string'
22457 && typeof thing.fragment === 'string'
22458 && typeof thing.path === 'string'
22459 && typeof thing.query === 'string'
22460 && typeof thing.scheme === 'string'
22461 && typeof thing.fsPath === 'function'
22462 && typeof thing.with === 'function'
22463 && typeof thing.toString === 'function';
22464 };
22465 Object.defineProperty(URI.prototype, "fsPath", {
22466 // ---- filesystem path -----------------------
22467 /**
22468 * Returns a string representing the corresponding file system path of this URI.
22469 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
22470 * platform specific path separator.
22471 *
22472 * * Will *not* validate the path for invalid characters and semantics.
22473 * * Will *not* look at the scheme of this URI.
22474 * * The result shall *not* be used for display purposes but for accessing a file on disk.
22475 *
22476 *
22477 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
22478 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
22479 *
22480 * ```ts
22481 const u = URI.parse('file://server/c$/folder/file.txt')
22482 u.authority === 'server'
22483 u.path === '/shares/c$/file.txt'
22484 u.fsPath === '\\server\c$\folder\file.txt'
22485 ```
22486 *
22487 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
22488 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
22489 * with URIs that represent files on disk (`file` scheme).
22490 */
22491 get: function () {
22492 // if (this.scheme !== 'file') {
22493 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
22494 // }
22495 return uriToFsPath(this, false);
22496 },
22497 enumerable: true,
22498 configurable: true
22499 });
22500 // ---- modify to new -------------------------
22501 URI.prototype.with = function (change) {
22502 if (!change) {
22503 return this;
22504 }
22505 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
22506 if (scheme === undefined) {
22507 scheme = this.scheme;
22508 }
22509 else if (scheme === null) {
22510 scheme = _empty;
22511 }
22512 if (authority === undefined) {
22513 authority = this.authority;
22514 }
22515 else if (authority === null) {
22516 authority = _empty;
22517 }
22518 if (path === undefined) {
22519 path = this.path;
22520 }
22521 else if (path === null) {
22522 path = _empty;
22523 }
22524 if (query === undefined) {
22525 query = this.query;
22526 }
22527 else if (query === null) {
22528 query = _empty;
22529 }
22530 if (fragment === undefined) {
22531 fragment = this.fragment;
22532 }
22533 else if (fragment === null) {
22534 fragment = _empty;
22535 }
22536 if (scheme === this.scheme
22537 && authority === this.authority
22538 && path === this.path
22539 && query === this.query
22540 && fragment === this.fragment) {
22541 return this;
22542 }
22543 return new _URI(scheme, authority, path, query, fragment);
22544 };
22545 // ---- parse & validate ------------------------
22546 /**
22547 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
22548 * `file:///usr/home`, or `scheme:with/path`.
22549 *
22550 * @param value A string which represents an URI (see `URI#toString`).
22551 */
22552 URI.parse = function (value, _strict) {
22553 if (_strict === void 0) { _strict = false; }
22554 var match = _regexp.exec(value);
22555 if (!match) {
22556 return new _URI(_empty, _empty, _empty, _empty, _empty);
22557 }
22558 return new _URI(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);
22559 };
22560 /**
22561 * Creates a new URI from a file system path, e.g. `c:\my\files`,
22562 * `/usr/home`, or `\\server\share\some\path`.
22563 *
22564 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
22565 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
22566 * `URI.parse('file://' + path)` because the path might contain characters that are
22567 * interpreted (# and ?). See the following sample:
22568 * ```ts
22569 const good = URI.file('/coding/c#/project1');
22570 good.scheme === 'file';
22571 good.path === '/coding/c#/project1';
22572 good.fragment === '';
22573 const bad = URI.parse('file://' + '/coding/c#/project1');
22574 bad.scheme === 'file';
22575 bad.path === '/coding/c'; // path is now broken
22576 bad.fragment === '/project1';
22577 ```
22578 *
22579 * @param path A file system path (see `URI#fsPath`)
22580 */
22581 URI.file = function (path) {
22582 var authority = _empty;
22583 // normalize to fwd-slashes on windows,
22584 // on other systems bwd-slashes are valid
22585 // filename character, eg /f\oo/ba\r.txt
22586 if (isWindows) {
22587 path = path.replace(/\\/g, _slash);
22588 }
22589 // check for authority as used in UNC shares
22590 // or use the path as given
22591 if (path[0] === _slash && path[1] === _slash) {
22592 var idx = path.indexOf(_slash, 2);
22593 if (idx === -1) {
22594 authority = path.substring(2);
22595 path = _slash;
22596 }
22597 else {
22598 authority = path.substring(2, idx);
22599 path = path.substring(idx) || _slash;
22600 }
22601 }
22602 return new _URI('file', authority, path, _empty, _empty);
22603 };
22604 URI.from = function (components) {
22605 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
22606 };
22607 // /**
22608 // * Join a URI path with path fragments and normalizes the resulting path.
22609 // *
22610 // * @param uri The input URI.
22611 // * @param pathFragment The path fragment to add to the URI path.
22612 // * @returns The resulting URI.
22613 // */
22614 // static joinPath(uri: URI, ...pathFragment: string[]): URI {
22615 // if (!uri.path) {
22616 // throw new Error(`[UriError]: cannot call joinPaths on URI without path`);
22617 // }
22618 // let newPath: string;
22619 // if (isWindows && uri.scheme === 'file') {
22620 // newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;
22621 // } else {
22622 // newPath = paths.posix.join(uri.path, ...pathFragment);
22623 // }
22624 // return uri.with({ path: newPath });
22625 // }
22626 // ---- printing/externalize ---------------------------
22627 /**
22628 * Creates a string representation for this URI. It's guaranteed that calling
22629 * `URI.parse` with the result of this function creates an URI which is equal
22630 * to this URI.
22631 *
22632 * * The result shall *not* be used for display purposes but for externalization or transport.
22633 * * The result will be encoded using the percentage encoding and encoding happens mostly
22634 * ignore the scheme-specific encoding rules.
22635 *
22636 * @param skipEncoding Do not encode the result, default is `false`
22637 */
22638 URI.prototype.toString = function (skipEncoding) {
22639 if (skipEncoding === void 0) { skipEncoding = false; }
22640 return _asFormatted(this, skipEncoding);
22641 };
22642 URI.prototype.toJSON = function () {
22643 return this;
22644 };
22645 URI.revive = function (data) {
22646 if (!data) {
22647 return data;
22648 }
22649 else if (data instanceof URI) {
22650 return data;
22651 }
22652 else {
22653 var result = new _URI(data);
22654 result._formatted = data.external;
22655 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
22656 return result;
22657 }
22658 };
22659 return URI;
22660}());
22661
22662var _pathSepMarker = isWindows ? 1 : undefined;
22663// eslint-disable-next-line @typescript-eslint/class-name-casing
22664var _URI = /** @class */ (function (_super) {
22665 __extends(_URI, _super);
22666 function _URI() {
22667 var _this = _super !== null && _super.apply(this, arguments) || this;
22668 _this._formatted = null;
22669 _this._fsPath = null;
22670 return _this;
22671 }
22672 Object.defineProperty(_URI.prototype, "fsPath", {
22673 get: function () {
22674 if (!this._fsPath) {
22675 this._fsPath = uriToFsPath(this, false);
22676 }
22677 return this._fsPath;
22678 },
22679 enumerable: true,
22680 configurable: true
22681 });
22682 _URI.prototype.toString = function (skipEncoding) {
22683 if (skipEncoding === void 0) { skipEncoding = false; }
22684 if (!skipEncoding) {
22685 if (!this._formatted) {
22686 this._formatted = _asFormatted(this, false);
22687 }
22688 return this._formatted;
22689 }
22690 else {
22691 // we don't cache that
22692 return _asFormatted(this, true);
22693 }
22694 };
22695 _URI.prototype.toJSON = function () {
22696 var res = {
22697 $mid: 1
22698 };
22699 // cached state
22700 if (this._fsPath) {
22701 res.fsPath = this._fsPath;
22702 res._sep = _pathSepMarker;
22703 }
22704 if (this._formatted) {
22705 res.external = this._formatted;
22706 }
22707 // uri components
22708 if (this.path) {
22709 res.path = this.path;
22710 }
22711 if (this.scheme) {
22712 res.scheme = this.scheme;
22713 }
22714 if (this.authority) {
22715 res.authority = this.authority;
22716 }
22717 if (this.query) {
22718 res.query = this.query;
22719 }
22720 if (this.fragment) {
22721 res.fragment = this.fragment;
22722 }
22723 return res;
22724 };
22725 return _URI;
22726}(URI));
22727// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
22728var encodeTable = (_a = {},
22729 _a[58 /* Colon */] = '%3A',
22730 _a[47 /* Slash */] = '%2F',
22731 _a[63 /* QuestionMark */] = '%3F',
22732 _a[35 /* Hash */] = '%23',
22733 _a[91 /* OpenSquareBracket */] = '%5B',
22734 _a[93 /* CloseSquareBracket */] = '%5D',
22735 _a[64 /* AtSign */] = '%40',
22736 _a[33 /* ExclamationMark */] = '%21',
22737 _a[36 /* DollarSign */] = '%24',
22738 _a[38 /* Ampersand */] = '%26',
22739 _a[39 /* SingleQuote */] = '%27',
22740 _a[40 /* OpenParen */] = '%28',
22741 _a[41 /* CloseParen */] = '%29',
22742 _a[42 /* Asterisk */] = '%2A',
22743 _a[43 /* Plus */] = '%2B',
22744 _a[44 /* Comma */] = '%2C',
22745 _a[59 /* Semicolon */] = '%3B',
22746 _a[61 /* Equals */] = '%3D',
22747 _a[32 /* Space */] = '%20',
22748 _a);
22749function encodeURIComponentFast(uriComponent, allowSlash) {
22750 var res = undefined;
22751 var nativeEncodePos = -1;
22752 for (var pos = 0; pos < uriComponent.length; pos++) {
22753 var code = uriComponent.charCodeAt(pos);
22754 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
22755 if ((code >= 97 /* a */ && code <= 122 /* z */)
22756 || (code >= 65 /* A */ && code <= 90 /* Z */)
22757 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
22758 || code === 45 /* Dash */
22759 || code === 46 /* Period */
22760 || code === 95 /* Underline */
22761 || code === 126 /* Tilde */
22762 || (allowSlash && code === 47 /* Slash */)) {
22763 // check if we are delaying native encode
22764 if (nativeEncodePos !== -1) {
22765 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
22766 nativeEncodePos = -1;
22767 }
22768 // check if we write into a new string (by default we try to return the param)
22769 if (res !== undefined) {
22770 res += uriComponent.charAt(pos);
22771 }
22772 }
22773 else {
22774 // encoding needed, we need to allocate a new string
22775 if (res === undefined) {
22776 res = uriComponent.substr(0, pos);
22777 }
22778 // check with default table first
22779 var escaped = encodeTable[code];
22780 if (escaped !== undefined) {
22781 // check if we are delaying native encode
22782 if (nativeEncodePos !== -1) {
22783 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
22784 nativeEncodePos = -1;
22785 }
22786 // append escaped variant to result
22787 res += escaped;
22788 }
22789 else if (nativeEncodePos === -1) {
22790 // use native encode only when needed
22791 nativeEncodePos = pos;
22792 }
22793 }
22794 }
22795 if (nativeEncodePos !== -1) {
22796 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
22797 }
22798 return res !== undefined ? res : uriComponent;
22799}
22800function encodeURIComponentMinimal(path) {
22801 var res = undefined;
22802 for (var pos = 0; pos < path.length; pos++) {
22803 var code = path.charCodeAt(pos);
22804 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
22805 if (res === undefined) {
22806 res = path.substr(0, pos);
22807 }
22808 res += encodeTable[code];
22809 }
22810 else {
22811 if (res !== undefined) {
22812 res += path[pos];
22813 }
22814 }
22815 }
22816 return res !== undefined ? res : path;
22817}
22818/**
22819 * Compute `fsPath` for the given uri
22820 */
22821function uriToFsPath(uri, keepDriveLetterCasing) {
22822 var value;
22823 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
22824 // unc path: file://shares/c$/far/boo
22825 value = "//" + uri.authority + uri.path;
22826 }
22827 else if (uri.path.charCodeAt(0) === 47 /* Slash */
22828 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
22829 && uri.path.charCodeAt(2) === 58 /* Colon */) {
22830 if (!keepDriveLetterCasing) {
22831 // windows drive letter: file:///c:/far/boo
22832 value = uri.path[1].toLowerCase() + uri.path.substr(2);
22833 }
22834 else {
22835 value = uri.path.substr(1);
22836 }
22837 }
22838 else {
22839 // other path
22840 value = uri.path;
22841 }
22842 if (isWindows) {
22843 value = value.replace(/\//g, '\\');
22844 }
22845 return value;
22846}
22847/**
22848 * Create the external version of a uri
22849 */
22850function _asFormatted(uri, skipEncoding) {
22851 var encoder = !skipEncoding
22852 ? encodeURIComponentFast
22853 : encodeURIComponentMinimal;
22854 var res = '';
22855 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
22856 if (scheme) {
22857 res += scheme;
22858 res += ':';
22859 }
22860 if (authority || scheme === 'file') {
22861 res += _slash;
22862 res += _slash;
22863 }
22864 if (authority) {
22865 var idx = authority.indexOf('@');
22866 if (idx !== -1) {
22867 // <user>@<auth>
22868 var userinfo = authority.substr(0, idx);
22869 authority = authority.substr(idx + 1);
22870 idx = userinfo.indexOf(':');
22871 if (idx === -1) {
22872 res += encoder(userinfo, false);
22873 }
22874 else {
22875 // <user>:<pass>@<auth>
22876 res += encoder(userinfo.substr(0, idx), false);
22877 res += ':';
22878 res += encoder(userinfo.substr(idx + 1), false);
22879 }
22880 res += '@';
22881 }
22882 authority = authority.toLowerCase();
22883 idx = authority.indexOf(':');
22884 if (idx === -1) {
22885 res += encoder(authority, false);
22886 }
22887 else {
22888 // <auth>:<port>
22889 res += encoder(authority.substr(0, idx), false);
22890 res += authority.substr(idx);
22891 }
22892 }
22893 if (path) {
22894 // lower-case windows drive letters in /C:/fff or C:/fff
22895 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
22896 var code = path.charCodeAt(1);
22897 if (code >= 65 /* A */ && code <= 90 /* Z */) {
22898 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
22899 }
22900 }
22901 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
22902 var code = path.charCodeAt(0);
22903 if (code >= 65 /* A */ && code <= 90 /* Z */) {
22904 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
22905 }
22906 }
22907 // encode the rest of the path
22908 res += encoder(path, true);
22909 }
22910 if (query) {
22911 res += '?';
22912 res += encoder(query, false);
22913 }
22914 if (fragment) {
22915 res += '#';
22916 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
22917 }
22918 return res;
22919}
22920// --- decode
22921function decodeURIComponentGraceful(str) {
22922 try {
22923 return decodeURIComponent(str);
22924 }
22925 catch (_a) {
22926 if (str.length > 3) {
22927 return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));
22928 }
22929 else {
22930 return str;
22931 }
22932 }
22933}
22934var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
22935function percentDecode(str) {
22936 if (!str.match(_rEncodedAsHex)) {
22937 return str;
22938 }
22939 return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); });
22940}
22941
22942
22943/***/ }),
22944/* 150 */,
22945/* 151 */,
22946/* 152 */,
22947/* 153 */,
22948/* 154 */,
22949/* 155 */,
22950/* 156 */,
22951/* 157 */,
22952/* 158 */,
22953/* 159 */,
22954/* 160 */,
22955/* 161 */,
22956/* 162 */,
22957/* 163 */,
22958/* 164 */,
22959/* 165 */,
22960/* 166 */
22961/***/ (function(module, __webpack_exports__, __webpack_require__) {
22962
22963"use strict";
22964__webpack_require__.r(__webpack_exports__);
22965/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
22966/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; });
22967
22968/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
22969/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; });
22970
22971/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(189);
22972/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; });
22973
22974/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(181);
22975/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; });
22976
22977/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
22978/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; });
22979
22980/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(190);
22981/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; });
22982
22983/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(191);
22984/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; });
22985
22986/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(208);
22987/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; });
22988
22989/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(209);
22990/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; });
22991
22992/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(213);
22993/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; });
22994
22995/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(192);
22996/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; });
22997
22998/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(214);
22999/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; });
23000
23001/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(217);
23002/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; });
23003
23004/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; });
23005
23006/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(198);
23007/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; });
23008
23009/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(175);
23010/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; });
23011
23012/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(169);
23013/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; });
23014
23015/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(200);
23016/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; });
23017
23018/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"]; });
23019
23020/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(182);
23021/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; });
23022
23023/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(218);
23024/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; });
23025
23026/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(183);
23027/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; });
23028
23029/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(219);
23030/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; });
23031
23032/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(220);
23033/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; });
23034
23035/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(221);
23036/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; });
23037
23038/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(186);
23039/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; });
23040
23041/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(178);
23042/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; });
23043
23044/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(222);
23045/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; });
23046
23047/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(223);
23048/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; });
23049
23050/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(225);
23051/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; });
23052
23053/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(226);
23054/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; });
23055
23056/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(237);
23057/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; });
23058
23059/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(248);
23060/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; });
23061
23062/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(201);
23063/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; });
23064
23065/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(249);
23066/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; });
23067
23068/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(241);
23069/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; });
23070
23071/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(250);
23072/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; });
23073
23074/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(251);
23075/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; });
23076
23077/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(252);
23078/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; });
23079
23080/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(253);
23081/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; });
23082
23083/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(254);
23084/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; });
23085
23086/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(256);
23087/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; });
23088
23089/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(257);
23090/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; });
23091
23092/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(202);
23093/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; });
23094
23095/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(258);
23096/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; });
23097
23098/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(259);
23099/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; });
23100
23101/* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(260);
23102/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"]; });
23103
23104/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(263);
23105/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"]; });
23106
23107/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(264);
23108/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"]; });
23109
23110/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(207);
23111/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"]; });
23112
23113/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(265);
23114/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"]; });
23115
23116/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(266);
23117/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"]; });
23118
23119/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(267);
23120/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"]; });
23121
23122/* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(242);
23123/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"]; });
23124
23125/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; });
23126
23127/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; });
23128
23129/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(173);
23130/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"]; });
23131
23132/** PURE_IMPORTS_START PURE_IMPORTS_END */
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188//# sourceMappingURL=index.js.map
23189
23190
23191/***/ }),
23192/* 167 */
23193/***/ (function(module, __webpack_exports__, __webpack_require__) {
23194
23195"use strict";
23196__webpack_require__.r(__webpack_exports__);
23197/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
23198/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(168);
23199/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(180);
23200/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(181);
23201/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
23202/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(173);
23203/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
23204
23205
23206
23207
23208
23209var Observable = /*@__PURE__*/ (function () {
23210 function Observable(subscribe) {
23211 this._isScalar = false;
23212 if (subscribe) {
23213 this._subscribe = subscribe;
23214 }
23215 }
23216 Observable.prototype.lift = function (operator) {
23217 var observable = new Observable();
23218 observable.source = this;
23219 observable.operator = operator;
23220 return observable;
23221 };
23222 Observable.prototype.subscribe = function (observerOrNext, error, complete) {
23223 var operator = this.operator;
23224 var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete);
23225 if (operator) {
23226 sink.add(operator.call(sink, this.source));
23227 }
23228 else {
23229 sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
23230 this._subscribe(sink) :
23231 this._trySubscribe(sink));
23232 }
23233 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
23234 if (sink.syncErrorThrowable) {
23235 sink.syncErrorThrowable = false;
23236 if (sink.syncErrorThrown) {
23237 throw sink.syncErrorValue;
23238 }
23239 }
23240 }
23241 return sink;
23242 };
23243 Observable.prototype._trySubscribe = function (sink) {
23244 try {
23245 return this._subscribe(sink);
23246 }
23247 catch (err) {
23248 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
23249 sink.syncErrorThrown = true;
23250 sink.syncErrorValue = err;
23251 }
23252 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) {
23253 sink.error(err);
23254 }
23255 else {
23256 console.warn(err);
23257 }
23258 }
23259 };
23260 Observable.prototype.forEach = function (next, promiseCtor) {
23261 var _this = this;
23262 promiseCtor = getPromiseCtor(promiseCtor);
23263 return new promiseCtor(function (resolve, reject) {
23264 var subscription;
23265 subscription = _this.subscribe(function (value) {
23266 try {
23267 next(value);
23268 }
23269 catch (err) {
23270 reject(err);
23271 if (subscription) {
23272 subscription.unsubscribe();
23273 }
23274 }
23275 }, reject, resolve);
23276 });
23277 };
23278 Observable.prototype._subscribe = function (subscriber) {
23279 var source = this.source;
23280 return source && source.subscribe(subscriber);
23281 };
23282 Observable.prototype[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]] = function () {
23283 return this;
23284 };
23285 Observable.prototype.pipe = function () {
23286 var operations = [];
23287 for (var _i = 0; _i < arguments.length; _i++) {
23288 operations[_i] = arguments[_i];
23289 }
23290 if (operations.length === 0) {
23291 return this;
23292 }
23293 return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
23294 };
23295 Observable.prototype.toPromise = function (promiseCtor) {
23296 var _this = this;
23297 promiseCtor = getPromiseCtor(promiseCtor);
23298 return new promiseCtor(function (resolve, reject) {
23299 var value;
23300 _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
23301 });
23302 };
23303 Observable.create = function (subscribe) {
23304 return new Observable(subscribe);
23305 };
23306 return Observable;
23307}());
23308
23309function getPromiseCtor(promiseCtor) {
23310 if (!promiseCtor) {
23311 promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise;
23312 }
23313 if (!promiseCtor) {
23314 throw new Error('no Promise impl found');
23315 }
23316 return promiseCtor;
23317}
23318//# sourceMappingURL=Observable.js.map
23319
23320
23321/***/ }),
23322/* 168 */
23323/***/ (function(module, __webpack_exports__, __webpack_require__) {
23324
23325"use strict";
23326__webpack_require__.r(__webpack_exports__);
23327/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; });
23328/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
23329/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */
23330
23331function canReportError(observer) {
23332 while (observer) {
23333 var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
23334 if (closed_1 || isStopped) {
23335 return false;
23336 }
23337 else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
23338 observer = destination;
23339 }
23340 else {
23341 observer = null;
23342 }
23343 }
23344 return true;
23345}
23346//# sourceMappingURL=canReportError.js.map
23347
23348
23349/***/ }),
23350/* 169 */
23351/***/ (function(module, __webpack_exports__, __webpack_require__) {
23352
23353"use strict";
23354__webpack_require__.r(__webpack_exports__);
23355/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; });
23356/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafeSubscriber", function() { return SafeSubscriber; });
23357/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
23358/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
23359/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
23360/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
23361/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(179);
23362/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(173);
23363/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(174);
23364/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
23365
23366
23367
23368
23369
23370
23371
23372var Subscriber = /*@__PURE__*/ (function (_super) {
23373 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subscriber, _super);
23374 function Subscriber(destinationOrNext, error, complete) {
23375 var _this = _super.call(this) || this;
23376 _this.syncErrorValue = null;
23377 _this.syncErrorThrown = false;
23378 _this.syncErrorThrowable = false;
23379 _this.isStopped = false;
23380 switch (arguments.length) {
23381 case 0:
23382 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
23383 break;
23384 case 1:
23385 if (!destinationOrNext) {
23386 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
23387 break;
23388 }
23389 if (typeof destinationOrNext === 'object') {
23390 if (destinationOrNext instanceof Subscriber) {
23391 _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
23392 _this.destination = destinationOrNext;
23393 destinationOrNext.add(_this);
23394 }
23395 else {
23396 _this.syncErrorThrowable = true;
23397 _this.destination = new SafeSubscriber(_this, destinationOrNext);
23398 }
23399 break;
23400 }
23401 default:
23402 _this.syncErrorThrowable = true;
23403 _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
23404 break;
23405 }
23406 return _this;
23407 }
23408 Subscriber.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__["rxSubscriber"]] = function () { return this; };
23409 Subscriber.create = function (next, error, complete) {
23410 var subscriber = new Subscriber(next, error, complete);
23411 subscriber.syncErrorThrowable = false;
23412 return subscriber;
23413 };
23414 Subscriber.prototype.next = function (value) {
23415 if (!this.isStopped) {
23416 this._next(value);
23417 }
23418 };
23419 Subscriber.prototype.error = function (err) {
23420 if (!this.isStopped) {
23421 this.isStopped = true;
23422 this._error(err);
23423 }
23424 };
23425 Subscriber.prototype.complete = function () {
23426 if (!this.isStopped) {
23427 this.isStopped = true;
23428 this._complete();
23429 }
23430 };
23431 Subscriber.prototype.unsubscribe = function () {
23432 if (this.closed) {
23433 return;
23434 }
23435 this.isStopped = true;
23436 _super.prototype.unsubscribe.call(this);
23437 };
23438 Subscriber.prototype._next = function (value) {
23439 this.destination.next(value);
23440 };
23441 Subscriber.prototype._error = function (err) {
23442 this.destination.error(err);
23443 this.unsubscribe();
23444 };
23445 Subscriber.prototype._complete = function () {
23446 this.destination.complete();
23447 this.unsubscribe();
23448 };
23449 Subscriber.prototype._unsubscribeAndRecycle = function () {
23450 var _parentOrParents = this._parentOrParents;
23451 this._parentOrParents = null;
23452 this.unsubscribe();
23453 this.closed = false;
23454 this.isStopped = false;
23455 this._parentOrParents = _parentOrParents;
23456 return this;
23457 };
23458 return Subscriber;
23459}(_Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"]));
23460
23461var SafeSubscriber = /*@__PURE__*/ (function (_super) {
23462 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SafeSubscriber, _super);
23463 function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
23464 var _this = _super.call(this) || this;
23465 _this._parentSubscriber = _parentSubscriber;
23466 var next;
23467 var context = _this;
23468 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(observerOrNext)) {
23469 next = observerOrNext;
23470 }
23471 else if (observerOrNext) {
23472 next = observerOrNext.next;
23473 error = observerOrNext.error;
23474 complete = observerOrNext.complete;
23475 if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]) {
23476 context = Object.create(observerOrNext);
23477 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(context.unsubscribe)) {
23478 _this.add(context.unsubscribe.bind(context));
23479 }
23480 context.unsubscribe = _this.unsubscribe.bind(_this);
23481 }
23482 }
23483 _this._context = context;
23484 _this._next = next;
23485 _this._error = error;
23486 _this._complete = complete;
23487 return _this;
23488 }
23489 SafeSubscriber.prototype.next = function (value) {
23490 if (!this.isStopped && this._next) {
23491 var _parentSubscriber = this._parentSubscriber;
23492 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23493 this.__tryOrUnsub(this._next, value);
23494 }
23495 else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
23496 this.unsubscribe();
23497 }
23498 }
23499 };
23500 SafeSubscriber.prototype.error = function (err) {
23501 if (!this.isStopped) {
23502 var _parentSubscriber = this._parentSubscriber;
23503 var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling;
23504 if (this._error) {
23505 if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23506 this.__tryOrUnsub(this._error, err);
23507 this.unsubscribe();
23508 }
23509 else {
23510 this.__tryOrSetError(_parentSubscriber, this._error, err);
23511 this.unsubscribe();
23512 }
23513 }
23514 else if (!_parentSubscriber.syncErrorThrowable) {
23515 this.unsubscribe();
23516 if (useDeprecatedSynchronousErrorHandling) {
23517 throw err;
23518 }
23519 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23520 }
23521 else {
23522 if (useDeprecatedSynchronousErrorHandling) {
23523 _parentSubscriber.syncErrorValue = err;
23524 _parentSubscriber.syncErrorThrown = true;
23525 }
23526 else {
23527 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23528 }
23529 this.unsubscribe();
23530 }
23531 }
23532 };
23533 SafeSubscriber.prototype.complete = function () {
23534 var _this = this;
23535 if (!this.isStopped) {
23536 var _parentSubscriber = this._parentSubscriber;
23537 if (this._complete) {
23538 var wrappedComplete = function () { return _this._complete.call(_this._context); };
23539 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23540 this.__tryOrUnsub(wrappedComplete);
23541 this.unsubscribe();
23542 }
23543 else {
23544 this.__tryOrSetError(_parentSubscriber, wrappedComplete);
23545 this.unsubscribe();
23546 }
23547 }
23548 else {
23549 this.unsubscribe();
23550 }
23551 }
23552 };
23553 SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
23554 try {
23555 fn.call(this._context, value);
23556 }
23557 catch (err) {
23558 this.unsubscribe();
23559 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
23560 throw err;
23561 }
23562 else {
23563 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23564 }
23565 }
23566 };
23567 SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
23568 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
23569 throw new Error('bad call');
23570 }
23571 try {
23572 fn.call(this._context, value);
23573 }
23574 catch (err) {
23575 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
23576 parent.syncErrorValue = err;
23577 parent.syncErrorThrown = true;
23578 return true;
23579 }
23580 else {
23581 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23582 return true;
23583 }
23584 }
23585 return false;
23586 };
23587 SafeSubscriber.prototype._unsubscribe = function () {
23588 var _parentSubscriber = this._parentSubscriber;
23589 this._context = null;
23590 this._parentSubscriber = null;
23591 _parentSubscriber.unsubscribe();
23592 };
23593 return SafeSubscriber;
23594}(Subscriber));
23595
23596//# sourceMappingURL=Subscriber.js.map
23597
23598
23599/***/ }),
23600/* 170 */
23601/***/ (function(module, __webpack_exports__, __webpack_require__) {
23602
23603"use strict";
23604__webpack_require__.r(__webpack_exports__);
23605/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
23606/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
23607/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
23608/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
23609/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
23610/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
23611/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
23612/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
23613/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
23614/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
23615/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
23616/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
23617/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
23618/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
23619/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
23620/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
23621/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
23622/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
23623/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
23624/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
23625/*! *****************************************************************************
23626Copyright (c) Microsoft Corporation. All rights reserved.
23627Licensed under the Apache License, Version 2.0 (the "License"); you may not use
23628this file except in compliance with the License. You may obtain a copy of the
23629License at http://www.apache.org/licenses/LICENSE-2.0
23630
23631THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23632KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
23633WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
23634MERCHANTABLITY OR NON-INFRINGEMENT.
23635
23636See the Apache Version 2.0 License for specific language governing permissions
23637and limitations under the License.
23638***************************************************************************** */
23639/* global Reflect, Promise */
23640
23641var extendStatics = function(d, b) {
23642 extendStatics = Object.setPrototypeOf ||
23643 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23644 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23645 return extendStatics(d, b);
23646};
23647
23648function __extends(d, b) {
23649 extendStatics(d, b);
23650 function __() { this.constructor = d; }
23651 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23652}
23653
23654var __assign = function() {
23655 __assign = Object.assign || function __assign(t) {
23656 for (var s, i = 1, n = arguments.length; i < n; i++) {
23657 s = arguments[i];
23658 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
23659 }
23660 return t;
23661 }
23662 return __assign.apply(this, arguments);
23663}
23664
23665function __rest(s, e) {
23666 var t = {};
23667 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
23668 t[p] = s[p];
23669 if (s != null && typeof Object.getOwnPropertySymbols === "function")
23670 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23671 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23672 t[p[i]] = s[p[i]];
23673 }
23674 return t;
23675}
23676
23677function __decorate(decorators, target, key, desc) {
23678 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23679 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23680 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;
23681 return c > 3 && r && Object.defineProperty(target, key, r), r;
23682}
23683
23684function __param(paramIndex, decorator) {
23685 return function (target, key) { decorator(target, key, paramIndex); }
23686}
23687
23688function __metadata(metadataKey, metadataValue) {
23689 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
23690}
23691
23692function __awaiter(thisArg, _arguments, P, generator) {
23693 return new (P || (P = Promise))(function (resolve, reject) {
23694 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
23695 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
23696 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
23697 step((generator = generator.apply(thisArg, _arguments || [])).next());
23698 });
23699}
23700
23701function __generator(thisArg, body) {
23702 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23703 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23704 function verb(n) { return function (v) { return step([n, v]); }; }
23705 function step(op) {
23706 if (f) throw new TypeError("Generator is already executing.");
23707 while (_) try {
23708 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;
23709 if (y = 0, t) op = [op[0] & 2, t.value];
23710 switch (op[0]) {
23711 case 0: case 1: t = op; break;
23712 case 4: _.label++; return { value: op[1], done: false };
23713 case 5: _.label++; y = op[1]; op = [0]; continue;
23714 case 7: op = _.ops.pop(); _.trys.pop(); continue;
23715 default:
23716 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
23717 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
23718 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
23719 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
23720 if (t[2]) _.ops.pop();
23721 _.trys.pop(); continue;
23722 }
23723 op = body.call(thisArg, _);
23724 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
23725 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
23726 }
23727}
23728
23729function __exportStar(m, exports) {
23730 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
23731}
23732
23733function __values(o) {
23734 var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
23735 if (m) return m.call(o);
23736 return {
23737 next: function () {
23738 if (o && i >= o.length) o = void 0;
23739 return { value: o && o[i++], done: !o };
23740 }
23741 };
23742}
23743
23744function __read(o, n) {
23745 var m = typeof Symbol === "function" && o[Symbol.iterator];
23746 if (!m) return o;
23747 var i = m.call(o), r, ar = [], e;
23748 try {
23749 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23750 }
23751 catch (error) { e = { error: error }; }
23752 finally {
23753 try {
23754 if (r && !r.done && (m = i["return"])) m.call(i);
23755 }
23756 finally { if (e) throw e.error; }
23757 }
23758 return ar;
23759}
23760
23761function __spread() {
23762 for (var ar = [], i = 0; i < arguments.length; i++)
23763 ar = ar.concat(__read(arguments[i]));
23764 return ar;
23765}
23766
23767function __spreadArrays() {
23768 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
23769 for (var r = Array(s), k = 0, i = 0; i < il; i++)
23770 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
23771 r[k] = a[j];
23772 return r;
23773};
23774
23775function __await(v) {
23776 return this instanceof __await ? (this.v = v, this) : new __await(v);
23777}
23778
23779function __asyncGenerator(thisArg, _arguments, generator) {
23780 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
23781 var g = generator.apply(thisArg, _arguments || []), i, q = [];
23782 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
23783 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); }); }; }
23784 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
23785 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
23786 function fulfill(value) { resume("next", value); }
23787 function reject(value) { resume("throw", value); }
23788 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
23789}
23790
23791function __asyncDelegator(o) {
23792 var i, p;
23793 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
23794 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; }
23795}
23796
23797function __asyncValues(o) {
23798 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
23799 var m = o[Symbol.asyncIterator], i;
23800 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);
23801 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); }); }; }
23802 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
23803}
23804
23805function __makeTemplateObject(cooked, raw) {
23806 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
23807 return cooked;
23808};
23809
23810function __importStar(mod) {
23811 if (mod && mod.__esModule) return mod;
23812 var result = {};
23813 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
23814 result.default = mod;
23815 return result;
23816}
23817
23818function __importDefault(mod) {
23819 return (mod && mod.__esModule) ? mod : { default: mod };
23820}
23821
23822
23823/***/ }),
23824/* 171 */
23825/***/ (function(module, __webpack_exports__, __webpack_require__) {
23826
23827"use strict";
23828__webpack_require__.r(__webpack_exports__);
23829/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; });
23830/** PURE_IMPORTS_START PURE_IMPORTS_END */
23831function isFunction(x) {
23832 return typeof x === 'function';
23833}
23834//# sourceMappingURL=isFunction.js.map
23835
23836
23837/***/ }),
23838/* 172 */
23839/***/ (function(module, __webpack_exports__, __webpack_require__) {
23840
23841"use strict";
23842__webpack_require__.r(__webpack_exports__);
23843/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
23844/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(173);
23845/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
23846/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
23847
23848
23849var empty = {
23850 closed: true,
23851 next: function (value) { },
23852 error: function (err) {
23853 if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) {
23854 throw err;
23855 }
23856 else {
23857 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err);
23858 }
23859 },
23860 complete: function () { }
23861};
23862//# sourceMappingURL=Observer.js.map
23863
23864
23865/***/ }),
23866/* 173 */
23867/***/ (function(module, __webpack_exports__, __webpack_require__) {
23868
23869"use strict";
23870__webpack_require__.r(__webpack_exports__);
23871/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; });
23872/** PURE_IMPORTS_START PURE_IMPORTS_END */
23873var _enable_super_gross_mode_that_will_cause_bad_things = false;
23874var config = {
23875 Promise: undefined,
23876 set useDeprecatedSynchronousErrorHandling(value) {
23877 if (value) {
23878 var error = /*@__PURE__*/ new Error();
23879 /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
23880 }
23881 else if (_enable_super_gross_mode_that_will_cause_bad_things) {
23882 /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
23883 }
23884 _enable_super_gross_mode_that_will_cause_bad_things = value;
23885 },
23886 get useDeprecatedSynchronousErrorHandling() {
23887 return _enable_super_gross_mode_that_will_cause_bad_things;
23888 },
23889};
23890//# sourceMappingURL=config.js.map
23891
23892
23893/***/ }),
23894/* 174 */
23895/***/ (function(module, __webpack_exports__, __webpack_require__) {
23896
23897"use strict";
23898__webpack_require__.r(__webpack_exports__);
23899/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; });
23900/** PURE_IMPORTS_START PURE_IMPORTS_END */
23901function hostReportError(err) {
23902 setTimeout(function () { throw err; }, 0);
23903}
23904//# sourceMappingURL=hostReportError.js.map
23905
23906
23907/***/ }),
23908/* 175 */
23909/***/ (function(module, __webpack_exports__, __webpack_require__) {
23910
23911"use strict";
23912__webpack_require__.r(__webpack_exports__);
23913/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription; });
23914/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
23915/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
23916/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
23917/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(178);
23918/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
23919
23920
23921
23922
23923var Subscription = /*@__PURE__*/ (function () {
23924 function Subscription(unsubscribe) {
23925 this.closed = false;
23926 this._parentOrParents = null;
23927 this._subscriptions = null;
23928 if (unsubscribe) {
23929 this._unsubscribe = unsubscribe;
23930 }
23931 }
23932 Subscription.prototype.unsubscribe = function () {
23933 var errors;
23934 if (this.closed) {
23935 return;
23936 }
23937 var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
23938 this.closed = true;
23939 this._parentOrParents = null;
23940 this._subscriptions = null;
23941 if (_parentOrParents instanceof Subscription) {
23942 _parentOrParents.remove(this);
23943 }
23944 else if (_parentOrParents !== null) {
23945 for (var index = 0; index < _parentOrParents.length; ++index) {
23946 var parent_1 = _parentOrParents[index];
23947 parent_1.remove(this);
23948 }
23949 }
23950 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) {
23951 try {
23952 _unsubscribe.call(this);
23953 }
23954 catch (e) {
23955 errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? flattenUnsubscriptionErrors(e.errors) : [e];
23956 }
23957 }
23958 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) {
23959 var index = -1;
23960 var len = _subscriptions.length;
23961 while (++index < len) {
23962 var sub = _subscriptions[index];
23963 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) {
23964 try {
23965 sub.unsubscribe();
23966 }
23967 catch (e) {
23968 errors = errors || [];
23969 if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) {
23970 errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
23971 }
23972 else {
23973 errors.push(e);
23974 }
23975 }
23976 }
23977 }
23978 }
23979 if (errors) {
23980 throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"](errors);
23981 }
23982 };
23983 Subscription.prototype.add = function (teardown) {
23984 var subscription = teardown;
23985 if (!teardown) {
23986 return Subscription.EMPTY;
23987 }
23988 switch (typeof teardown) {
23989 case 'function':
23990 subscription = new Subscription(teardown);
23991 case 'object':
23992 if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
23993 return subscription;
23994 }
23995 else if (this.closed) {
23996 subscription.unsubscribe();
23997 return subscription;
23998 }
23999 else if (!(subscription instanceof Subscription)) {
24000 var tmp = subscription;
24001 subscription = new Subscription();
24002 subscription._subscriptions = [tmp];
24003 }
24004 break;
24005 default: {
24006 throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
24007 }
24008 }
24009 var _parentOrParents = subscription._parentOrParents;
24010 if (_parentOrParents === null) {
24011 subscription._parentOrParents = this;
24012 }
24013 else if (_parentOrParents instanceof Subscription) {
24014 if (_parentOrParents === this) {
24015 return subscription;
24016 }
24017 subscription._parentOrParents = [_parentOrParents, this];
24018 }
24019 else if (_parentOrParents.indexOf(this) === -1) {
24020 _parentOrParents.push(this);
24021 }
24022 else {
24023 return subscription;
24024 }
24025 var subscriptions = this._subscriptions;
24026 if (subscriptions === null) {
24027 this._subscriptions = [subscription];
24028 }
24029 else {
24030 subscriptions.push(subscription);
24031 }
24032 return subscription;
24033 };
24034 Subscription.prototype.remove = function (subscription) {
24035 var subscriptions = this._subscriptions;
24036 if (subscriptions) {
24037 var subscriptionIndex = subscriptions.indexOf(subscription);
24038 if (subscriptionIndex !== -1) {
24039 subscriptions.splice(subscriptionIndex, 1);
24040 }
24041 }
24042 };
24043 Subscription.EMPTY = (function (empty) {
24044 empty.closed = true;
24045 return empty;
24046 }(new Subscription()));
24047 return Subscription;
24048}());
24049
24050function flattenUnsubscriptionErrors(errors) {
24051 return errors.reduce(function (errs, err) { return errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) ? err.errors : err); }, []);
24052}
24053//# sourceMappingURL=Subscription.js.map
24054
24055
24056/***/ }),
24057/* 176 */
24058/***/ (function(module, __webpack_exports__, __webpack_require__) {
24059
24060"use strict";
24061__webpack_require__.r(__webpack_exports__);
24062/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; });
24063/** PURE_IMPORTS_START PURE_IMPORTS_END */
24064var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();
24065//# sourceMappingURL=isArray.js.map
24066
24067
24068/***/ }),
24069/* 177 */
24070/***/ (function(module, __webpack_exports__, __webpack_require__) {
24071
24072"use strict";
24073__webpack_require__.r(__webpack_exports__);
24074/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
24075/** PURE_IMPORTS_START PURE_IMPORTS_END */
24076function isObject(x) {
24077 return x !== null && typeof x === 'object';
24078}
24079//# sourceMappingURL=isObject.js.map
24080
24081
24082/***/ }),
24083/* 178 */
24084/***/ (function(module, __webpack_exports__, __webpack_require__) {
24085
24086"use strict";
24087__webpack_require__.r(__webpack_exports__);
24088/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; });
24089/** PURE_IMPORTS_START PURE_IMPORTS_END */
24090var UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {
24091 function UnsubscriptionErrorImpl(errors) {
24092 Error.call(this);
24093 this.message = errors ?
24094 errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
24095 this.name = 'UnsubscriptionError';
24096 this.errors = errors;
24097 return this;
24098 }
24099 UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
24100 return UnsubscriptionErrorImpl;
24101})();
24102var UnsubscriptionError = UnsubscriptionErrorImpl;
24103//# sourceMappingURL=UnsubscriptionError.js.map
24104
24105
24106/***/ }),
24107/* 179 */
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__, "rxSubscriber", function() { return rxSubscriber; });
24113/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function() { return $$rxSubscriber; });
24114/** PURE_IMPORTS_START PURE_IMPORTS_END */
24115var rxSubscriber = /*@__PURE__*/ (function () {
24116 return typeof Symbol === 'function'
24117 ? /*@__PURE__*/ Symbol('rxSubscriber')
24118 : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();
24119})();
24120var $$rxSubscriber = rxSubscriber;
24121//# sourceMappingURL=rxSubscriber.js.map
24122
24123
24124/***/ }),
24125/* 180 */
24126/***/ (function(module, __webpack_exports__, __webpack_require__) {
24127
24128"use strict";
24129__webpack_require__.r(__webpack_exports__);
24130/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; });
24131/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24132/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
24133/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
24134/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
24135
24136
24137
24138function toSubscriber(nextOrObserver, error, complete) {
24139 if (nextOrObserver) {
24140 if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
24141 return nextOrObserver;
24142 }
24143 if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) {
24144 return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]();
24145 }
24146 }
24147 if (!nextOrObserver && !error && !complete) {
24148 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]);
24149 }
24150 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete);
24151}
24152//# sourceMappingURL=toSubscriber.js.map
24153
24154
24155/***/ }),
24156/* 181 */
24157/***/ (function(module, __webpack_exports__, __webpack_require__) {
24158
24159"use strict";
24160__webpack_require__.r(__webpack_exports__);
24161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; });
24162/** PURE_IMPORTS_START PURE_IMPORTS_END */
24163var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();
24164//# sourceMappingURL=observable.js.map
24165
24166
24167/***/ }),
24168/* 182 */
24169/***/ (function(module, __webpack_exports__, __webpack_require__) {
24170
24171"use strict";
24172__webpack_require__.r(__webpack_exports__);
24173/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
24174/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; });
24175/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
24176/** PURE_IMPORTS_START _identity PURE_IMPORTS_END */
24177
24178function pipe() {
24179 var fns = [];
24180 for (var _i = 0; _i < arguments.length; _i++) {
24181 fns[_i] = arguments[_i];
24182 }
24183 return pipeFromArray(fns);
24184}
24185function pipeFromArray(fns) {
24186 if (fns.length === 0) {
24187 return _identity__WEBPACK_IMPORTED_MODULE_0__["identity"];
24188 }
24189 if (fns.length === 1) {
24190 return fns[0];
24191 }
24192 return function piped(input) {
24193 return fns.reduce(function (prev, fn) { return fn(prev); }, input);
24194 };
24195}
24196//# sourceMappingURL=pipe.js.map
24197
24198
24199/***/ }),
24200/* 183 */
24201/***/ (function(module, __webpack_exports__, __webpack_require__) {
24202
24203"use strict";
24204__webpack_require__.r(__webpack_exports__);
24205/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
24206/** PURE_IMPORTS_START PURE_IMPORTS_END */
24207function identity(x) {
24208 return x;
24209}
24210//# sourceMappingURL=identity.js.map
24211
24212
24213/***/ }),
24214/* 184 */
24215/***/ (function(module, __webpack_exports__, __webpack_require__) {
24216
24217"use strict";
24218__webpack_require__.r(__webpack_exports__);
24219/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; });
24220/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; });
24221/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24222/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24223/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
24224/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
24225/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(175);
24226/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(188);
24227/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
24228
24229
24230
24231
24232
24233
24234var ConnectableObservable = /*@__PURE__*/ (function (_super) {
24235 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableObservable, _super);
24236 function ConnectableObservable(source, subjectFactory) {
24237 var _this = _super.call(this) || this;
24238 _this.source = source;
24239 _this.subjectFactory = subjectFactory;
24240 _this._refCount = 0;
24241 _this._isComplete = false;
24242 return _this;
24243 }
24244 ConnectableObservable.prototype._subscribe = function (subscriber) {
24245 return this.getSubject().subscribe(subscriber);
24246 };
24247 ConnectableObservable.prototype.getSubject = function () {
24248 var subject = this._subject;
24249 if (!subject || subject.isStopped) {
24250 this._subject = this.subjectFactory();
24251 }
24252 return this._subject;
24253 };
24254 ConnectableObservable.prototype.connect = function () {
24255 var connection = this._connection;
24256 if (!connection) {
24257 this._isComplete = false;
24258 connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"]();
24259 connection.add(this.source
24260 .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
24261 if (connection.closed) {
24262 this._connection = null;
24263 connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
24264 }
24265 }
24266 return connection;
24267 };
24268 ConnectableObservable.prototype.refCount = function () {
24269 return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__["refCount"])()(this);
24270 };
24271 return ConnectableObservable;
24272}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
24273
24274var connectableObservableDescriptor = /*@__PURE__*/ (function () {
24275 var connectableProto = ConnectableObservable.prototype;
24276 return {
24277 operator: { value: null },
24278 _refCount: { value: 0, writable: true },
24279 _subject: { value: null, writable: true },
24280 _connection: { value: null, writable: true },
24281 _subscribe: { value: connectableProto._subscribe },
24282 _isComplete: { value: connectableProto._isComplete, writable: true },
24283 getSubject: { value: connectableProto.getSubject },
24284 connect: { value: connectableProto.connect },
24285 refCount: { value: connectableProto.refCount }
24286 };
24287})();
24288var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
24289 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableSubscriber, _super);
24290 function ConnectableSubscriber(destination, connectable) {
24291 var _this = _super.call(this, destination) || this;
24292 _this.connectable = connectable;
24293 return _this;
24294 }
24295 ConnectableSubscriber.prototype._error = function (err) {
24296 this._unsubscribe();
24297 _super.prototype._error.call(this, err);
24298 };
24299 ConnectableSubscriber.prototype._complete = function () {
24300 this.connectable._isComplete = true;
24301 this._unsubscribe();
24302 _super.prototype._complete.call(this);
24303 };
24304 ConnectableSubscriber.prototype._unsubscribe = function () {
24305 var connectable = this.connectable;
24306 if (connectable) {
24307 this.connectable = null;
24308 var connection = connectable._connection;
24309 connectable._refCount = 0;
24310 connectable._subject = null;
24311 connectable._connection = null;
24312 if (connection) {
24313 connection.unsubscribe();
24314 }
24315 }
24316 };
24317 return ConnectableSubscriber;
24318}(_Subject__WEBPACK_IMPORTED_MODULE_1__["SubjectSubscriber"]));
24319var RefCountOperator = /*@__PURE__*/ (function () {
24320 function RefCountOperator(connectable) {
24321 this.connectable = connectable;
24322 }
24323 RefCountOperator.prototype.call = function (subscriber, source) {
24324 var connectable = this.connectable;
24325 connectable._refCount++;
24326 var refCounter = new RefCountSubscriber(subscriber, connectable);
24327 var subscription = source.subscribe(refCounter);
24328 if (!refCounter.closed) {
24329 refCounter.connection = connectable.connect();
24330 }
24331 return subscription;
24332 };
24333 return RefCountOperator;
24334}());
24335var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
24336 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
24337 function RefCountSubscriber(destination, connectable) {
24338 var _this = _super.call(this, destination) || this;
24339 _this.connectable = connectable;
24340 return _this;
24341 }
24342 RefCountSubscriber.prototype._unsubscribe = function () {
24343 var connectable = this.connectable;
24344 if (!connectable) {
24345 this.connection = null;
24346 return;
24347 }
24348 this.connectable = null;
24349 var refCount = connectable._refCount;
24350 if (refCount <= 0) {
24351 this.connection = null;
24352 return;
24353 }
24354 connectable._refCount = refCount - 1;
24355 if (refCount > 1) {
24356 this.connection = null;
24357 return;
24358 }
24359 var connection = this.connection;
24360 var sharedConnection = connectable._connection;
24361 this.connection = null;
24362 if (sharedConnection && (!connection || sharedConnection === connection)) {
24363 sharedConnection.unsubscribe();
24364 }
24365 };
24366 return RefCountSubscriber;
24367}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
24368//# sourceMappingURL=ConnectableObservable.js.map
24369
24370
24371/***/ }),
24372/* 185 */
24373/***/ (function(module, __webpack_exports__, __webpack_require__) {
24374
24375"use strict";
24376__webpack_require__.r(__webpack_exports__);
24377/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; });
24378/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; });
24379/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; });
24380/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24381/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
24382/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
24383/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
24384/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(186);
24385/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(187);
24386/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(179);
24387/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
24388
24389
24390
24391
24392
24393
24394
24395var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
24396 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscriber, _super);
24397 function SubjectSubscriber(destination) {
24398 var _this = _super.call(this, destination) || this;
24399 _this.destination = destination;
24400 return _this;
24401 }
24402 return SubjectSubscriber;
24403}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
24404
24405var Subject = /*@__PURE__*/ (function (_super) {
24406 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subject, _super);
24407 function Subject() {
24408 var _this = _super.call(this) || this;
24409 _this.observers = [];
24410 _this.closed = false;
24411 _this.isStopped = false;
24412 _this.hasError = false;
24413 _this.thrownError = null;
24414 return _this;
24415 }
24416 Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__["rxSubscriber"]] = function () {
24417 return new SubjectSubscriber(this);
24418 };
24419 Subject.prototype.lift = function (operator) {
24420 var subject = new AnonymousSubject(this, this);
24421 subject.operator = operator;
24422 return subject;
24423 };
24424 Subject.prototype.next = function (value) {
24425 if (this.closed) {
24426 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24427 }
24428 if (!this.isStopped) {
24429 var observers = this.observers;
24430 var len = observers.length;
24431 var copy = observers.slice();
24432 for (var i = 0; i < len; i++) {
24433 copy[i].next(value);
24434 }
24435 }
24436 };
24437 Subject.prototype.error = function (err) {
24438 if (this.closed) {
24439 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24440 }
24441 this.hasError = true;
24442 this.thrownError = err;
24443 this.isStopped = true;
24444 var observers = this.observers;
24445 var len = observers.length;
24446 var copy = observers.slice();
24447 for (var i = 0; i < len; i++) {
24448 copy[i].error(err);
24449 }
24450 this.observers.length = 0;
24451 };
24452 Subject.prototype.complete = function () {
24453 if (this.closed) {
24454 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24455 }
24456 this.isStopped = true;
24457 var observers = this.observers;
24458 var len = observers.length;
24459 var copy = observers.slice();
24460 for (var i = 0; i < len; i++) {
24461 copy[i].complete();
24462 }
24463 this.observers.length = 0;
24464 };
24465 Subject.prototype.unsubscribe = function () {
24466 this.isStopped = true;
24467 this.closed = true;
24468 this.observers = null;
24469 };
24470 Subject.prototype._trySubscribe = function (subscriber) {
24471 if (this.closed) {
24472 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24473 }
24474 else {
24475 return _super.prototype._trySubscribe.call(this, subscriber);
24476 }
24477 };
24478 Subject.prototype._subscribe = function (subscriber) {
24479 if (this.closed) {
24480 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24481 }
24482 else if (this.hasError) {
24483 subscriber.error(this.thrownError);
24484 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24485 }
24486 else if (this.isStopped) {
24487 subscriber.complete();
24488 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24489 }
24490 else {
24491 this.observers.push(subscriber);
24492 return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
24493 }
24494 };
24495 Subject.prototype.asObservable = function () {
24496 var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
24497 observable.source = this;
24498 return observable;
24499 };
24500 Subject.create = function (destination, source) {
24501 return new AnonymousSubject(destination, source);
24502 };
24503 return Subject;
24504}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
24505
24506var AnonymousSubject = /*@__PURE__*/ (function (_super) {
24507 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnonymousSubject, _super);
24508 function AnonymousSubject(destination, source) {
24509 var _this = _super.call(this) || this;
24510 _this.destination = destination;
24511 _this.source = source;
24512 return _this;
24513 }
24514 AnonymousSubject.prototype.next = function (value) {
24515 var destination = this.destination;
24516 if (destination && destination.next) {
24517 destination.next(value);
24518 }
24519 };
24520 AnonymousSubject.prototype.error = function (err) {
24521 var destination = this.destination;
24522 if (destination && destination.error) {
24523 this.destination.error(err);
24524 }
24525 };
24526 AnonymousSubject.prototype.complete = function () {
24527 var destination = this.destination;
24528 if (destination && destination.complete) {
24529 this.destination.complete();
24530 }
24531 };
24532 AnonymousSubject.prototype._subscribe = function (subscriber) {
24533 var source = this.source;
24534 if (source) {
24535 return this.source.subscribe(subscriber);
24536 }
24537 else {
24538 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24539 }
24540 };
24541 return AnonymousSubject;
24542}(Subject));
24543
24544//# sourceMappingURL=Subject.js.map
24545
24546
24547/***/ }),
24548/* 186 */
24549/***/ (function(module, __webpack_exports__, __webpack_require__) {
24550
24551"use strict";
24552__webpack_require__.r(__webpack_exports__);
24553/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
24554/** PURE_IMPORTS_START PURE_IMPORTS_END */
24555var ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {
24556 function ObjectUnsubscribedErrorImpl() {
24557 Error.call(this);
24558 this.message = 'object unsubscribed';
24559 this.name = 'ObjectUnsubscribedError';
24560 return this;
24561 }
24562 ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
24563 return ObjectUnsubscribedErrorImpl;
24564})();
24565var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
24566//# sourceMappingURL=ObjectUnsubscribedError.js.map
24567
24568
24569/***/ }),
24570/* 187 */
24571/***/ (function(module, __webpack_exports__, __webpack_require__) {
24572
24573"use strict";
24574__webpack_require__.r(__webpack_exports__);
24575/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; });
24576/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24577/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
24578/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
24579
24580
24581var SubjectSubscription = /*@__PURE__*/ (function (_super) {
24582 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscription, _super);
24583 function SubjectSubscription(subject, subscriber) {
24584 var _this = _super.call(this) || this;
24585 _this.subject = subject;
24586 _this.subscriber = subscriber;
24587 _this.closed = false;
24588 return _this;
24589 }
24590 SubjectSubscription.prototype.unsubscribe = function () {
24591 if (this.closed) {
24592 return;
24593 }
24594 this.closed = true;
24595 var subject = this.subject;
24596 var observers = subject.observers;
24597 this.subject = null;
24598 if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
24599 return;
24600 }
24601 var subscriberIndex = observers.indexOf(this.subscriber);
24602 if (subscriberIndex !== -1) {
24603 observers.splice(subscriberIndex, 1);
24604 }
24605 };
24606 return SubjectSubscription;
24607}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
24608
24609//# sourceMappingURL=SubjectSubscription.js.map
24610
24611
24612/***/ }),
24613/* 188 */
24614/***/ (function(module, __webpack_exports__, __webpack_require__) {
24615
24616"use strict";
24617__webpack_require__.r(__webpack_exports__);
24618/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; });
24619/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24620/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
24621/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
24622
24623
24624function refCount() {
24625 return function refCountOperatorFunction(source) {
24626 return source.lift(new RefCountOperator(source));
24627 };
24628}
24629var RefCountOperator = /*@__PURE__*/ (function () {
24630 function RefCountOperator(connectable) {
24631 this.connectable = connectable;
24632 }
24633 RefCountOperator.prototype.call = function (subscriber, source) {
24634 var connectable = this.connectable;
24635 connectable._refCount++;
24636 var refCounter = new RefCountSubscriber(subscriber, connectable);
24637 var subscription = source.subscribe(refCounter);
24638 if (!refCounter.closed) {
24639 refCounter.connection = connectable.connect();
24640 }
24641 return subscription;
24642 };
24643 return RefCountOperator;
24644}());
24645var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
24646 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
24647 function RefCountSubscriber(destination, connectable) {
24648 var _this = _super.call(this, destination) || this;
24649 _this.connectable = connectable;
24650 return _this;
24651 }
24652 RefCountSubscriber.prototype._unsubscribe = function () {
24653 var connectable = this.connectable;
24654 if (!connectable) {
24655 this.connection = null;
24656 return;
24657 }
24658 this.connectable = null;
24659 var refCount = connectable._refCount;
24660 if (refCount <= 0) {
24661 this.connection = null;
24662 return;
24663 }
24664 connectable._refCount = refCount - 1;
24665 if (refCount > 1) {
24666 this.connection = null;
24667 return;
24668 }
24669 var connection = this.connection;
24670 var sharedConnection = connectable._connection;
24671 this.connection = null;
24672 if (sharedConnection && (!connection || sharedConnection === connection)) {
24673 sharedConnection.unsubscribe();
24674 }
24675 };
24676 return RefCountSubscriber;
24677}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24678//# sourceMappingURL=refCount.js.map
24679
24680
24681/***/ }),
24682/* 189 */
24683/***/ (function(module, __webpack_exports__, __webpack_require__) {
24684
24685"use strict";
24686__webpack_require__.r(__webpack_exports__);
24687/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
24688/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; });
24689/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24690/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
24691/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
24692/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(167);
24693/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
24694/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
24695
24696
24697
24698
24699
24700function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
24701 return function (source) {
24702 return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
24703 };
24704}
24705var GroupByOperator = /*@__PURE__*/ (function () {
24706 function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
24707 this.keySelector = keySelector;
24708 this.elementSelector = elementSelector;
24709 this.durationSelector = durationSelector;
24710 this.subjectSelector = subjectSelector;
24711 }
24712 GroupByOperator.prototype.call = function (subscriber, source) {
24713 return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
24714 };
24715 return GroupByOperator;
24716}());
24717var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
24718 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupBySubscriber, _super);
24719 function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
24720 var _this = _super.call(this, destination) || this;
24721 _this.keySelector = keySelector;
24722 _this.elementSelector = elementSelector;
24723 _this.durationSelector = durationSelector;
24724 _this.subjectSelector = subjectSelector;
24725 _this.groups = null;
24726 _this.attemptedToUnsubscribe = false;
24727 _this.count = 0;
24728 return _this;
24729 }
24730 GroupBySubscriber.prototype._next = function (value) {
24731 var key;
24732 try {
24733 key = this.keySelector(value);
24734 }
24735 catch (err) {
24736 this.error(err);
24737 return;
24738 }
24739 this._group(value, key);
24740 };
24741 GroupBySubscriber.prototype._group = function (value, key) {
24742 var groups = this.groups;
24743 if (!groups) {
24744 groups = this.groups = new Map();
24745 }
24746 var group = groups.get(key);
24747 var element;
24748 if (this.elementSelector) {
24749 try {
24750 element = this.elementSelector(value);
24751 }
24752 catch (err) {
24753 this.error(err);
24754 }
24755 }
24756 else {
24757 element = value;
24758 }
24759 if (!group) {
24760 group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]());
24761 groups.set(key, group);
24762 var groupedObservable = new GroupedObservable(key, group, this);
24763 this.destination.next(groupedObservable);
24764 if (this.durationSelector) {
24765 var duration = void 0;
24766 try {
24767 duration = this.durationSelector(new GroupedObservable(key, group));
24768 }
24769 catch (err) {
24770 this.error(err);
24771 return;
24772 }
24773 this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
24774 }
24775 }
24776 if (!group.closed) {
24777 group.next(element);
24778 }
24779 };
24780 GroupBySubscriber.prototype._error = function (err) {
24781 var groups = this.groups;
24782 if (groups) {
24783 groups.forEach(function (group, key) {
24784 group.error(err);
24785 });
24786 groups.clear();
24787 }
24788 this.destination.error(err);
24789 };
24790 GroupBySubscriber.prototype._complete = function () {
24791 var groups = this.groups;
24792 if (groups) {
24793 groups.forEach(function (group, key) {
24794 group.complete();
24795 });
24796 groups.clear();
24797 }
24798 this.destination.complete();
24799 };
24800 GroupBySubscriber.prototype.removeGroup = function (key) {
24801 this.groups.delete(key);
24802 };
24803 GroupBySubscriber.prototype.unsubscribe = function () {
24804 if (!this.closed) {
24805 this.attemptedToUnsubscribe = true;
24806 if (this.count === 0) {
24807 _super.prototype.unsubscribe.call(this);
24808 }
24809 }
24810 };
24811 return GroupBySubscriber;
24812}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24813var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
24814 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupDurationSubscriber, _super);
24815 function GroupDurationSubscriber(key, group, parent) {
24816 var _this = _super.call(this, group) || this;
24817 _this.key = key;
24818 _this.group = group;
24819 _this.parent = parent;
24820 return _this;
24821 }
24822 GroupDurationSubscriber.prototype._next = function (value) {
24823 this.complete();
24824 };
24825 GroupDurationSubscriber.prototype._unsubscribe = function () {
24826 var _a = this, parent = _a.parent, key = _a.key;
24827 this.key = this.parent = null;
24828 if (parent) {
24829 parent.removeGroup(key);
24830 }
24831 };
24832 return GroupDurationSubscriber;
24833}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24834var GroupedObservable = /*@__PURE__*/ (function (_super) {
24835 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupedObservable, _super);
24836 function GroupedObservable(key, groupSubject, refCountSubscription) {
24837 var _this = _super.call(this) || this;
24838 _this.key = key;
24839 _this.groupSubject = groupSubject;
24840 _this.refCountSubscription = refCountSubscription;
24841 return _this;
24842 }
24843 GroupedObservable.prototype._subscribe = function (subscriber) {
24844 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
24845 var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
24846 if (refCountSubscription && !refCountSubscription.closed) {
24847 subscription.add(new InnerRefCountSubscription(refCountSubscription));
24848 }
24849 subscription.add(groupSubject.subscribe(subscriber));
24850 return subscription;
24851 };
24852 return GroupedObservable;
24853}(_Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]));
24854
24855var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
24856 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerRefCountSubscription, _super);
24857 function InnerRefCountSubscription(parent) {
24858 var _this = _super.call(this) || this;
24859 _this.parent = parent;
24860 parent.count++;
24861 return _this;
24862 }
24863 InnerRefCountSubscription.prototype.unsubscribe = function () {
24864 var parent = this.parent;
24865 if (!parent.closed && !this.closed) {
24866 _super.prototype.unsubscribe.call(this);
24867 parent.count -= 1;
24868 if (parent.count === 0 && parent.attemptedToUnsubscribe) {
24869 parent.unsubscribe();
24870 }
24871 }
24872 };
24873 return InnerRefCountSubscription;
24874}(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]));
24875//# sourceMappingURL=groupBy.js.map
24876
24877
24878/***/ }),
24879/* 190 */
24880/***/ (function(module, __webpack_exports__, __webpack_require__) {
24881
24882"use strict";
24883__webpack_require__.r(__webpack_exports__);
24884/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; });
24885/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24886/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24887/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(186);
24888/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
24889
24890
24891
24892var BehaviorSubject = /*@__PURE__*/ (function (_super) {
24893 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BehaviorSubject, _super);
24894 function BehaviorSubject(_value) {
24895 var _this = _super.call(this) || this;
24896 _this._value = _value;
24897 return _this;
24898 }
24899 Object.defineProperty(BehaviorSubject.prototype, "value", {
24900 get: function () {
24901 return this.getValue();
24902 },
24903 enumerable: true,
24904 configurable: true
24905 });
24906 BehaviorSubject.prototype._subscribe = function (subscriber) {
24907 var subscription = _super.prototype._subscribe.call(this, subscriber);
24908 if (subscription && !subscription.closed) {
24909 subscriber.next(this._value);
24910 }
24911 return subscription;
24912 };
24913 BehaviorSubject.prototype.getValue = function () {
24914 if (this.hasError) {
24915 throw this.thrownError;
24916 }
24917 else if (this.closed) {
24918 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__["ObjectUnsubscribedError"]();
24919 }
24920 else {
24921 return this._value;
24922 }
24923 };
24924 BehaviorSubject.prototype.next = function (value) {
24925 _super.prototype.next.call(this, this._value = value);
24926 };
24927 return BehaviorSubject;
24928}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
24929
24930//# sourceMappingURL=BehaviorSubject.js.map
24931
24932
24933/***/ }),
24934/* 191 */
24935/***/ (function(module, __webpack_exports__, __webpack_require__) {
24936
24937"use strict";
24938__webpack_require__.r(__webpack_exports__);
24939/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; });
24940/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24941/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24942/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(192);
24943/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
24944/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(199);
24945/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(186);
24946/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(187);
24947/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
24948
24949
24950
24951
24952
24953
24954
24955var ReplaySubject = /*@__PURE__*/ (function (_super) {
24956 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ReplaySubject, _super);
24957 function ReplaySubject(bufferSize, windowTime, scheduler) {
24958 if (bufferSize === void 0) {
24959 bufferSize = Number.POSITIVE_INFINITY;
24960 }
24961 if (windowTime === void 0) {
24962 windowTime = Number.POSITIVE_INFINITY;
24963 }
24964 var _this = _super.call(this) || this;
24965 _this.scheduler = scheduler;
24966 _this._events = [];
24967 _this._infiniteTimeWindow = false;
24968 _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
24969 _this._windowTime = windowTime < 1 ? 1 : windowTime;
24970 if (windowTime === Number.POSITIVE_INFINITY) {
24971 _this._infiniteTimeWindow = true;
24972 _this.next = _this.nextInfiniteTimeWindow;
24973 }
24974 else {
24975 _this.next = _this.nextTimeWindow;
24976 }
24977 return _this;
24978 }
24979 ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
24980 var _events = this._events;
24981 _events.push(value);
24982 if (_events.length > this._bufferSize) {
24983 _events.shift();
24984 }
24985 _super.prototype.next.call(this, value);
24986 };
24987 ReplaySubject.prototype.nextTimeWindow = function (value) {
24988 this._events.push(new ReplayEvent(this._getNow(), value));
24989 this._trimBufferThenGetEvents();
24990 _super.prototype.next.call(this, value);
24991 };
24992 ReplaySubject.prototype._subscribe = function (subscriber) {
24993 var _infiniteTimeWindow = this._infiniteTimeWindow;
24994 var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
24995 var scheduler = this.scheduler;
24996 var len = _events.length;
24997 var subscription;
24998 if (this.closed) {
24999 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__["ObjectUnsubscribedError"]();
25000 }
25001 else if (this.isStopped || this.hasError) {
25002 subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
25003 }
25004 else {
25005 this.observers.push(subscriber);
25006 subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__["SubjectSubscription"](this, subscriber);
25007 }
25008 if (scheduler) {
25009 subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__["ObserveOnSubscriber"](subscriber, scheduler));
25010 }
25011 if (_infiniteTimeWindow) {
25012 for (var i = 0; i < len && !subscriber.closed; i++) {
25013 subscriber.next(_events[i]);
25014 }
25015 }
25016 else {
25017 for (var i = 0; i < len && !subscriber.closed; i++) {
25018 subscriber.next(_events[i].value);
25019 }
25020 }
25021 if (this.hasError) {
25022 subscriber.error(this.thrownError);
25023 }
25024 else if (this.isStopped) {
25025 subscriber.complete();
25026 }
25027 return subscription;
25028 };
25029 ReplaySubject.prototype._getNow = function () {
25030 return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__["queue"]).now();
25031 };
25032 ReplaySubject.prototype._trimBufferThenGetEvents = function () {
25033 var now = this._getNow();
25034 var _bufferSize = this._bufferSize;
25035 var _windowTime = this._windowTime;
25036 var _events = this._events;
25037 var eventsCount = _events.length;
25038 var spliceCount = 0;
25039 while (spliceCount < eventsCount) {
25040 if ((now - _events[spliceCount].time) < _windowTime) {
25041 break;
25042 }
25043 spliceCount++;
25044 }
25045 if (eventsCount > _bufferSize) {
25046 spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
25047 }
25048 if (spliceCount > 0) {
25049 _events.splice(0, spliceCount);
25050 }
25051 return _events;
25052 };
25053 return ReplaySubject;
25054}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
25055
25056var ReplayEvent = /*@__PURE__*/ (function () {
25057 function ReplayEvent(time, value) {
25058 this.time = time;
25059 this.value = value;
25060 }
25061 return ReplayEvent;
25062}());
25063//# sourceMappingURL=ReplaySubject.js.map
25064
25065
25066/***/ }),
25067/* 192 */
25068/***/ (function(module, __webpack_exports__, __webpack_require__) {
25069
25070"use strict";
25071__webpack_require__.r(__webpack_exports__);
25072/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; });
25073/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
25074/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
25075/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
25076
25077
25078var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
25079//# sourceMappingURL=queue.js.map
25080
25081
25082/***/ }),
25083/* 193 */
25084/***/ (function(module, __webpack_exports__, __webpack_require__) {
25085
25086"use strict";
25087__webpack_require__.r(__webpack_exports__);
25088/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; });
25089/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25090/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
25091/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
25092
25093
25094var QueueAction = /*@__PURE__*/ (function (_super) {
25095 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueAction, _super);
25096 function QueueAction(scheduler, work) {
25097 var _this = _super.call(this, scheduler, work) || this;
25098 _this.scheduler = scheduler;
25099 _this.work = work;
25100 return _this;
25101 }
25102 QueueAction.prototype.schedule = function (state, delay) {
25103 if (delay === void 0) {
25104 delay = 0;
25105 }
25106 if (delay > 0) {
25107 return _super.prototype.schedule.call(this, state, delay);
25108 }
25109 this.delay = delay;
25110 this.state = state;
25111 this.scheduler.flush(this);
25112 return this;
25113 };
25114 QueueAction.prototype.execute = function (state, delay) {
25115 return (delay > 0 || this.closed) ?
25116 _super.prototype.execute.call(this, state, delay) :
25117 this._execute(state, delay);
25118 };
25119 QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25120 if (delay === void 0) {
25121 delay = 0;
25122 }
25123 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25124 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25125 }
25126 return scheduler.flush(this);
25127 };
25128 return QueueAction;
25129}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
25130
25131//# sourceMappingURL=QueueAction.js.map
25132
25133
25134/***/ }),
25135/* 194 */
25136/***/ (function(module, __webpack_exports__, __webpack_require__) {
25137
25138"use strict";
25139__webpack_require__.r(__webpack_exports__);
25140/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; });
25141/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25142/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
25143/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
25144
25145
25146var AsyncAction = /*@__PURE__*/ (function (_super) {
25147 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncAction, _super);
25148 function AsyncAction(scheduler, work) {
25149 var _this = _super.call(this, scheduler, work) || this;
25150 _this.scheduler = scheduler;
25151 _this.work = work;
25152 _this.pending = false;
25153 return _this;
25154 }
25155 AsyncAction.prototype.schedule = function (state, delay) {
25156 if (delay === void 0) {
25157 delay = 0;
25158 }
25159 if (this.closed) {
25160 return this;
25161 }
25162 this.state = state;
25163 var id = this.id;
25164 var scheduler = this.scheduler;
25165 if (id != null) {
25166 this.id = this.recycleAsyncId(scheduler, id, delay);
25167 }
25168 this.pending = true;
25169 this.delay = delay;
25170 this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
25171 return this;
25172 };
25173 AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25174 if (delay === void 0) {
25175 delay = 0;
25176 }
25177 return setInterval(scheduler.flush.bind(scheduler, this), delay);
25178 };
25179 AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25180 if (delay === void 0) {
25181 delay = 0;
25182 }
25183 if (delay !== null && this.delay === delay && this.pending === false) {
25184 return id;
25185 }
25186 clearInterval(id);
25187 return undefined;
25188 };
25189 AsyncAction.prototype.execute = function (state, delay) {
25190 if (this.closed) {
25191 return new Error('executing a cancelled action');
25192 }
25193 this.pending = false;
25194 var error = this._execute(state, delay);
25195 if (error) {
25196 return error;
25197 }
25198 else if (this.pending === false && this.id != null) {
25199 this.id = this.recycleAsyncId(this.scheduler, this.id, null);
25200 }
25201 };
25202 AsyncAction.prototype._execute = function (state, delay) {
25203 var errored = false;
25204 var errorValue = undefined;
25205 try {
25206 this.work(state);
25207 }
25208 catch (e) {
25209 errored = true;
25210 errorValue = !!e && e || new Error(e);
25211 }
25212 if (errored) {
25213 this.unsubscribe();
25214 return errorValue;
25215 }
25216 };
25217 AsyncAction.prototype._unsubscribe = function () {
25218 var id = this.id;
25219 var scheduler = this.scheduler;
25220 var actions = scheduler.actions;
25221 var index = actions.indexOf(this);
25222 this.work = null;
25223 this.state = null;
25224 this.pending = false;
25225 this.scheduler = null;
25226 if (index !== -1) {
25227 actions.splice(index, 1);
25228 }
25229 if (id != null) {
25230 this.id = this.recycleAsyncId(scheduler, id, null);
25231 }
25232 this.delay = null;
25233 };
25234 return AsyncAction;
25235}(_Action__WEBPACK_IMPORTED_MODULE_1__["Action"]));
25236
25237//# sourceMappingURL=AsyncAction.js.map
25238
25239
25240/***/ }),
25241/* 195 */
25242/***/ (function(module, __webpack_exports__, __webpack_require__) {
25243
25244"use strict";
25245__webpack_require__.r(__webpack_exports__);
25246/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
25247/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25248/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
25249/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
25250
25251
25252var Action = /*@__PURE__*/ (function (_super) {
25253 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Action, _super);
25254 function Action(scheduler, work) {
25255 return _super.call(this) || this;
25256 }
25257 Action.prototype.schedule = function (state, delay) {
25258 if (delay === void 0) {
25259 delay = 0;
25260 }
25261 return this;
25262 };
25263 return Action;
25264}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
25265
25266//# sourceMappingURL=Action.js.map
25267
25268
25269/***/ }),
25270/* 196 */
25271/***/ (function(module, __webpack_exports__, __webpack_require__) {
25272
25273"use strict";
25274__webpack_require__.r(__webpack_exports__);
25275/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; });
25276/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25277/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25278/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25279
25280
25281var QueueScheduler = /*@__PURE__*/ (function (_super) {
25282 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueScheduler, _super);
25283 function QueueScheduler() {
25284 return _super !== null && _super.apply(this, arguments) || this;
25285 }
25286 return QueueScheduler;
25287}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
25288
25289//# sourceMappingURL=QueueScheduler.js.map
25290
25291
25292/***/ }),
25293/* 197 */
25294/***/ (function(module, __webpack_exports__, __webpack_require__) {
25295
25296"use strict";
25297__webpack_require__.r(__webpack_exports__);
25298/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; });
25299/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25300/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
25301/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
25302
25303
25304var AsyncScheduler = /*@__PURE__*/ (function (_super) {
25305 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncScheduler, _super);
25306 function AsyncScheduler(SchedulerAction, now) {
25307 if (now === void 0) {
25308 now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"].now;
25309 }
25310 var _this = _super.call(this, SchedulerAction, function () {
25311 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
25312 return AsyncScheduler.delegate.now();
25313 }
25314 else {
25315 return now();
25316 }
25317 }) || this;
25318 _this.actions = [];
25319 _this.active = false;
25320 _this.scheduled = undefined;
25321 return _this;
25322 }
25323 AsyncScheduler.prototype.schedule = function (work, delay, state) {
25324 if (delay === void 0) {
25325 delay = 0;
25326 }
25327 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
25328 return AsyncScheduler.delegate.schedule(work, delay, state);
25329 }
25330 else {
25331 return _super.prototype.schedule.call(this, work, delay, state);
25332 }
25333 };
25334 AsyncScheduler.prototype.flush = function (action) {
25335 var actions = this.actions;
25336 if (this.active) {
25337 actions.push(action);
25338 return;
25339 }
25340 var error;
25341 this.active = true;
25342 do {
25343 if (error = action.execute(action.state, action.delay)) {
25344 break;
25345 }
25346 } while (action = actions.shift());
25347 this.active = false;
25348 if (error) {
25349 while (action = actions.shift()) {
25350 action.unsubscribe();
25351 }
25352 throw error;
25353 }
25354 };
25355 return AsyncScheduler;
25356}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"]));
25357
25358//# sourceMappingURL=AsyncScheduler.js.map
25359
25360
25361/***/ }),
25362/* 198 */
25363/***/ (function(module, __webpack_exports__, __webpack_require__) {
25364
25365"use strict";
25366__webpack_require__.r(__webpack_exports__);
25367/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; });
25368var Scheduler = /*@__PURE__*/ (function () {
25369 function Scheduler(SchedulerAction, now) {
25370 if (now === void 0) {
25371 now = Scheduler.now;
25372 }
25373 this.SchedulerAction = SchedulerAction;
25374 this.now = now;
25375 }
25376 Scheduler.prototype.schedule = function (work, delay, state) {
25377 if (delay === void 0) {
25378 delay = 0;
25379 }
25380 return new this.SchedulerAction(this, work).schedule(state, delay);
25381 };
25382 Scheduler.now = function () { return Date.now(); };
25383 return Scheduler;
25384}());
25385
25386//# sourceMappingURL=Scheduler.js.map
25387
25388
25389/***/ }),
25390/* 199 */
25391/***/ (function(module, __webpack_exports__, __webpack_require__) {
25392
25393"use strict";
25394__webpack_require__.r(__webpack_exports__);
25395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; });
25396/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; });
25397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; });
25398/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; });
25399/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25400/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
25401/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
25402/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
25403
25404
25405
25406function observeOn(scheduler, delay) {
25407 if (delay === void 0) {
25408 delay = 0;
25409 }
25410 return function observeOnOperatorFunction(source) {
25411 return source.lift(new ObserveOnOperator(scheduler, delay));
25412 };
25413}
25414var ObserveOnOperator = /*@__PURE__*/ (function () {
25415 function ObserveOnOperator(scheduler, delay) {
25416 if (delay === void 0) {
25417 delay = 0;
25418 }
25419 this.scheduler = scheduler;
25420 this.delay = delay;
25421 }
25422 ObserveOnOperator.prototype.call = function (subscriber, source) {
25423 return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
25424 };
25425 return ObserveOnOperator;
25426}());
25427
25428var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
25429 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObserveOnSubscriber, _super);
25430 function ObserveOnSubscriber(destination, scheduler, delay) {
25431 if (delay === void 0) {
25432 delay = 0;
25433 }
25434 var _this = _super.call(this, destination) || this;
25435 _this.scheduler = scheduler;
25436 _this.delay = delay;
25437 return _this;
25438 }
25439 ObserveOnSubscriber.dispatch = function (arg) {
25440 var notification = arg.notification, destination = arg.destination;
25441 notification.observe(destination);
25442 this.unsubscribe();
25443 };
25444 ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
25445 var destination = this.destination;
25446 destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
25447 };
25448 ObserveOnSubscriber.prototype._next = function (value) {
25449 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
25450 };
25451 ObserveOnSubscriber.prototype._error = function (err) {
25452 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
25453 this.unsubscribe();
25454 };
25455 ObserveOnSubscriber.prototype._complete = function () {
25456 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
25457 this.unsubscribe();
25458 };
25459 return ObserveOnSubscriber;
25460}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
25461
25462var ObserveOnMessage = /*@__PURE__*/ (function () {
25463 function ObserveOnMessage(notification, destination) {
25464 this.notification = notification;
25465 this.destination = destination;
25466 }
25467 return ObserveOnMessage;
25468}());
25469
25470//# sourceMappingURL=observeOn.js.map
25471
25472
25473/***/ }),
25474/* 200 */
25475/***/ (function(module, __webpack_exports__, __webpack_require__) {
25476
25477"use strict";
25478__webpack_require__.r(__webpack_exports__);
25479/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; });
25480/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
25481/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(201);
25482/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
25483/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
25484/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
25485
25486
25487
25488var NotificationKind;
25489/*@__PURE__*/ (function (NotificationKind) {
25490 NotificationKind["NEXT"] = "N";
25491 NotificationKind["ERROR"] = "E";
25492 NotificationKind["COMPLETE"] = "C";
25493})(NotificationKind || (NotificationKind = {}));
25494var Notification = /*@__PURE__*/ (function () {
25495 function Notification(kind, value, error) {
25496 this.kind = kind;
25497 this.value = value;
25498 this.error = error;
25499 this.hasValue = kind === 'N';
25500 }
25501 Notification.prototype.observe = function (observer) {
25502 switch (this.kind) {
25503 case 'N':
25504 return observer.next && observer.next(this.value);
25505 case 'E':
25506 return observer.error && observer.error(this.error);
25507 case 'C':
25508 return observer.complete && observer.complete();
25509 }
25510 };
25511 Notification.prototype.do = function (next, error, complete) {
25512 var kind = this.kind;
25513 switch (kind) {
25514 case 'N':
25515 return next && next(this.value);
25516 case 'E':
25517 return error && error(this.error);
25518 case 'C':
25519 return complete && complete();
25520 }
25521 };
25522 Notification.prototype.accept = function (nextOrObserver, error, complete) {
25523 if (nextOrObserver && typeof nextOrObserver.next === 'function') {
25524 return this.observe(nextOrObserver);
25525 }
25526 else {
25527 return this.do(nextOrObserver, error, complete);
25528 }
25529 };
25530 Notification.prototype.toObservable = function () {
25531 var kind = this.kind;
25532 switch (kind) {
25533 case 'N':
25534 return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value);
25535 case 'E':
25536 return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error);
25537 case 'C':
25538 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])();
25539 }
25540 throw new Error('unexpected notification kind value');
25541 };
25542 Notification.createNext = function (value) {
25543 if (typeof value !== 'undefined') {
25544 return new Notification('N', value);
25545 }
25546 return Notification.undefinedValueNotification;
25547 };
25548 Notification.createError = function (err) {
25549 return new Notification('E', undefined, err);
25550 };
25551 Notification.createComplete = function () {
25552 return Notification.completeNotification;
25553 };
25554 Notification.completeNotification = new Notification('C');
25555 Notification.undefinedValueNotification = new Notification('N', undefined);
25556 return Notification;
25557}());
25558
25559//# sourceMappingURL=Notification.js.map
25560
25561
25562/***/ }),
25563/* 201 */
25564/***/ (function(module, __webpack_exports__, __webpack_require__) {
25565
25566"use strict";
25567__webpack_require__.r(__webpack_exports__);
25568/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; });
25569/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
25570/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25571/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
25572
25573var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.complete(); });
25574function empty(scheduler) {
25575 return scheduler ? emptyScheduled(scheduler) : EMPTY;
25576}
25577function emptyScheduled(scheduler) {
25578 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
25579}
25580//# sourceMappingURL=empty.js.map
25581
25582
25583/***/ }),
25584/* 202 */
25585/***/ (function(module, __webpack_exports__, __webpack_require__) {
25586
25587"use strict";
25588__webpack_require__.r(__webpack_exports__);
25589/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; });
25590/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(203);
25591/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
25592/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
25593/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */
25594
25595
25596
25597function of() {
25598 var args = [];
25599 for (var _i = 0; _i < arguments.length; _i++) {
25600 args[_i] = arguments[_i];
25601 }
25602 var scheduler = args[args.length - 1];
25603 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
25604 args.pop();
25605 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler);
25606 }
25607 else {
25608 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args);
25609 }
25610}
25611//# sourceMappingURL=of.js.map
25612
25613
25614/***/ }),
25615/* 203 */
25616/***/ (function(module, __webpack_exports__, __webpack_require__) {
25617
25618"use strict";
25619__webpack_require__.r(__webpack_exports__);
25620/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; });
25621/** PURE_IMPORTS_START PURE_IMPORTS_END */
25622function isScheduler(value) {
25623 return value && typeof value.schedule === 'function';
25624}
25625//# sourceMappingURL=isScheduler.js.map
25626
25627
25628/***/ }),
25629/* 204 */
25630/***/ (function(module, __webpack_exports__, __webpack_require__) {
25631
25632"use strict";
25633__webpack_require__.r(__webpack_exports__);
25634/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; });
25635/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25636/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
25637/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
25638/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */
25639
25640
25641
25642function fromArray(input, scheduler) {
25643 if (!scheduler) {
25644 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input));
25645 }
25646 else {
25647 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
25648 }
25649}
25650//# sourceMappingURL=fromArray.js.map
25651
25652
25653/***/ }),
25654/* 205 */
25655/***/ (function(module, __webpack_exports__, __webpack_require__) {
25656
25657"use strict";
25658__webpack_require__.r(__webpack_exports__);
25659/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; });
25660/** PURE_IMPORTS_START PURE_IMPORTS_END */
25661var subscribeToArray = function (array) {
25662 return function (subscriber) {
25663 for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
25664 subscriber.next(array[i]);
25665 }
25666 subscriber.complete();
25667 };
25668};
25669//# sourceMappingURL=subscribeToArray.js.map
25670
25671
25672/***/ }),
25673/* 206 */
25674/***/ (function(module, __webpack_exports__, __webpack_require__) {
25675
25676"use strict";
25677__webpack_require__.r(__webpack_exports__);
25678/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleArray", function() { return scheduleArray; });
25679/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25680/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
25681/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
25682
25683
25684function scheduleArray(input, scheduler) {
25685 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
25686 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
25687 var i = 0;
25688 sub.add(scheduler.schedule(function () {
25689 if (i === input.length) {
25690 subscriber.complete();
25691 return;
25692 }
25693 subscriber.next(input[i++]);
25694 if (!subscriber.closed) {
25695 sub.add(this.schedule());
25696 }
25697 }));
25698 return sub;
25699 });
25700}
25701//# sourceMappingURL=scheduleArray.js.map
25702
25703
25704/***/ }),
25705/* 207 */
25706/***/ (function(module, __webpack_exports__, __webpack_require__) {
25707
25708"use strict";
25709__webpack_require__.r(__webpack_exports__);
25710/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; });
25711/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25712/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
25713
25714function throwError(error, scheduler) {
25715 if (!scheduler) {
25716 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.error(error); });
25717 }
25718 else {
25719 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
25720 }
25721}
25722function dispatch(_a) {
25723 var error = _a.error, subscriber = _a.subscriber;
25724 subscriber.error(error);
25725}
25726//# sourceMappingURL=throwError.js.map
25727
25728
25729/***/ }),
25730/* 208 */
25731/***/ (function(module, __webpack_exports__, __webpack_require__) {
25732
25733"use strict";
25734__webpack_require__.r(__webpack_exports__);
25735/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; });
25736/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25737/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
25738/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
25739/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
25740
25741
25742
25743var AsyncSubject = /*@__PURE__*/ (function (_super) {
25744 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncSubject, _super);
25745 function AsyncSubject() {
25746 var _this = _super !== null && _super.apply(this, arguments) || this;
25747 _this.value = null;
25748 _this.hasNext = false;
25749 _this.hasCompleted = false;
25750 return _this;
25751 }
25752 AsyncSubject.prototype._subscribe = function (subscriber) {
25753 if (this.hasError) {
25754 subscriber.error(this.thrownError);
25755 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
25756 }
25757 else if (this.hasCompleted && this.hasNext) {
25758 subscriber.next(this.value);
25759 subscriber.complete();
25760 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
25761 }
25762 return _super.prototype._subscribe.call(this, subscriber);
25763 };
25764 AsyncSubject.prototype.next = function (value) {
25765 if (!this.hasCompleted) {
25766 this.value = value;
25767 this.hasNext = true;
25768 }
25769 };
25770 AsyncSubject.prototype.error = function (error) {
25771 if (!this.hasCompleted) {
25772 _super.prototype.error.call(this, error);
25773 }
25774 };
25775 AsyncSubject.prototype.complete = function () {
25776 this.hasCompleted = true;
25777 if (this.hasNext) {
25778 _super.prototype.next.call(this, this.value);
25779 }
25780 _super.prototype.complete.call(this);
25781 };
25782 return AsyncSubject;
25783}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
25784
25785//# sourceMappingURL=AsyncSubject.js.map
25786
25787
25788/***/ }),
25789/* 209 */
25790/***/ (function(module, __webpack_exports__, __webpack_require__) {
25791
25792"use strict";
25793__webpack_require__.r(__webpack_exports__);
25794/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; });
25795/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(210);
25796/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
25797/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
25798
25799
25800var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
25801//# sourceMappingURL=asap.js.map
25802
25803
25804/***/ }),
25805/* 210 */
25806/***/ (function(module, __webpack_exports__, __webpack_require__) {
25807
25808"use strict";
25809__webpack_require__.r(__webpack_exports__);
25810/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; });
25811/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25812/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
25813/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
25814/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
25815
25816
25817
25818var AsapAction = /*@__PURE__*/ (function (_super) {
25819 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapAction, _super);
25820 function AsapAction(scheduler, work) {
25821 var _this = _super.call(this, scheduler, work) || this;
25822 _this.scheduler = scheduler;
25823 _this.work = work;
25824 return _this;
25825 }
25826 AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25827 if (delay === void 0) {
25828 delay = 0;
25829 }
25830 if (delay !== null && delay > 0) {
25831 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25832 }
25833 scheduler.actions.push(this);
25834 return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
25835 };
25836 AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25837 if (delay === void 0) {
25838 delay = 0;
25839 }
25840 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25841 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
25842 }
25843 if (scheduler.actions.length === 0) {
25844 _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].clearImmediate(id);
25845 scheduler.scheduled = undefined;
25846 }
25847 return undefined;
25848 };
25849 return AsapAction;
25850}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__["AsyncAction"]));
25851
25852//# sourceMappingURL=AsapAction.js.map
25853
25854
25855/***/ }),
25856/* 211 */
25857/***/ (function(module, __webpack_exports__, __webpack_require__) {
25858
25859"use strict";
25860__webpack_require__.r(__webpack_exports__);
25861/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; });
25862/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestTools", function() { return TestTools; });
25863/** PURE_IMPORTS_START PURE_IMPORTS_END */
25864var nextHandle = 1;
25865var RESOLVED = /*@__PURE__*/ (function () { return /*@__PURE__*/ Promise.resolve(); })();
25866var activeHandles = {};
25867function findAndClearHandle(handle) {
25868 if (handle in activeHandles) {
25869 delete activeHandles[handle];
25870 return true;
25871 }
25872 return false;
25873}
25874var Immediate = {
25875 setImmediate: function (cb) {
25876 var handle = nextHandle++;
25877 activeHandles[handle] = true;
25878 RESOLVED.then(function () { return findAndClearHandle(handle) && cb(); });
25879 return handle;
25880 },
25881 clearImmediate: function (handle) {
25882 findAndClearHandle(handle);
25883 },
25884};
25885var TestTools = {
25886 pending: function () {
25887 return Object.keys(activeHandles).length;
25888 }
25889};
25890//# sourceMappingURL=Immediate.js.map
25891
25892
25893/***/ }),
25894/* 212 */
25895/***/ (function(module, __webpack_exports__, __webpack_require__) {
25896
25897"use strict";
25898__webpack_require__.r(__webpack_exports__);
25899/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; });
25900/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25901/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25902/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25903
25904
25905var AsapScheduler = /*@__PURE__*/ (function (_super) {
25906 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapScheduler, _super);
25907 function AsapScheduler() {
25908 return _super !== null && _super.apply(this, arguments) || this;
25909 }
25910 AsapScheduler.prototype.flush = function (action) {
25911 this.active = true;
25912 this.scheduled = undefined;
25913 var actions = this.actions;
25914 var error;
25915 var index = -1;
25916 var count = actions.length;
25917 action = action || actions.shift();
25918 do {
25919 if (error = action.execute(action.state, action.delay)) {
25920 break;
25921 }
25922 } while (++index < count && (action = actions.shift()));
25923 this.active = false;
25924 if (error) {
25925 while (++index < count && (action = actions.shift())) {
25926 action.unsubscribe();
25927 }
25928 throw error;
25929 }
25930 };
25931 return AsapScheduler;
25932}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
25933
25934//# sourceMappingURL=AsapScheduler.js.map
25935
25936
25937/***/ }),
25938/* 213 */
25939/***/ (function(module, __webpack_exports__, __webpack_require__) {
25940
25941"use strict";
25942__webpack_require__.r(__webpack_exports__);
25943/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; });
25944/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
25945/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25946/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
25947
25948
25949var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
25950//# sourceMappingURL=async.js.map
25951
25952
25953/***/ }),
25954/* 214 */
25955/***/ (function(module, __webpack_exports__, __webpack_require__) {
25956
25957"use strict";
25958__webpack_require__.r(__webpack_exports__);
25959/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; });
25960/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(215);
25961/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(216);
25962/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
25963
25964
25965var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
25966//# sourceMappingURL=animationFrame.js.map
25967
25968
25969/***/ }),
25970/* 215 */
25971/***/ (function(module, __webpack_exports__, __webpack_require__) {
25972
25973"use strict";
25974__webpack_require__.r(__webpack_exports__);
25975/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; });
25976/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25977/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
25978/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
25979
25980
25981var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
25982 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameAction, _super);
25983 function AnimationFrameAction(scheduler, work) {
25984 var _this = _super.call(this, scheduler, work) || this;
25985 _this.scheduler = scheduler;
25986 _this.work = work;
25987 return _this;
25988 }
25989 AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25990 if (delay === void 0) {
25991 delay = 0;
25992 }
25993 if (delay !== null && delay > 0) {
25994 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25995 }
25996 scheduler.actions.push(this);
25997 return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
25998 };
25999 AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
26000 if (delay === void 0) {
26001 delay = 0;
26002 }
26003 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
26004 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
26005 }
26006 if (scheduler.actions.length === 0) {
26007 cancelAnimationFrame(id);
26008 scheduler.scheduled = undefined;
26009 }
26010 return undefined;
26011 };
26012 return AnimationFrameAction;
26013}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
26014
26015//# sourceMappingURL=AnimationFrameAction.js.map
26016
26017
26018/***/ }),
26019/* 216 */
26020/***/ (function(module, __webpack_exports__, __webpack_require__) {
26021
26022"use strict";
26023__webpack_require__.r(__webpack_exports__);
26024/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; });
26025/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26026/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
26027/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
26028
26029
26030var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
26031 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameScheduler, _super);
26032 function AnimationFrameScheduler() {
26033 return _super !== null && _super.apply(this, arguments) || this;
26034 }
26035 AnimationFrameScheduler.prototype.flush = function (action) {
26036 this.active = true;
26037 this.scheduled = undefined;
26038 var actions = this.actions;
26039 var error;
26040 var index = -1;
26041 var count = actions.length;
26042 action = action || actions.shift();
26043 do {
26044 if (error = action.execute(action.state, action.delay)) {
26045 break;
26046 }
26047 } while (++index < count && (action = actions.shift()));
26048 this.active = false;
26049 if (error) {
26050 while (++index < count && (action = actions.shift())) {
26051 action.unsubscribe();
26052 }
26053 throw error;
26054 }
26055 };
26056 return AnimationFrameScheduler;
26057}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
26058
26059//# sourceMappingURL=AnimationFrameScheduler.js.map
26060
26061
26062/***/ }),
26063/* 217 */
26064/***/ (function(module, __webpack_exports__, __webpack_require__) {
26065
26066"use strict";
26067__webpack_require__.r(__webpack_exports__);
26068/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; });
26069/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; });
26070/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26071/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
26072/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(197);
26073/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
26074
26075
26076
26077var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
26078 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualTimeScheduler, _super);
26079 function VirtualTimeScheduler(SchedulerAction, maxFrames) {
26080 if (SchedulerAction === void 0) {
26081 SchedulerAction = VirtualAction;
26082 }
26083 if (maxFrames === void 0) {
26084 maxFrames = Number.POSITIVE_INFINITY;
26085 }
26086 var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
26087 _this.maxFrames = maxFrames;
26088 _this.frame = 0;
26089 _this.index = -1;
26090 return _this;
26091 }
26092 VirtualTimeScheduler.prototype.flush = function () {
26093 var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
26094 var error, action;
26095 while ((action = actions[0]) && action.delay <= maxFrames) {
26096 actions.shift();
26097 this.frame = action.delay;
26098 if (error = action.execute(action.state, action.delay)) {
26099 break;
26100 }
26101 }
26102 if (error) {
26103 while (action = actions.shift()) {
26104 action.unsubscribe();
26105 }
26106 throw error;
26107 }
26108 };
26109 VirtualTimeScheduler.frameTimeFactor = 10;
26110 return VirtualTimeScheduler;
26111}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__["AsyncScheduler"]));
26112
26113var VirtualAction = /*@__PURE__*/ (function (_super) {
26114 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualAction, _super);
26115 function VirtualAction(scheduler, work, index) {
26116 if (index === void 0) {
26117 index = scheduler.index += 1;
26118 }
26119 var _this = _super.call(this, scheduler, work) || this;
26120 _this.scheduler = scheduler;
26121 _this.work = work;
26122 _this.index = index;
26123 _this.active = true;
26124 _this.index = scheduler.index = index;
26125 return _this;
26126 }
26127 VirtualAction.prototype.schedule = function (state, delay) {
26128 if (delay === void 0) {
26129 delay = 0;
26130 }
26131 if (!this.id) {
26132 return _super.prototype.schedule.call(this, state, delay);
26133 }
26134 this.active = false;
26135 var action = new VirtualAction(this.scheduler, this.work);
26136 this.add(action);
26137 return action.schedule(state, delay);
26138 };
26139 VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
26140 if (delay === void 0) {
26141 delay = 0;
26142 }
26143 this.delay = scheduler.frame + delay;
26144 var actions = scheduler.actions;
26145 actions.push(this);
26146 actions.sort(VirtualAction.sortActions);
26147 return true;
26148 };
26149 VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
26150 if (delay === void 0) {
26151 delay = 0;
26152 }
26153 return undefined;
26154 };
26155 VirtualAction.prototype._execute = function (state, delay) {
26156 if (this.active === true) {
26157 return _super.prototype._execute.call(this, state, delay);
26158 }
26159 };
26160 VirtualAction.sortActions = function (a, b) {
26161 if (a.delay === b.delay) {
26162 if (a.index === b.index) {
26163 return 0;
26164 }
26165 else if (a.index > b.index) {
26166 return 1;
26167 }
26168 else {
26169 return -1;
26170 }
26171 }
26172 else if (a.delay > b.delay) {
26173 return 1;
26174 }
26175 else {
26176 return -1;
26177 }
26178 };
26179 return VirtualAction;
26180}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
26181
26182//# sourceMappingURL=VirtualTimeScheduler.js.map
26183
26184
26185/***/ }),
26186/* 218 */
26187/***/ (function(module, __webpack_exports__, __webpack_require__) {
26188
26189"use strict";
26190__webpack_require__.r(__webpack_exports__);
26191/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
26192/** PURE_IMPORTS_START PURE_IMPORTS_END */
26193function noop() { }
26194//# sourceMappingURL=noop.js.map
26195
26196
26197/***/ }),
26198/* 219 */
26199/***/ (function(module, __webpack_exports__, __webpack_require__) {
26200
26201"use strict";
26202__webpack_require__.r(__webpack_exports__);
26203/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
26204/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
26205/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
26206
26207function isObservable(obj) {
26208 return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
26209}
26210//# sourceMappingURL=isObservable.js.map
26211
26212
26213/***/ }),
26214/* 220 */
26215/***/ (function(module, __webpack_exports__, __webpack_require__) {
26216
26217"use strict";
26218__webpack_require__.r(__webpack_exports__);
26219/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
26220/** PURE_IMPORTS_START PURE_IMPORTS_END */
26221var ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {
26222 function ArgumentOutOfRangeErrorImpl() {
26223 Error.call(this);
26224 this.message = 'argument out of range';
26225 this.name = 'ArgumentOutOfRangeError';
26226 return this;
26227 }
26228 ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26229 return ArgumentOutOfRangeErrorImpl;
26230})();
26231var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
26232//# sourceMappingURL=ArgumentOutOfRangeError.js.map
26233
26234
26235/***/ }),
26236/* 221 */
26237/***/ (function(module, __webpack_exports__, __webpack_require__) {
26238
26239"use strict";
26240__webpack_require__.r(__webpack_exports__);
26241/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
26242/** PURE_IMPORTS_START PURE_IMPORTS_END */
26243var EmptyErrorImpl = /*@__PURE__*/ (function () {
26244 function EmptyErrorImpl() {
26245 Error.call(this);
26246 this.message = 'no elements in sequence';
26247 this.name = 'EmptyError';
26248 return this;
26249 }
26250 EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26251 return EmptyErrorImpl;
26252})();
26253var EmptyError = EmptyErrorImpl;
26254//# sourceMappingURL=EmptyError.js.map
26255
26256
26257/***/ }),
26258/* 222 */
26259/***/ (function(module, __webpack_exports__, __webpack_require__) {
26260
26261"use strict";
26262__webpack_require__.r(__webpack_exports__);
26263/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
26264/** PURE_IMPORTS_START PURE_IMPORTS_END */
26265var TimeoutErrorImpl = /*@__PURE__*/ (function () {
26266 function TimeoutErrorImpl() {
26267 Error.call(this);
26268 this.message = 'Timeout has occurred';
26269 this.name = 'TimeoutError';
26270 return this;
26271 }
26272 TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26273 return TimeoutErrorImpl;
26274})();
26275var TimeoutError = TimeoutErrorImpl;
26276//# sourceMappingURL=TimeoutError.js.map
26277
26278
26279/***/ }),
26280/* 223 */
26281/***/ (function(module, __webpack_exports__, __webpack_require__) {
26282
26283"use strict";
26284__webpack_require__.r(__webpack_exports__);
26285/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
26286/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
26287/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
26288/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
26289/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
26290/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(176);
26291/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(203);
26292/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
26293
26294
26295
26296
26297
26298
26299function bindCallback(callbackFunc, resultSelector, scheduler) {
26300 if (resultSelector) {
26301 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) {
26302 scheduler = resultSelector;
26303 }
26304 else {
26305 return function () {
26306 var args = [];
26307 for (var _i = 0; _i < arguments.length; _i++) {
26308 args[_i] = arguments[_i];
26309 }
26310 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); }));
26311 };
26312 }
26313 }
26314 return function () {
26315 var args = [];
26316 for (var _i = 0; _i < arguments.length; _i++) {
26317 args[_i] = arguments[_i];
26318 }
26319 var context = this;
26320 var subject;
26321 var params = {
26322 context: context,
26323 subject: subject,
26324 callbackFunc: callbackFunc,
26325 scheduler: scheduler,
26326 };
26327 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
26328 if (!scheduler) {
26329 if (!subject) {
26330 subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26331 var handler = function () {
26332 var innerArgs = [];
26333 for (var _i = 0; _i < arguments.length; _i++) {
26334 innerArgs[_i] = arguments[_i];
26335 }
26336 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
26337 subject.complete();
26338 };
26339 try {
26340 callbackFunc.apply(context, args.concat([handler]));
26341 }
26342 catch (err) {
26343 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
26344 subject.error(err);
26345 }
26346 else {
26347 console.warn(err);
26348 }
26349 }
26350 }
26351 return subject.subscribe(subscriber);
26352 }
26353 else {
26354 var state = {
26355 args: args, subscriber: subscriber, params: params,
26356 };
26357 return scheduler.schedule(dispatch, 0, state);
26358 }
26359 });
26360 };
26361}
26362function dispatch(state) {
26363 var _this = this;
26364 var self = this;
26365 var args = state.args, subscriber = state.subscriber, params = state.params;
26366 var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
26367 var subject = params.subject;
26368 if (!subject) {
26369 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26370 var handler = function () {
26371 var innerArgs = [];
26372 for (var _i = 0; _i < arguments.length; _i++) {
26373 innerArgs[_i] = arguments[_i];
26374 }
26375 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
26376 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
26377 };
26378 try {
26379 callbackFunc.apply(context, args.concat([handler]));
26380 }
26381 catch (err) {
26382 subject.error(err);
26383 }
26384 }
26385 this.add(subject.subscribe(subscriber));
26386}
26387function dispatchNext(state) {
26388 var value = state.value, subject = state.subject;
26389 subject.next(value);
26390 subject.complete();
26391}
26392function dispatchError(state) {
26393 var err = state.err, subject = state.subject;
26394 subject.error(err);
26395}
26396//# sourceMappingURL=bindCallback.js.map
26397
26398
26399/***/ }),
26400/* 224 */
26401/***/ (function(module, __webpack_exports__, __webpack_require__) {
26402
26403"use strict";
26404__webpack_require__.r(__webpack_exports__);
26405/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
26406/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; });
26407/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26408/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
26409/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26410
26411
26412function map(project, thisArg) {
26413 return function mapOperation(source) {
26414 if (typeof project !== 'function') {
26415 throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
26416 }
26417 return source.lift(new MapOperator(project, thisArg));
26418 };
26419}
26420var MapOperator = /*@__PURE__*/ (function () {
26421 function MapOperator(project, thisArg) {
26422 this.project = project;
26423 this.thisArg = thisArg;
26424 }
26425 MapOperator.prototype.call = function (subscriber, source) {
26426 return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
26427 };
26428 return MapOperator;
26429}());
26430
26431var MapSubscriber = /*@__PURE__*/ (function (_super) {
26432 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapSubscriber, _super);
26433 function MapSubscriber(destination, project, thisArg) {
26434 var _this = _super.call(this, destination) || this;
26435 _this.project = project;
26436 _this.count = 0;
26437 _this.thisArg = thisArg || _this;
26438 return _this;
26439 }
26440 MapSubscriber.prototype._next = function (value) {
26441 var result;
26442 try {
26443 result = this.project.call(this.thisArg, value, this.count++);
26444 }
26445 catch (err) {
26446 this.destination.error(err);
26447 return;
26448 }
26449 this.destination.next(result);
26450 };
26451 return MapSubscriber;
26452}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26453//# sourceMappingURL=map.js.map
26454
26455
26456/***/ }),
26457/* 225 */
26458/***/ (function(module, __webpack_exports__, __webpack_require__) {
26459
26460"use strict";
26461__webpack_require__.r(__webpack_exports__);
26462/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
26463/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
26464/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
26465/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
26466/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
26467/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(203);
26468/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(176);
26469/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
26470
26471
26472
26473
26474
26475
26476function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
26477 if (resultSelector) {
26478 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
26479 scheduler = resultSelector;
26480 }
26481 else {
26482 return function () {
26483 var args = [];
26484 for (var _i = 0; _i < arguments.length; _i++) {
26485 args[_i] = arguments[_i];
26486 }
26487 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); }));
26488 };
26489 }
26490 }
26491 return function () {
26492 var args = [];
26493 for (var _i = 0; _i < arguments.length; _i++) {
26494 args[_i] = arguments[_i];
26495 }
26496 var params = {
26497 subject: undefined,
26498 args: args,
26499 callbackFunc: callbackFunc,
26500 scheduler: scheduler,
26501 context: this,
26502 };
26503 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
26504 var context = params.context;
26505 var subject = params.subject;
26506 if (!scheduler) {
26507 if (!subject) {
26508 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26509 var handler = function () {
26510 var innerArgs = [];
26511 for (var _i = 0; _i < arguments.length; _i++) {
26512 innerArgs[_i] = arguments[_i];
26513 }
26514 var err = innerArgs.shift();
26515 if (err) {
26516 subject.error(err);
26517 return;
26518 }
26519 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
26520 subject.complete();
26521 };
26522 try {
26523 callbackFunc.apply(context, args.concat([handler]));
26524 }
26525 catch (err) {
26526 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
26527 subject.error(err);
26528 }
26529 else {
26530 console.warn(err);
26531 }
26532 }
26533 }
26534 return subject.subscribe(subscriber);
26535 }
26536 else {
26537 return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
26538 }
26539 });
26540 };
26541}
26542function dispatch(state) {
26543 var _this = this;
26544 var params = state.params, subscriber = state.subscriber, context = state.context;
26545 var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
26546 var subject = params.subject;
26547 if (!subject) {
26548 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26549 var handler = function () {
26550 var innerArgs = [];
26551 for (var _i = 0; _i < arguments.length; _i++) {
26552 innerArgs[_i] = arguments[_i];
26553 }
26554 var err = innerArgs.shift();
26555 if (err) {
26556 _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
26557 }
26558 else {
26559 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
26560 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
26561 }
26562 };
26563 try {
26564 callbackFunc.apply(context, args.concat([handler]));
26565 }
26566 catch (err) {
26567 this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
26568 }
26569 }
26570 this.add(subject.subscribe(subscriber));
26571}
26572function dispatchNext(arg) {
26573 var value = arg.value, subject = arg.subject;
26574 subject.next(value);
26575 subject.complete();
26576}
26577function dispatchError(arg) {
26578 var err = arg.err, subject = arg.subject;
26579 subject.error(err);
26580}
26581//# sourceMappingURL=bindNodeCallback.js.map
26582
26583
26584/***/ }),
26585/* 226 */
26586/***/ (function(module, __webpack_exports__, __webpack_require__) {
26587
26588"use strict";
26589__webpack_require__.r(__webpack_exports__);
26590/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
26591/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; });
26592/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; });
26593/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26594/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
26595/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
26596/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
26597/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
26598/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(204);
26599/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
26600
26601
26602
26603
26604
26605
26606var NONE = {};
26607function combineLatest() {
26608 var observables = [];
26609 for (var _i = 0; _i < arguments.length; _i++) {
26610 observables[_i] = arguments[_i];
26611 }
26612 var resultSelector = null;
26613 var scheduler = null;
26614 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(observables[observables.length - 1])) {
26615 scheduler = observables.pop();
26616 }
26617 if (typeof observables[observables.length - 1] === 'function') {
26618 resultSelector = observables.pop();
26619 }
26620 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(observables[0])) {
26621 observables = observables[0];
26622 }
26623 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
26624}
26625var CombineLatestOperator = /*@__PURE__*/ (function () {
26626 function CombineLatestOperator(resultSelector) {
26627 this.resultSelector = resultSelector;
26628 }
26629 CombineLatestOperator.prototype.call = function (subscriber, source) {
26630 return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
26631 };
26632 return CombineLatestOperator;
26633}());
26634
26635var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
26636 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CombineLatestSubscriber, _super);
26637 function CombineLatestSubscriber(destination, resultSelector) {
26638 var _this = _super.call(this, destination) || this;
26639 _this.resultSelector = resultSelector;
26640 _this.active = 0;
26641 _this.values = [];
26642 _this.observables = [];
26643 return _this;
26644 }
26645 CombineLatestSubscriber.prototype._next = function (observable) {
26646 this.values.push(NONE);
26647 this.observables.push(observable);
26648 };
26649 CombineLatestSubscriber.prototype._complete = function () {
26650 var observables = this.observables;
26651 var len = observables.length;
26652 if (len === 0) {
26653 this.destination.complete();
26654 }
26655 else {
26656 this.active = len;
26657 this.toRespond = len;
26658 for (var i = 0; i < len; i++) {
26659 var observable = observables[i];
26660 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i));
26661 }
26662 }
26663 };
26664 CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
26665 if ((this.active -= 1) === 0) {
26666 this.destination.complete();
26667 }
26668 };
26669 CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26670 var values = this.values;
26671 var oldVal = values[outerIndex];
26672 var toRespond = !this.toRespond
26673 ? 0
26674 : oldVal === NONE ? --this.toRespond : this.toRespond;
26675 values[outerIndex] = innerValue;
26676 if (toRespond === 0) {
26677 if (this.resultSelector) {
26678 this._tryResultSelector(values);
26679 }
26680 else {
26681 this.destination.next(values.slice());
26682 }
26683 }
26684 };
26685 CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
26686 var result;
26687 try {
26688 result = this.resultSelector.apply(this, values);
26689 }
26690 catch (err) {
26691 this.destination.error(err);
26692 return;
26693 }
26694 this.destination.next(result);
26695 };
26696 return CombineLatestSubscriber;
26697}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
26698
26699//# sourceMappingURL=combineLatest.js.map
26700
26701
26702/***/ }),
26703/* 227 */
26704/***/ (function(module, __webpack_exports__, __webpack_require__) {
26705
26706"use strict";
26707__webpack_require__.r(__webpack_exports__);
26708/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; });
26709/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26710/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
26711/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26712
26713
26714var OuterSubscriber = /*@__PURE__*/ (function (_super) {
26715 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OuterSubscriber, _super);
26716 function OuterSubscriber() {
26717 return _super !== null && _super.apply(this, arguments) || this;
26718 }
26719 OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26720 this.destination.next(innerValue);
26721 };
26722 OuterSubscriber.prototype.notifyError = function (error, innerSub) {
26723 this.destination.error(error);
26724 };
26725 OuterSubscriber.prototype.notifyComplete = function (innerSub) {
26726 this.destination.complete();
26727 };
26728 return OuterSubscriber;
26729}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26730
26731//# sourceMappingURL=OuterSubscriber.js.map
26732
26733
26734/***/ }),
26735/* 228 */
26736/***/ (function(module, __webpack_exports__, __webpack_require__) {
26737
26738"use strict";
26739__webpack_require__.r(__webpack_exports__);
26740/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; });
26741/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(229);
26742/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
26743/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
26744/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */
26745
26746
26747
26748function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber) {
26749 if (innerSubscriber === void 0) {
26750 innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);
26751 }
26752 if (innerSubscriber.closed) {
26753 return undefined;
26754 }
26755 if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
26756 return result.subscribe(innerSubscriber);
26757 }
26758 return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(innerSubscriber);
26759}
26760//# sourceMappingURL=subscribeToResult.js.map
26761
26762
26763/***/ }),
26764/* 229 */
26765/***/ (function(module, __webpack_exports__, __webpack_require__) {
26766
26767"use strict";
26768__webpack_require__.r(__webpack_exports__);
26769/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; });
26770/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26771/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
26772/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26773
26774
26775var InnerSubscriber = /*@__PURE__*/ (function (_super) {
26776 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerSubscriber, _super);
26777 function InnerSubscriber(parent, outerValue, outerIndex) {
26778 var _this = _super.call(this) || this;
26779 _this.parent = parent;
26780 _this.outerValue = outerValue;
26781 _this.outerIndex = outerIndex;
26782 _this.index = 0;
26783 return _this;
26784 }
26785 InnerSubscriber.prototype._next = function (value) {
26786 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
26787 };
26788 InnerSubscriber.prototype._error = function (error) {
26789 this.parent.notifyError(error, this);
26790 this.unsubscribe();
26791 };
26792 InnerSubscriber.prototype._complete = function () {
26793 this.parent.notifyComplete(this);
26794 this.unsubscribe();
26795 };
26796 return InnerSubscriber;
26797}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26798
26799//# sourceMappingURL=InnerSubscriber.js.map
26800
26801
26802/***/ }),
26803/* 230 */
26804/***/ (function(module, __webpack_exports__, __webpack_require__) {
26805
26806"use strict";
26807__webpack_require__.r(__webpack_exports__);
26808/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; });
26809/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
26810/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(231);
26811/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(232);
26812/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(234);
26813/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(235);
26814/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(236);
26815/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(177);
26816/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(233);
26817/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(181);
26818/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828var subscribeTo = function (result) {
26829 if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') {
26830 return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result);
26831 }
26832 else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) {
26833 return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result);
26834 }
26835 else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) {
26836 return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result);
26837 }
26838 else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') {
26839 return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result);
26840 }
26841 else {
26842 var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : "'" + result + "'";
26843 var msg = "You provided " + value + " where a stream was expected."
26844 + ' You can provide an Observable, Promise, Array, or Iterable.';
26845 throw new TypeError(msg);
26846 }
26847};
26848//# sourceMappingURL=subscribeTo.js.map
26849
26850
26851/***/ }),
26852/* 231 */
26853/***/ (function(module, __webpack_exports__, __webpack_require__) {
26854
26855"use strict";
26856__webpack_require__.r(__webpack_exports__);
26857/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; });
26858/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(174);
26859/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
26860
26861var subscribeToPromise = function (promise) {
26862 return function (subscriber) {
26863 promise.then(function (value) {
26864 if (!subscriber.closed) {
26865 subscriber.next(value);
26866 subscriber.complete();
26867 }
26868 }, function (err) { return subscriber.error(err); })
26869 .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]);
26870 return subscriber;
26871 };
26872};
26873//# sourceMappingURL=subscribeToPromise.js.map
26874
26875
26876/***/ }),
26877/* 232 */
26878/***/ (function(module, __webpack_exports__, __webpack_require__) {
26879
26880"use strict";
26881__webpack_require__.r(__webpack_exports__);
26882/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; });
26883/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
26884/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
26885
26886var subscribeToIterable = function (iterable) {
26887 return function (subscriber) {
26888 var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();
26889 do {
26890 var item = iterator.next();
26891 if (item.done) {
26892 subscriber.complete();
26893 break;
26894 }
26895 subscriber.next(item.value);
26896 if (subscriber.closed) {
26897 break;
26898 }
26899 } while (true);
26900 if (typeof iterator.return === 'function') {
26901 subscriber.add(function () {
26902 if (iterator.return) {
26903 iterator.return();
26904 }
26905 });
26906 }
26907 return subscriber;
26908 };
26909};
26910//# sourceMappingURL=subscribeToIterable.js.map
26911
26912
26913/***/ }),
26914/* 233 */
26915/***/ (function(module, __webpack_exports__, __webpack_require__) {
26916
26917"use strict";
26918__webpack_require__.r(__webpack_exports__);
26919/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; });
26920/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; });
26921/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; });
26922/** PURE_IMPORTS_START PURE_IMPORTS_END */
26923function getSymbolIterator() {
26924 if (typeof Symbol !== 'function' || !Symbol.iterator) {
26925 return '@@iterator';
26926 }
26927 return Symbol.iterator;
26928}
26929var iterator = /*@__PURE__*/ getSymbolIterator();
26930var $$iterator = iterator;
26931//# sourceMappingURL=iterator.js.map
26932
26933
26934/***/ }),
26935/* 234 */
26936/***/ (function(module, __webpack_exports__, __webpack_require__) {
26937
26938"use strict";
26939__webpack_require__.r(__webpack_exports__);
26940/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; });
26941/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(181);
26942/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
26943
26944var subscribeToObservable = function (obj) {
26945 return function (subscriber) {
26946 var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]]();
26947 if (typeof obs.subscribe !== 'function') {
26948 throw new TypeError('Provided object does not correctly implement Symbol.observable');
26949 }
26950 else {
26951 return obs.subscribe(subscriber);
26952 }
26953 };
26954};
26955//# sourceMappingURL=subscribeToObservable.js.map
26956
26957
26958/***/ }),
26959/* 235 */
26960/***/ (function(module, __webpack_exports__, __webpack_require__) {
26961
26962"use strict";
26963__webpack_require__.r(__webpack_exports__);
26964/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; });
26965/** PURE_IMPORTS_START PURE_IMPORTS_END */
26966var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
26967//# sourceMappingURL=isArrayLike.js.map
26968
26969
26970/***/ }),
26971/* 236 */
26972/***/ (function(module, __webpack_exports__, __webpack_require__) {
26973
26974"use strict";
26975__webpack_require__.r(__webpack_exports__);
26976/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; });
26977/** PURE_IMPORTS_START PURE_IMPORTS_END */
26978function isPromise(value) {
26979 return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
26980}
26981//# sourceMappingURL=isPromise.js.map
26982
26983
26984/***/ }),
26985/* 237 */
26986/***/ (function(module, __webpack_exports__, __webpack_require__) {
26987
26988"use strict";
26989__webpack_require__.r(__webpack_exports__);
26990/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
26991/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(202);
26992/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(238);
26993/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */
26994
26995
26996function concat() {
26997 var observables = [];
26998 for (var _i = 0; _i < arguments.length; _i++) {
26999 observables[_i] = arguments[_i];
27000 }
27001 return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(_of__WEBPACK_IMPORTED_MODULE_0__["of"].apply(void 0, observables));
27002}
27003//# sourceMappingURL=concat.js.map
27004
27005
27006/***/ }),
27007/* 238 */
27008/***/ (function(module, __webpack_exports__, __webpack_require__) {
27009
27010"use strict";
27011__webpack_require__.r(__webpack_exports__);
27012/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; });
27013/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
27014/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
27015
27016function concatAll() {
27017 return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
27018}
27019//# sourceMappingURL=concatAll.js.map
27020
27021
27022/***/ }),
27023/* 239 */
27024/***/ (function(module, __webpack_exports__, __webpack_require__) {
27025
27026"use strict";
27027__webpack_require__.r(__webpack_exports__);
27028/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; });
27029/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
27030/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
27031/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
27032
27033
27034function mergeAll(concurrent) {
27035 if (concurrent === void 0) {
27036 concurrent = Number.POSITIVE_INFINITY;
27037 }
27038 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent);
27039}
27040//# sourceMappingURL=mergeAll.js.map
27041
27042
27043/***/ }),
27044/* 240 */
27045/***/ (function(module, __webpack_exports__, __webpack_require__) {
27046
27047"use strict";
27048__webpack_require__.r(__webpack_exports__);
27049/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; });
27050/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; });
27051/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; });
27052/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
27053/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
27054/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
27055/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
27056/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
27057/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
27058/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
27059
27060
27061
27062
27063
27064
27065function mergeMap(project, resultSelector, concurrent) {
27066 if (concurrent === void 0) {
27067 concurrent = Number.POSITIVE_INFINITY;
27068 }
27069 if (typeof resultSelector === 'function') {
27070 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)); };
27071 }
27072 else if (typeof resultSelector === 'number') {
27073 concurrent = resultSelector;
27074 }
27075 return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
27076}
27077var MergeMapOperator = /*@__PURE__*/ (function () {
27078 function MergeMapOperator(project, concurrent) {
27079 if (concurrent === void 0) {
27080 concurrent = Number.POSITIVE_INFINITY;
27081 }
27082 this.project = project;
27083 this.concurrent = concurrent;
27084 }
27085 MergeMapOperator.prototype.call = function (observer, source) {
27086 return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
27087 };
27088 return MergeMapOperator;
27089}());
27090
27091var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
27092 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeMapSubscriber, _super);
27093 function MergeMapSubscriber(destination, project, concurrent) {
27094 if (concurrent === void 0) {
27095 concurrent = Number.POSITIVE_INFINITY;
27096 }
27097 var _this = _super.call(this, destination) || this;
27098 _this.project = project;
27099 _this.concurrent = concurrent;
27100 _this.hasCompleted = false;
27101 _this.buffer = [];
27102 _this.active = 0;
27103 _this.index = 0;
27104 return _this;
27105 }
27106 MergeMapSubscriber.prototype._next = function (value) {
27107 if (this.active < this.concurrent) {
27108 this._tryNext(value);
27109 }
27110 else {
27111 this.buffer.push(value);
27112 }
27113 };
27114 MergeMapSubscriber.prototype._tryNext = function (value) {
27115 var result;
27116 var index = this.index++;
27117 try {
27118 result = this.project(value, index);
27119 }
27120 catch (err) {
27121 this.destination.error(err);
27122 return;
27123 }
27124 this.active++;
27125 this._innerSub(result, value, index);
27126 };
27127 MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
27128 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, value, index);
27129 var destination = this.destination;
27130 destination.add(innerSubscriber);
27131 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, undefined, undefined, innerSubscriber);
27132 if (innerSubscription !== innerSubscriber) {
27133 destination.add(innerSubscription);
27134 }
27135 };
27136 MergeMapSubscriber.prototype._complete = function () {
27137 this.hasCompleted = true;
27138 if (this.active === 0 && this.buffer.length === 0) {
27139 this.destination.complete();
27140 }
27141 this.unsubscribe();
27142 };
27143 MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27144 this.destination.next(innerValue);
27145 };
27146 MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
27147 var buffer = this.buffer;
27148 this.remove(innerSub);
27149 this.active--;
27150 if (buffer.length > 0) {
27151 this._next(buffer.shift());
27152 }
27153 else if (this.active === 0 && this.hasCompleted) {
27154 this.destination.complete();
27155 }
27156 };
27157 return MergeMapSubscriber;
27158}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
27159
27160//# sourceMappingURL=mergeMap.js.map
27161
27162
27163/***/ }),
27164/* 241 */
27165/***/ (function(module, __webpack_exports__, __webpack_require__) {
27166
27167"use strict";
27168__webpack_require__.r(__webpack_exports__);
27169/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; });
27170/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27171/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
27172/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(242);
27173/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */
27174
27175
27176
27177function from(input, scheduler) {
27178 if (!scheduler) {
27179 if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
27180 return input;
27181 }
27182 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input));
27183 }
27184 else {
27185 return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler);
27186 }
27187}
27188//# sourceMappingURL=from.js.map
27189
27190
27191/***/ }),
27192/* 242 */
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__, "scheduled", function() { return scheduled; });
27198/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(243);
27199/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
27200/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
27201/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(245);
27202/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(246);
27203/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(236);
27204/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(235);
27205/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(247);
27206/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */
27207
27208
27209
27210
27211
27212
27213
27214
27215function scheduled(input, scheduler) {
27216 if (input != null) {
27217 if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) {
27218 return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler);
27219 }
27220 else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) {
27221 return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler);
27222 }
27223 else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) {
27224 return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
27225 }
27226 else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') {
27227 return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler);
27228 }
27229 }
27230 throw new TypeError((input !== null && typeof input || input) + ' is not observable');
27231}
27232//# sourceMappingURL=scheduled.js.map
27233
27234
27235/***/ }),
27236/* 243 */
27237/***/ (function(module, __webpack_exports__, __webpack_require__) {
27238
27239"use strict";
27240__webpack_require__.r(__webpack_exports__);
27241/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; });
27242/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27243/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27244/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(181);
27245/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
27246
27247
27248
27249function scheduleObservable(input, scheduler) {
27250 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27251 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27252 sub.add(scheduler.schedule(function () {
27253 var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]();
27254 sub.add(observable.subscribe({
27255 next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
27256 error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
27257 complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
27258 }));
27259 }));
27260 return sub;
27261 });
27262}
27263//# sourceMappingURL=scheduleObservable.js.map
27264
27265
27266/***/ }),
27267/* 244 */
27268/***/ (function(module, __webpack_exports__, __webpack_require__) {
27269
27270"use strict";
27271__webpack_require__.r(__webpack_exports__);
27272/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; });
27273/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27274/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27275/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
27276
27277
27278function schedulePromise(input, scheduler) {
27279 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27280 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27281 sub.add(scheduler.schedule(function () {
27282 return input.then(function (value) {
27283 sub.add(scheduler.schedule(function () {
27284 subscriber.next(value);
27285 sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
27286 }));
27287 }, function (err) {
27288 sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
27289 });
27290 }));
27291 return sub;
27292 });
27293}
27294//# sourceMappingURL=schedulePromise.js.map
27295
27296
27297/***/ }),
27298/* 245 */
27299/***/ (function(module, __webpack_exports__, __webpack_require__) {
27300
27301"use strict";
27302__webpack_require__.r(__webpack_exports__);
27303/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; });
27304/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27305/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27306/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(233);
27307/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */
27308
27309
27310
27311function scheduleIterable(input, scheduler) {
27312 if (!input) {
27313 throw new Error('Iterable cannot be null');
27314 }
27315 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27316 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27317 var iterator;
27318 sub.add(function () {
27319 if (iterator && typeof iterator.return === 'function') {
27320 iterator.return();
27321 }
27322 });
27323 sub.add(scheduler.schedule(function () {
27324 iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]]();
27325 sub.add(scheduler.schedule(function () {
27326 if (subscriber.closed) {
27327 return;
27328 }
27329 var value;
27330 var done;
27331 try {
27332 var result = iterator.next();
27333 value = result.value;
27334 done = result.done;
27335 }
27336 catch (err) {
27337 subscriber.error(err);
27338 return;
27339 }
27340 if (done) {
27341 subscriber.complete();
27342 }
27343 else {
27344 subscriber.next(value);
27345 this.schedule();
27346 }
27347 }));
27348 }));
27349 return sub;
27350 });
27351}
27352//# sourceMappingURL=scheduleIterable.js.map
27353
27354
27355/***/ }),
27356/* 246 */
27357/***/ (function(module, __webpack_exports__, __webpack_require__) {
27358
27359"use strict";
27360__webpack_require__.r(__webpack_exports__);
27361/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; });
27362/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(181);
27363/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
27364
27365function isInteropObservable(input) {
27366 return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
27367}
27368//# sourceMappingURL=isInteropObservable.js.map
27369
27370
27371/***/ }),
27372/* 247 */
27373/***/ (function(module, __webpack_exports__, __webpack_require__) {
27374
27375"use strict";
27376__webpack_require__.r(__webpack_exports__);
27377/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; });
27378/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
27379/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
27380
27381function isIterable(input) {
27382 return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
27383}
27384//# sourceMappingURL=isIterable.js.map
27385
27386
27387/***/ }),
27388/* 248 */
27389/***/ (function(module, __webpack_exports__, __webpack_require__) {
27390
27391"use strict";
27392__webpack_require__.r(__webpack_exports__);
27393/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
27394/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27395/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
27396/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
27397/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
27398
27399
27400
27401function defer(observableFactory) {
27402 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27403 var input;
27404 try {
27405 input = observableFactory();
27406 }
27407 catch (err) {
27408 subscriber.error(err);
27409 return undefined;
27410 }
27411 var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
27412 return source.subscribe(subscriber);
27413 });
27414}
27415//# sourceMappingURL=defer.js.map
27416
27417
27418/***/ }),
27419/* 249 */
27420/***/ (function(module, __webpack_exports__, __webpack_require__) {
27421
27422"use strict";
27423__webpack_require__.r(__webpack_exports__);
27424/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
27425/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27426/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
27427/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
27428/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(177);
27429/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(241);
27430/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */
27431
27432
27433
27434
27435
27436function forkJoin() {
27437 var sources = [];
27438 for (var _i = 0; _i < arguments.length; _i++) {
27439 sources[_i] = arguments[_i];
27440 }
27441 if (sources.length === 1) {
27442 var first_1 = sources[0];
27443 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first_1)) {
27444 return forkJoinInternal(first_1, null);
27445 }
27446 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
27447 var keys = Object.keys(first_1);
27448 return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
27449 }
27450 }
27451 if (typeof sources[sources.length - 1] === 'function') {
27452 var resultSelector_1 = sources.pop();
27453 sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources;
27454 return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return resultSelector_1.apply(void 0, args); }));
27455 }
27456 return forkJoinInternal(sources, null);
27457}
27458function forkJoinInternal(sources, keys) {
27459 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27460 var len = sources.length;
27461 if (len === 0) {
27462 subscriber.complete();
27463 return;
27464 }
27465 var values = new Array(len);
27466 var completed = 0;
27467 var emitted = 0;
27468 var _loop_1 = function (i) {
27469 var source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]);
27470 var hasValue = false;
27471 subscriber.add(source.subscribe({
27472 next: function (value) {
27473 if (!hasValue) {
27474 hasValue = true;
27475 emitted++;
27476 }
27477 values[i] = value;
27478 },
27479 error: function (err) { return subscriber.error(err); },
27480 complete: function () {
27481 completed++;
27482 if (completed === len || !hasValue) {
27483 if (emitted === len) {
27484 subscriber.next(keys ?
27485 keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
27486 values);
27487 }
27488 subscriber.complete();
27489 }
27490 }
27491 }));
27492 };
27493 for (var i = 0; i < len; i++) {
27494 _loop_1(i);
27495 }
27496 });
27497}
27498//# sourceMappingURL=forkJoin.js.map
27499
27500
27501/***/ }),
27502/* 250 */
27503/***/ (function(module, __webpack_exports__, __webpack_require__) {
27504
27505"use strict";
27506__webpack_require__.r(__webpack_exports__);
27507/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
27508/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27509/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
27510/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
27511/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(224);
27512/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
27513
27514
27515
27516
27517var toString = /*@__PURE__*/ (function () { return Object.prototype.toString; })();
27518function fromEvent(target, eventName, options, resultSelector) {
27519 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) {
27520 resultSelector = options;
27521 options = undefined;
27522 }
27523 if (resultSelector) {
27524 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); }));
27525 }
27526 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27527 function handler(e) {
27528 if (arguments.length > 1) {
27529 subscriber.next(Array.prototype.slice.call(arguments));
27530 }
27531 else {
27532 subscriber.next(e);
27533 }
27534 }
27535 setupSubscription(target, eventName, handler, subscriber, options);
27536 });
27537}
27538function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
27539 var unsubscribe;
27540 if (isEventTarget(sourceObj)) {
27541 var source_1 = sourceObj;
27542 sourceObj.addEventListener(eventName, handler, options);
27543 unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
27544 }
27545 else if (isJQueryStyleEventEmitter(sourceObj)) {
27546 var source_2 = sourceObj;
27547 sourceObj.on(eventName, handler);
27548 unsubscribe = function () { return source_2.off(eventName, handler); };
27549 }
27550 else if (isNodeStyleEventEmitter(sourceObj)) {
27551 var source_3 = sourceObj;
27552 sourceObj.addListener(eventName, handler);
27553 unsubscribe = function () { return source_3.removeListener(eventName, handler); };
27554 }
27555 else if (sourceObj && sourceObj.length) {
27556 for (var i = 0, len = sourceObj.length; i < len; i++) {
27557 setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
27558 }
27559 }
27560 else {
27561 throw new TypeError('Invalid event target');
27562 }
27563 subscriber.add(unsubscribe);
27564}
27565function isNodeStyleEventEmitter(sourceObj) {
27566 return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
27567}
27568function isJQueryStyleEventEmitter(sourceObj) {
27569 return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
27570}
27571function isEventTarget(sourceObj) {
27572 return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
27573}
27574//# sourceMappingURL=fromEvent.js.map
27575
27576
27577/***/ }),
27578/* 251 */
27579/***/ (function(module, __webpack_exports__, __webpack_require__) {
27580
27581"use strict";
27582__webpack_require__.r(__webpack_exports__);
27583/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
27584/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27585/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
27586/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
27587/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(224);
27588/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
27589
27590
27591
27592
27593function fromEventPattern(addHandler, removeHandler, resultSelector) {
27594 if (resultSelector) {
27595 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); }));
27596 }
27597 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27598 var handler = function () {
27599 var e = [];
27600 for (var _i = 0; _i < arguments.length; _i++) {
27601 e[_i] = arguments[_i];
27602 }
27603 return subscriber.next(e.length === 1 ? e[0] : e);
27604 };
27605 var retValue;
27606 try {
27607 retValue = addHandler(handler);
27608 }
27609 catch (err) {
27610 subscriber.error(err);
27611 return undefined;
27612 }
27613 if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) {
27614 return undefined;
27615 }
27616 return function () { return removeHandler(handler, retValue); };
27617 });
27618}
27619//# sourceMappingURL=fromEventPattern.js.map
27620
27621
27622/***/ }),
27623/* 252 */
27624/***/ (function(module, __webpack_exports__, __webpack_require__) {
27625
27626"use strict";
27627__webpack_require__.r(__webpack_exports__);
27628/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
27629/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27630/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
27631/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(203);
27632/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
27633
27634
27635
27636function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
27637 var resultSelector;
27638 var initialState;
27639 if (arguments.length == 1) {
27640 var options = initialStateOrOptions;
27641 initialState = options.initialState;
27642 condition = options.condition;
27643 iterate = options.iterate;
27644 resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
27645 scheduler = options.scheduler;
27646 }
27647 else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) {
27648 initialState = initialStateOrOptions;
27649 resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
27650 scheduler = resultSelectorOrObservable;
27651 }
27652 else {
27653 initialState = initialStateOrOptions;
27654 resultSelector = resultSelectorOrObservable;
27655 }
27656 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27657 var state = initialState;
27658 if (scheduler) {
27659 return scheduler.schedule(dispatch, 0, {
27660 subscriber: subscriber,
27661 iterate: iterate,
27662 condition: condition,
27663 resultSelector: resultSelector,
27664 state: state
27665 });
27666 }
27667 do {
27668 if (condition) {
27669 var conditionResult = void 0;
27670 try {
27671 conditionResult = condition(state);
27672 }
27673 catch (err) {
27674 subscriber.error(err);
27675 return undefined;
27676 }
27677 if (!conditionResult) {
27678 subscriber.complete();
27679 break;
27680 }
27681 }
27682 var value = void 0;
27683 try {
27684 value = resultSelector(state);
27685 }
27686 catch (err) {
27687 subscriber.error(err);
27688 return undefined;
27689 }
27690 subscriber.next(value);
27691 if (subscriber.closed) {
27692 break;
27693 }
27694 try {
27695 state = iterate(state);
27696 }
27697 catch (err) {
27698 subscriber.error(err);
27699 return undefined;
27700 }
27701 } while (true);
27702 return undefined;
27703 });
27704}
27705function dispatch(state) {
27706 var subscriber = state.subscriber, condition = state.condition;
27707 if (subscriber.closed) {
27708 return undefined;
27709 }
27710 if (state.needIterate) {
27711 try {
27712 state.state = state.iterate(state.state);
27713 }
27714 catch (err) {
27715 subscriber.error(err);
27716 return undefined;
27717 }
27718 }
27719 else {
27720 state.needIterate = true;
27721 }
27722 if (condition) {
27723 var conditionResult = void 0;
27724 try {
27725 conditionResult = condition(state.state);
27726 }
27727 catch (err) {
27728 subscriber.error(err);
27729 return undefined;
27730 }
27731 if (!conditionResult) {
27732 subscriber.complete();
27733 return undefined;
27734 }
27735 if (subscriber.closed) {
27736 return undefined;
27737 }
27738 }
27739 var value;
27740 try {
27741 value = state.resultSelector(state.state);
27742 }
27743 catch (err) {
27744 subscriber.error(err);
27745 return undefined;
27746 }
27747 if (subscriber.closed) {
27748 return undefined;
27749 }
27750 subscriber.next(value);
27751 if (subscriber.closed) {
27752 return undefined;
27753 }
27754 return this.schedule(state);
27755}
27756//# sourceMappingURL=generate.js.map
27757
27758
27759/***/ }),
27760/* 253 */
27761/***/ (function(module, __webpack_exports__, __webpack_require__) {
27762
27763"use strict";
27764__webpack_require__.r(__webpack_exports__);
27765/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
27766/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(248);
27767/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(201);
27768/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
27769
27770
27771function iif(condition, trueResult, falseResult) {
27772 if (trueResult === void 0) {
27773 trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
27774 }
27775 if (falseResult === void 0) {
27776 falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
27777 }
27778 return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(function () { return condition() ? trueResult : falseResult; });
27779}
27780//# sourceMappingURL=iif.js.map
27781
27782
27783/***/ }),
27784/* 254 */
27785/***/ (function(module, __webpack_exports__, __webpack_require__) {
27786
27787"use strict";
27788__webpack_require__.r(__webpack_exports__);
27789/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
27790/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27791/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
27792/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(255);
27793/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
27794
27795
27796
27797function interval(period, scheduler) {
27798 if (period === void 0) {
27799 period = 0;
27800 }
27801 if (scheduler === void 0) {
27802 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
27803 }
27804 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) {
27805 period = 0;
27806 }
27807 if (!scheduler || typeof scheduler.schedule !== 'function') {
27808 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
27809 }
27810 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27811 subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
27812 return subscriber;
27813 });
27814}
27815function dispatch(state) {
27816 var subscriber = state.subscriber, counter = state.counter, period = state.period;
27817 subscriber.next(counter);
27818 this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
27819}
27820//# sourceMappingURL=interval.js.map
27821
27822
27823/***/ }),
27824/* 255 */
27825/***/ (function(module, __webpack_exports__, __webpack_require__) {
27826
27827"use strict";
27828__webpack_require__.r(__webpack_exports__);
27829/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
27830/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
27831/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
27832
27833function isNumeric(val) {
27834 return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0;
27835}
27836//# sourceMappingURL=isNumeric.js.map
27837
27838
27839/***/ }),
27840/* 256 */
27841/***/ (function(module, __webpack_exports__, __webpack_require__) {
27842
27843"use strict";
27844__webpack_require__.r(__webpack_exports__);
27845/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
27846/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27847/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
27848/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
27849/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(204);
27850/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
27851
27852
27853
27854
27855function merge() {
27856 var observables = [];
27857 for (var _i = 0; _i < arguments.length; _i++) {
27858 observables[_i] = arguments[_i];
27859 }
27860 var concurrent = Number.POSITIVE_INFINITY;
27861 var scheduler = null;
27862 var last = observables[observables.length - 1];
27863 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) {
27864 scheduler = observables.pop();
27865 if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
27866 concurrent = observables.pop();
27867 }
27868 }
27869 else if (typeof last === 'number') {
27870 concurrent = observables.pop();
27871 }
27872 if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
27873 return observables[0];
27874 }
27875 return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler));
27876}
27877//# sourceMappingURL=merge.js.map
27878
27879
27880/***/ }),
27881/* 257 */
27882/***/ (function(module, __webpack_exports__, __webpack_require__) {
27883
27884"use strict";
27885__webpack_require__.r(__webpack_exports__);
27886/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; });
27887/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; });
27888/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27889/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
27890/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
27891
27892
27893var NEVER = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);
27894function never() {
27895 return NEVER;
27896}
27897//# sourceMappingURL=never.js.map
27898
27899
27900/***/ }),
27901/* 258 */
27902/***/ (function(module, __webpack_exports__, __webpack_require__) {
27903
27904"use strict";
27905__webpack_require__.r(__webpack_exports__);
27906/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
27907/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27908/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
27909/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
27910/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
27911/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
27912
27913
27914
27915
27916function onErrorResumeNext() {
27917 var sources = [];
27918 for (var _i = 0; _i < arguments.length; _i++) {
27919 sources[_i] = arguments[_i];
27920 }
27921 if (sources.length === 0) {
27922 return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
27923 }
27924 var first = sources[0], remainder = sources.slice(1);
27925 if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) {
27926 return onErrorResumeNext.apply(void 0, first);
27927 }
27928 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27929 var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
27930 return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
27931 next: function (value) { subscriber.next(value); },
27932 error: subNext,
27933 complete: subNext,
27934 });
27935 });
27936}
27937//# sourceMappingURL=onErrorResumeNext.js.map
27938
27939
27940/***/ }),
27941/* 259 */
27942/***/ (function(module, __webpack_exports__, __webpack_require__) {
27943
27944"use strict";
27945__webpack_require__.r(__webpack_exports__);
27946/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
27947/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
27948/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27949/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27950/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
27951
27952
27953function pairs(obj, scheduler) {
27954 if (!scheduler) {
27955 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27956 var keys = Object.keys(obj);
27957 for (var i = 0; i < keys.length && !subscriber.closed; i++) {
27958 var key = keys[i];
27959 if (obj.hasOwnProperty(key)) {
27960 subscriber.next([key, obj[key]]);
27961 }
27962 }
27963 subscriber.complete();
27964 });
27965 }
27966 else {
27967 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27968 var keys = Object.keys(obj);
27969 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27970 subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
27971 return subscription;
27972 });
27973 }
27974}
27975function dispatch(state) {
27976 var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
27977 if (!subscriber.closed) {
27978 if (index < keys.length) {
27979 var key = keys[index];
27980 subscriber.next([key, obj[key]]);
27981 subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
27982 }
27983 else {
27984 subscriber.complete();
27985 }
27986 }
27987}
27988//# sourceMappingURL=pairs.js.map
27989
27990
27991/***/ }),
27992/* 260 */
27993/***/ (function(module, __webpack_exports__, __webpack_require__) {
27994
27995"use strict";
27996__webpack_require__.r(__webpack_exports__);
27997/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
27998/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(261);
27999/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
28000/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(262);
28001/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(167);
28002/** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */
28003
28004
28005
28006
28007function partition(source, predicate, thisArg) {
28008 return [
28009 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))),
28010 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)))
28011 ];
28012}
28013//# sourceMappingURL=partition.js.map
28014
28015
28016/***/ }),
28017/* 261 */
28018/***/ (function(module, __webpack_exports__, __webpack_require__) {
28019
28020"use strict";
28021__webpack_require__.r(__webpack_exports__);
28022/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; });
28023/** PURE_IMPORTS_START PURE_IMPORTS_END */
28024function not(pred, thisArg) {
28025 function notPred() {
28026 return !(notPred.pred.apply(notPred.thisArg, arguments));
28027 }
28028 notPred.pred = pred;
28029 notPred.thisArg = thisArg;
28030 return notPred;
28031}
28032//# sourceMappingURL=not.js.map
28033
28034
28035/***/ }),
28036/* 262 */
28037/***/ (function(module, __webpack_exports__, __webpack_require__) {
28038
28039"use strict";
28040__webpack_require__.r(__webpack_exports__);
28041/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
28042/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
28043/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
28044/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
28045
28046
28047function filter(predicate, thisArg) {
28048 return function filterOperatorFunction(source) {
28049 return source.lift(new FilterOperator(predicate, thisArg));
28050 };
28051}
28052var FilterOperator = /*@__PURE__*/ (function () {
28053 function FilterOperator(predicate, thisArg) {
28054 this.predicate = predicate;
28055 this.thisArg = thisArg;
28056 }
28057 FilterOperator.prototype.call = function (subscriber, source) {
28058 return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
28059 };
28060 return FilterOperator;
28061}());
28062var FilterSubscriber = /*@__PURE__*/ (function (_super) {
28063 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FilterSubscriber, _super);
28064 function FilterSubscriber(destination, predicate, thisArg) {
28065 var _this = _super.call(this, destination) || this;
28066 _this.predicate = predicate;
28067 _this.thisArg = thisArg;
28068 _this.count = 0;
28069 return _this;
28070 }
28071 FilterSubscriber.prototype._next = function (value) {
28072 var result;
28073 try {
28074 result = this.predicate.call(this.thisArg, value, this.count++);
28075 }
28076 catch (err) {
28077 this.destination.error(err);
28078 return;
28079 }
28080 if (result) {
28081 this.destination.next(value);
28082 }
28083 };
28084 return FilterSubscriber;
28085}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28086//# sourceMappingURL=filter.js.map
28087
28088
28089/***/ }),
28090/* 263 */
28091/***/ (function(module, __webpack_exports__, __webpack_require__) {
28092
28093"use strict";
28094__webpack_require__.r(__webpack_exports__);
28095/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
28096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; });
28097/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; });
28098/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
28099/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
28100/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
28101/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
28102/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
28103/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28104
28105
28106
28107
28108
28109function race() {
28110 var observables = [];
28111 for (var _i = 0; _i < arguments.length; _i++) {
28112 observables[_i] = arguments[_i];
28113 }
28114 if (observables.length === 1) {
28115 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
28116 observables = observables[0];
28117 }
28118 else {
28119 return observables[0];
28120 }
28121 }
28122 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__["fromArray"])(observables, undefined).lift(new RaceOperator());
28123}
28124var RaceOperator = /*@__PURE__*/ (function () {
28125 function RaceOperator() {
28126 }
28127 RaceOperator.prototype.call = function (subscriber, source) {
28128 return source.subscribe(new RaceSubscriber(subscriber));
28129 };
28130 return RaceOperator;
28131}());
28132
28133var RaceSubscriber = /*@__PURE__*/ (function (_super) {
28134 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RaceSubscriber, _super);
28135 function RaceSubscriber(destination) {
28136 var _this = _super.call(this, destination) || this;
28137 _this.hasFirst = false;
28138 _this.observables = [];
28139 _this.subscriptions = [];
28140 return _this;
28141 }
28142 RaceSubscriber.prototype._next = function (observable) {
28143 this.observables.push(observable);
28144 };
28145 RaceSubscriber.prototype._complete = function () {
28146 var observables = this.observables;
28147 var len = observables.length;
28148 if (len === 0) {
28149 this.destination.complete();
28150 }
28151 else {
28152 for (var i = 0; i < len && !this.hasFirst; i++) {
28153 var observable = observables[i];
28154 var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i);
28155 if (this.subscriptions) {
28156 this.subscriptions.push(subscription);
28157 }
28158 this.add(subscription);
28159 }
28160 this.observables = null;
28161 }
28162 };
28163 RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28164 if (!this.hasFirst) {
28165 this.hasFirst = true;
28166 for (var i = 0; i < this.subscriptions.length; i++) {
28167 if (i !== outerIndex) {
28168 var subscription = this.subscriptions[i];
28169 subscription.unsubscribe();
28170 this.remove(subscription);
28171 }
28172 }
28173 this.subscriptions = null;
28174 }
28175 this.destination.next(innerValue);
28176 };
28177 return RaceSubscriber;
28178}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
28179
28180//# sourceMappingURL=race.js.map
28181
28182
28183/***/ }),
28184/* 264 */
28185/***/ (function(module, __webpack_exports__, __webpack_require__) {
28186
28187"use strict";
28188__webpack_require__.r(__webpack_exports__);
28189/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; });
28190/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
28191/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28192/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
28193
28194function range(start, count, scheduler) {
28195 if (start === void 0) {
28196 start = 0;
28197 }
28198 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
28199 if (count === undefined) {
28200 count = start;
28201 start = 0;
28202 }
28203 var index = 0;
28204 var current = start;
28205 if (scheduler) {
28206 return scheduler.schedule(dispatch, 0, {
28207 index: index, count: count, start: start, subscriber: subscriber
28208 });
28209 }
28210 else {
28211 do {
28212 if (index++ >= count) {
28213 subscriber.complete();
28214 break;
28215 }
28216 subscriber.next(current++);
28217 if (subscriber.closed) {
28218 break;
28219 }
28220 } while (true);
28221 }
28222 return undefined;
28223 });
28224}
28225function dispatch(state) {
28226 var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
28227 if (index >= count) {
28228 subscriber.complete();
28229 return;
28230 }
28231 subscriber.next(start);
28232 if (subscriber.closed) {
28233 return;
28234 }
28235 state.index = index + 1;
28236 state.start = start + 1;
28237 this.schedule(state);
28238}
28239//# sourceMappingURL=range.js.map
28240
28241
28242/***/ }),
28243/* 265 */
28244/***/ (function(module, __webpack_exports__, __webpack_require__) {
28245
28246"use strict";
28247__webpack_require__.r(__webpack_exports__);
28248/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
28249/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28250/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
28251/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(255);
28252/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
28253/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
28254
28255
28256
28257
28258function timer(dueTime, periodOrScheduler, scheduler) {
28259 if (dueTime === void 0) {
28260 dueTime = 0;
28261 }
28262 var period = -1;
28263 if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) {
28264 period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
28265 }
28266 else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) {
28267 scheduler = periodOrScheduler;
28268 }
28269 if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) {
28270 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
28271 }
28272 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
28273 var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime)
28274 ? dueTime
28275 : (+dueTime - scheduler.now());
28276 return scheduler.schedule(dispatch, due, {
28277 index: 0, period: period, subscriber: subscriber
28278 });
28279 });
28280}
28281function dispatch(state) {
28282 var index = state.index, period = state.period, subscriber = state.subscriber;
28283 subscriber.next(index);
28284 if (subscriber.closed) {
28285 return;
28286 }
28287 else if (period === -1) {
28288 return subscriber.complete();
28289 }
28290 state.index = index + 1;
28291 this.schedule(state, period);
28292}
28293//# sourceMappingURL=timer.js.map
28294
28295
28296/***/ }),
28297/* 266 */
28298/***/ (function(module, __webpack_exports__, __webpack_require__) {
28299
28300"use strict";
28301__webpack_require__.r(__webpack_exports__);
28302/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; });
28303/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28304/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
28305/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
28306/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
28307
28308
28309
28310function using(resourceFactory, observableFactory) {
28311 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
28312 var resource;
28313 try {
28314 resource = resourceFactory();
28315 }
28316 catch (err) {
28317 subscriber.error(err);
28318 return undefined;
28319 }
28320 var result;
28321 try {
28322 result = observableFactory(resource);
28323 }
28324 catch (err) {
28325 subscriber.error(err);
28326 return undefined;
28327 }
28328 var source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
28329 var subscription = source.subscribe(subscriber);
28330 return function () {
28331 subscription.unsubscribe();
28332 if (resource) {
28333 resource.unsubscribe();
28334 }
28335 };
28336 });
28337}
28338//# sourceMappingURL=using.js.map
28339
28340
28341/***/ }),
28342/* 267 */
28343/***/ (function(module, __webpack_exports__, __webpack_require__) {
28344
28345"use strict";
28346__webpack_require__.r(__webpack_exports__);
28347/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
28348/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; });
28349/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; });
28350/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
28351/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
28352/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
28353/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
28354/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(227);
28355/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(228);
28356/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(233);
28357/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
28358
28359
28360
28361
28362
28363
28364
28365function zip() {
28366 var observables = [];
28367 for (var _i = 0; _i < arguments.length; _i++) {
28368 observables[_i] = arguments[_i];
28369 }
28370 var resultSelector = observables[observables.length - 1];
28371 if (typeof resultSelector === 'function') {
28372 observables.pop();
28373 }
28374 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
28375}
28376var ZipOperator = /*@__PURE__*/ (function () {
28377 function ZipOperator(resultSelector) {
28378 this.resultSelector = resultSelector;
28379 }
28380 ZipOperator.prototype.call = function (subscriber, source) {
28381 return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
28382 };
28383 return ZipOperator;
28384}());
28385
28386var ZipSubscriber = /*@__PURE__*/ (function (_super) {
28387 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipSubscriber, _super);
28388 function ZipSubscriber(destination, resultSelector, values) {
28389 if (values === void 0) {
28390 values = Object.create(null);
28391 }
28392 var _this = _super.call(this, destination) || this;
28393 _this.iterators = [];
28394 _this.active = 0;
28395 _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
28396 _this.values = values;
28397 return _this;
28398 }
28399 ZipSubscriber.prototype._next = function (value) {
28400 var iterators = this.iterators;
28401 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
28402 iterators.push(new StaticArrayIterator(value));
28403 }
28404 else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] === 'function') {
28405 iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]]()));
28406 }
28407 else {
28408 iterators.push(new ZipBufferIterator(this.destination, this, value));
28409 }
28410 };
28411 ZipSubscriber.prototype._complete = function () {
28412 var iterators = this.iterators;
28413 var len = iterators.length;
28414 this.unsubscribe();
28415 if (len === 0) {
28416 this.destination.complete();
28417 return;
28418 }
28419 this.active = len;
28420 for (var i = 0; i < len; i++) {
28421 var iterator = iterators[i];
28422 if (iterator.stillUnsubscribed) {
28423 var destination = this.destination;
28424 destination.add(iterator.subscribe(iterator, i));
28425 }
28426 else {
28427 this.active--;
28428 }
28429 }
28430 };
28431 ZipSubscriber.prototype.notifyInactive = function () {
28432 this.active--;
28433 if (this.active === 0) {
28434 this.destination.complete();
28435 }
28436 };
28437 ZipSubscriber.prototype.checkIterators = function () {
28438 var iterators = this.iterators;
28439 var len = iterators.length;
28440 var destination = this.destination;
28441 for (var i = 0; i < len; i++) {
28442 var iterator = iterators[i];
28443 if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
28444 return;
28445 }
28446 }
28447 var shouldComplete = false;
28448 var args = [];
28449 for (var i = 0; i < len; i++) {
28450 var iterator = iterators[i];
28451 var result = iterator.next();
28452 if (iterator.hasCompleted()) {
28453 shouldComplete = true;
28454 }
28455 if (result.done) {
28456 destination.complete();
28457 return;
28458 }
28459 args.push(result.value);
28460 }
28461 if (this.resultSelector) {
28462 this._tryresultSelector(args);
28463 }
28464 else {
28465 destination.next(args);
28466 }
28467 if (shouldComplete) {
28468 destination.complete();
28469 }
28470 };
28471 ZipSubscriber.prototype._tryresultSelector = function (args) {
28472 var result;
28473 try {
28474 result = this.resultSelector.apply(this, args);
28475 }
28476 catch (err) {
28477 this.destination.error(err);
28478 return;
28479 }
28480 this.destination.next(result);
28481 };
28482 return ZipSubscriber;
28483}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
28484
28485var StaticIterator = /*@__PURE__*/ (function () {
28486 function StaticIterator(iterator) {
28487 this.iterator = iterator;
28488 this.nextResult = iterator.next();
28489 }
28490 StaticIterator.prototype.hasValue = function () {
28491 return true;
28492 };
28493 StaticIterator.prototype.next = function () {
28494 var result = this.nextResult;
28495 this.nextResult = this.iterator.next();
28496 return result;
28497 };
28498 StaticIterator.prototype.hasCompleted = function () {
28499 var nextResult = this.nextResult;
28500 return nextResult && nextResult.done;
28501 };
28502 return StaticIterator;
28503}());
28504var StaticArrayIterator = /*@__PURE__*/ (function () {
28505 function StaticArrayIterator(array) {
28506 this.array = array;
28507 this.index = 0;
28508 this.length = 0;
28509 this.length = array.length;
28510 }
28511 StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
28512 return this;
28513 };
28514 StaticArrayIterator.prototype.next = function (value) {
28515 var i = this.index++;
28516 var array = this.array;
28517 return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
28518 };
28519 StaticArrayIterator.prototype.hasValue = function () {
28520 return this.array.length > this.index;
28521 };
28522 StaticArrayIterator.prototype.hasCompleted = function () {
28523 return this.array.length === this.index;
28524 };
28525 return StaticArrayIterator;
28526}());
28527var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
28528 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipBufferIterator, _super);
28529 function ZipBufferIterator(destination, parent, observable) {
28530 var _this = _super.call(this, destination) || this;
28531 _this.parent = parent;
28532 _this.observable = observable;
28533 _this.stillUnsubscribed = true;
28534 _this.buffer = [];
28535 _this.isComplete = false;
28536 return _this;
28537 }
28538 ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
28539 return this;
28540 };
28541 ZipBufferIterator.prototype.next = function () {
28542 var buffer = this.buffer;
28543 if (buffer.length === 0 && this.isComplete) {
28544 return { value: null, done: true };
28545 }
28546 else {
28547 return { value: buffer.shift(), done: false };
28548 }
28549 };
28550 ZipBufferIterator.prototype.hasValue = function () {
28551 return this.buffer.length > 0;
28552 };
28553 ZipBufferIterator.prototype.hasCompleted = function () {
28554 return this.buffer.length === 0 && this.isComplete;
28555 };
28556 ZipBufferIterator.prototype.notifyComplete = function () {
28557 if (this.buffer.length > 0) {
28558 this.isComplete = true;
28559 this.parent.notifyInactive();
28560 }
28561 else {
28562 this.destination.complete();
28563 }
28564 };
28565 ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28566 this.buffer.push(innerValue);
28567 this.parent.checkIterators();
28568 };
28569 ZipBufferIterator.prototype.subscribe = function (value, index) {
28570 return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, this.observable, this, index);
28571 };
28572 return ZipBufferIterator;
28573}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
28574//# sourceMappingURL=zip.js.map
28575
28576
28577/***/ }),
28578/* 268 */,
28579/* 269 */
28580/***/ (function(module, __webpack_exports__, __webpack_require__) {
28581
28582"use strict";
28583__webpack_require__.r(__webpack_exports__);
28584/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(270);
28585/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; });
28586
28587/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(271);
28588/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; });
28589
28590/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(272);
28591/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; });
28592
28593/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(273);
28594/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; });
28595
28596/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(274);
28597/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; });
28598
28599/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(275);
28600/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; });
28601
28602/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(276);
28603/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; });
28604
28605/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(277);
28606/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; });
28607
28608/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(278);
28609/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; });
28610
28611/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(279);
28612/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; });
28613
28614/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(280);
28615/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; });
28616
28617/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(238);
28618/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; });
28619
28620/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(281);
28621/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; });
28622
28623/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(282);
28624/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; });
28625
28626/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(283);
28627/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; });
28628
28629/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(284);
28630/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; });
28631
28632/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(285);
28633/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; });
28634
28635/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(286);
28636/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; });
28637
28638/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(287);
28639/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; });
28640
28641/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(289);
28642/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; });
28643
28644/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(290);
28645/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; });
28646
28647/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(291);
28648/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; });
28649
28650/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(292);
28651/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; });
28652
28653/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(293);
28654/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; });
28655
28656/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(294);
28657/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; });
28658
28659/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(297);
28660/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; });
28661
28662/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(298);
28663/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; });
28664
28665/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(299);
28666/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; });
28667
28668/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(300);
28669/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; });
28670
28671/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(301);
28672/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; });
28673
28674/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(262);
28675/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; });
28676
28677/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(302);
28678/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; });
28679
28680/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(303);
28681/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; });
28682
28683/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(304);
28684/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; });
28685
28686/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(305);
28687/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; });
28688
28689/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(189);
28690/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; });
28691
28692/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(306);
28693/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; });
28694
28695/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(307);
28696/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; });
28697
28698/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(308);
28699/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; });
28700
28701/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(224);
28702/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; });
28703
28704/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(310);
28705/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; });
28706
28707/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(311);
28708/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; });
28709
28710/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(312);
28711/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; });
28712
28713/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(315);
28714/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; });
28715
28716/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(239);
28717/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; });
28718
28719/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(240);
28720/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
28721
28722/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
28723
28724/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(316);
28725/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; });
28726
28727/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(317);
28728/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; });
28729
28730/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(318);
28731/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; });
28732
28733/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(319);
28734/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; });
28735
28736/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(199);
28737/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; });
28738
28739/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(320);
28740/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; });
28741
28742/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(321);
28743/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; });
28744
28745/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(322);
28746/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; });
28747
28748/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(323);
28749/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; });
28750
28751/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(324);
28752/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; });
28753
28754/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(325);
28755/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; });
28756
28757/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(326);
28758/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; });
28759
28760/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(327);
28761/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; });
28762
28763/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(328);
28764/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; });
28765
28766/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(313);
28767/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; });
28768
28769/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(329);
28770/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; });
28771
28772/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(330);
28773/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; });
28774
28775/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(331);
28776/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; });
28777
28778/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(332);
28779/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; });
28780
28781/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(188);
28782/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; });
28783
28784/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(333);
28785/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; });
28786
28787/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(334);
28788/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; });
28789
28790/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(314);
28791/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; });
28792
28793/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(335);
28794/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; });
28795
28796/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(336);
28797/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; });
28798
28799/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(337);
28800/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; });
28801
28802/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(338);
28803/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; });
28804
28805/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(339);
28806/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; });
28807
28808/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(340);
28809/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; });
28810
28811/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(341);
28812/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; });
28813
28814/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(342);
28815/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; });
28816
28817/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(343);
28818/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; });
28819
28820/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(344);
28821/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; });
28822
28823/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(346);
28824/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; });
28825
28826/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(347);
28827/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; });
28828
28829/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(348);
28830/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; });
28831
28832/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(296);
28833/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; });
28834
28835/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(309);
28836/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; });
28837
28838/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(349);
28839/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; });
28840
28841/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(350);
28842/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; });
28843
28844/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(351);
28845/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; });
28846
28847/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(352);
28848/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; });
28849
28850/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(353);
28851/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; });
28852
28853/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(295);
28854/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; });
28855
28856/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(354);
28857/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; });
28858
28859/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(355);
28860/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; });
28861
28862/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(356);
28863/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; });
28864
28865/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(357);
28866/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; });
28867
28868/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(358);
28869/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; });
28870
28871/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(359);
28872/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; });
28873
28874/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(360);
28875/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; });
28876
28877/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(361);
28878/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; });
28879
28880/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(362);
28881/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; });
28882
28883/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(363);
28884/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; });
28885
28886/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(364);
28887/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; });
28888
28889/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(365);
28890/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; });
28891
28892/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(366);
28893/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; });
28894
28895/** PURE_IMPORTS_START PURE_IMPORTS_END */
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000//# sourceMappingURL=index.js.map
29001
29002
29003/***/ }),
29004/* 270 */
29005/***/ (function(module, __webpack_exports__, __webpack_require__) {
29006
29007"use strict";
29008__webpack_require__.r(__webpack_exports__);
29009/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
29010/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29011/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29012/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29013/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29014
29015
29016
29017function audit(durationSelector) {
29018 return function auditOperatorFunction(source) {
29019 return source.lift(new AuditOperator(durationSelector));
29020 };
29021}
29022var AuditOperator = /*@__PURE__*/ (function () {
29023 function AuditOperator(durationSelector) {
29024 this.durationSelector = durationSelector;
29025 }
29026 AuditOperator.prototype.call = function (subscriber, source) {
29027 return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
29028 };
29029 return AuditOperator;
29030}());
29031var AuditSubscriber = /*@__PURE__*/ (function (_super) {
29032 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AuditSubscriber, _super);
29033 function AuditSubscriber(destination, durationSelector) {
29034 var _this = _super.call(this, destination) || this;
29035 _this.durationSelector = durationSelector;
29036 _this.hasValue = false;
29037 return _this;
29038 }
29039 AuditSubscriber.prototype._next = function (value) {
29040 this.value = value;
29041 this.hasValue = true;
29042 if (!this.throttled) {
29043 var duration = void 0;
29044 try {
29045 var durationSelector = this.durationSelector;
29046 duration = durationSelector(value);
29047 }
29048 catch (err) {
29049 return this.destination.error(err);
29050 }
29051 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
29052 if (!innerSubscription || innerSubscription.closed) {
29053 this.clearThrottle();
29054 }
29055 else {
29056 this.add(this.throttled = innerSubscription);
29057 }
29058 }
29059 };
29060 AuditSubscriber.prototype.clearThrottle = function () {
29061 var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
29062 if (throttled) {
29063 this.remove(throttled);
29064 this.throttled = null;
29065 throttled.unsubscribe();
29066 }
29067 if (hasValue) {
29068 this.value = null;
29069 this.hasValue = false;
29070 this.destination.next(value);
29071 }
29072 };
29073 AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
29074 this.clearThrottle();
29075 };
29076 AuditSubscriber.prototype.notifyComplete = function () {
29077 this.clearThrottle();
29078 };
29079 return AuditSubscriber;
29080}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29081//# sourceMappingURL=audit.js.map
29082
29083
29084/***/ }),
29085/* 271 */
29086/***/ (function(module, __webpack_exports__, __webpack_require__) {
29087
29088"use strict";
29089__webpack_require__.r(__webpack_exports__);
29090/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
29091/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
29092/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(270);
29093/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(265);
29094/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
29095
29096
29097
29098function auditTime(duration, scheduler) {
29099 if (scheduler === void 0) {
29100 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
29101 }
29102 return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(function () { return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler); });
29103}
29104//# sourceMappingURL=auditTime.js.map
29105
29106
29107/***/ }),
29108/* 272 */
29109/***/ (function(module, __webpack_exports__, __webpack_require__) {
29110
29111"use strict";
29112__webpack_require__.r(__webpack_exports__);
29113/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; });
29114/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29115/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29116/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29117/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29118
29119
29120
29121function buffer(closingNotifier) {
29122 return function bufferOperatorFunction(source) {
29123 return source.lift(new BufferOperator(closingNotifier));
29124 };
29125}
29126var BufferOperator = /*@__PURE__*/ (function () {
29127 function BufferOperator(closingNotifier) {
29128 this.closingNotifier = closingNotifier;
29129 }
29130 BufferOperator.prototype.call = function (subscriber, source) {
29131 return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
29132 };
29133 return BufferOperator;
29134}());
29135var BufferSubscriber = /*@__PURE__*/ (function (_super) {
29136 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSubscriber, _super);
29137 function BufferSubscriber(destination, closingNotifier) {
29138 var _this = _super.call(this, destination) || this;
29139 _this.buffer = [];
29140 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, closingNotifier));
29141 return _this;
29142 }
29143 BufferSubscriber.prototype._next = function (value) {
29144 this.buffer.push(value);
29145 };
29146 BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29147 var buffer = this.buffer;
29148 this.buffer = [];
29149 this.destination.next(buffer);
29150 };
29151 return BufferSubscriber;
29152}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29153//# sourceMappingURL=buffer.js.map
29154
29155
29156/***/ }),
29157/* 273 */
29158/***/ (function(module, __webpack_exports__, __webpack_require__) {
29159
29160"use strict";
29161__webpack_require__.r(__webpack_exports__);
29162/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
29163/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29164/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29165/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29166
29167
29168function bufferCount(bufferSize, startBufferEvery) {
29169 if (startBufferEvery === void 0) {
29170 startBufferEvery = null;
29171 }
29172 return function bufferCountOperatorFunction(source) {
29173 return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
29174 };
29175}
29176var BufferCountOperator = /*@__PURE__*/ (function () {
29177 function BufferCountOperator(bufferSize, startBufferEvery) {
29178 this.bufferSize = bufferSize;
29179 this.startBufferEvery = startBufferEvery;
29180 if (!startBufferEvery || bufferSize === startBufferEvery) {
29181 this.subscriberClass = BufferCountSubscriber;
29182 }
29183 else {
29184 this.subscriberClass = BufferSkipCountSubscriber;
29185 }
29186 }
29187 BufferCountOperator.prototype.call = function (subscriber, source) {
29188 return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
29189 };
29190 return BufferCountOperator;
29191}());
29192var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
29193 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferCountSubscriber, _super);
29194 function BufferCountSubscriber(destination, bufferSize) {
29195 var _this = _super.call(this, destination) || this;
29196 _this.bufferSize = bufferSize;
29197 _this.buffer = [];
29198 return _this;
29199 }
29200 BufferCountSubscriber.prototype._next = function (value) {
29201 var buffer = this.buffer;
29202 buffer.push(value);
29203 if (buffer.length == this.bufferSize) {
29204 this.destination.next(buffer);
29205 this.buffer = [];
29206 }
29207 };
29208 BufferCountSubscriber.prototype._complete = function () {
29209 var buffer = this.buffer;
29210 if (buffer.length > 0) {
29211 this.destination.next(buffer);
29212 }
29213 _super.prototype._complete.call(this);
29214 };
29215 return BufferCountSubscriber;
29216}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29217var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
29218 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSkipCountSubscriber, _super);
29219 function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
29220 var _this = _super.call(this, destination) || this;
29221 _this.bufferSize = bufferSize;
29222 _this.startBufferEvery = startBufferEvery;
29223 _this.buffers = [];
29224 _this.count = 0;
29225 return _this;
29226 }
29227 BufferSkipCountSubscriber.prototype._next = function (value) {
29228 var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
29229 this.count++;
29230 if (count % startBufferEvery === 0) {
29231 buffers.push([]);
29232 }
29233 for (var i = buffers.length; i--;) {
29234 var buffer = buffers[i];
29235 buffer.push(value);
29236 if (buffer.length === bufferSize) {
29237 buffers.splice(i, 1);
29238 this.destination.next(buffer);
29239 }
29240 }
29241 };
29242 BufferSkipCountSubscriber.prototype._complete = function () {
29243 var _a = this, buffers = _a.buffers, destination = _a.destination;
29244 while (buffers.length > 0) {
29245 var buffer = buffers.shift();
29246 if (buffer.length > 0) {
29247 destination.next(buffer);
29248 }
29249 }
29250 _super.prototype._complete.call(this);
29251 };
29252 return BufferSkipCountSubscriber;
29253}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29254//# sourceMappingURL=bufferCount.js.map
29255
29256
29257/***/ }),
29258/* 274 */
29259/***/ (function(module, __webpack_exports__, __webpack_require__) {
29260
29261"use strict";
29262__webpack_require__.r(__webpack_exports__);
29263/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
29264/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29265/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
29266/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
29267/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
29268/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
29269
29270
29271
29272
29273function bufferTime(bufferTimeSpan) {
29274 var length = arguments.length;
29275 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
29276 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(arguments[arguments.length - 1])) {
29277 scheduler = arguments[arguments.length - 1];
29278 length--;
29279 }
29280 var bufferCreationInterval = null;
29281 if (length >= 2) {
29282 bufferCreationInterval = arguments[1];
29283 }
29284 var maxBufferSize = Number.POSITIVE_INFINITY;
29285 if (length >= 3) {
29286 maxBufferSize = arguments[2];
29287 }
29288 return function bufferTimeOperatorFunction(source) {
29289 return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
29290 };
29291}
29292var BufferTimeOperator = /*@__PURE__*/ (function () {
29293 function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
29294 this.bufferTimeSpan = bufferTimeSpan;
29295 this.bufferCreationInterval = bufferCreationInterval;
29296 this.maxBufferSize = maxBufferSize;
29297 this.scheduler = scheduler;
29298 }
29299 BufferTimeOperator.prototype.call = function (subscriber, source) {
29300 return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
29301 };
29302 return BufferTimeOperator;
29303}());
29304var Context = /*@__PURE__*/ (function () {
29305 function Context() {
29306 this.buffer = [];
29307 }
29308 return Context;
29309}());
29310var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
29311 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferTimeSubscriber, _super);
29312 function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
29313 var _this = _super.call(this, destination) || this;
29314 _this.bufferTimeSpan = bufferTimeSpan;
29315 _this.bufferCreationInterval = bufferCreationInterval;
29316 _this.maxBufferSize = maxBufferSize;
29317 _this.scheduler = scheduler;
29318 _this.contexts = [];
29319 var context = _this.openContext();
29320 _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
29321 if (_this.timespanOnly) {
29322 var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
29323 _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
29324 }
29325 else {
29326 var closeState = { subscriber: _this, context: context };
29327 var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
29328 _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
29329 _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
29330 }
29331 return _this;
29332 }
29333 BufferTimeSubscriber.prototype._next = function (value) {
29334 var contexts = this.contexts;
29335 var len = contexts.length;
29336 var filledBufferContext;
29337 for (var i = 0; i < len; i++) {
29338 var context_1 = contexts[i];
29339 var buffer = context_1.buffer;
29340 buffer.push(value);
29341 if (buffer.length == this.maxBufferSize) {
29342 filledBufferContext = context_1;
29343 }
29344 }
29345 if (filledBufferContext) {
29346 this.onBufferFull(filledBufferContext);
29347 }
29348 };
29349 BufferTimeSubscriber.prototype._error = function (err) {
29350 this.contexts.length = 0;
29351 _super.prototype._error.call(this, err);
29352 };
29353 BufferTimeSubscriber.prototype._complete = function () {
29354 var _a = this, contexts = _a.contexts, destination = _a.destination;
29355 while (contexts.length > 0) {
29356 var context_2 = contexts.shift();
29357 destination.next(context_2.buffer);
29358 }
29359 _super.prototype._complete.call(this);
29360 };
29361 BufferTimeSubscriber.prototype._unsubscribe = function () {
29362 this.contexts = null;
29363 };
29364 BufferTimeSubscriber.prototype.onBufferFull = function (context) {
29365 this.closeContext(context);
29366 var closeAction = context.closeAction;
29367 closeAction.unsubscribe();
29368 this.remove(closeAction);
29369 if (!this.closed && this.timespanOnly) {
29370 context = this.openContext();
29371 var bufferTimeSpan = this.bufferTimeSpan;
29372 var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
29373 this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
29374 }
29375 };
29376 BufferTimeSubscriber.prototype.openContext = function () {
29377 var context = new Context();
29378 this.contexts.push(context);
29379 return context;
29380 };
29381 BufferTimeSubscriber.prototype.closeContext = function (context) {
29382 this.destination.next(context.buffer);
29383 var contexts = this.contexts;
29384 var spliceIndex = contexts ? contexts.indexOf(context) : -1;
29385 if (spliceIndex >= 0) {
29386 contexts.splice(contexts.indexOf(context), 1);
29387 }
29388 };
29389 return BufferTimeSubscriber;
29390}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
29391function dispatchBufferTimeSpanOnly(state) {
29392 var subscriber = state.subscriber;
29393 var prevContext = state.context;
29394 if (prevContext) {
29395 subscriber.closeContext(prevContext);
29396 }
29397 if (!subscriber.closed) {
29398 state.context = subscriber.openContext();
29399 state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
29400 }
29401}
29402function dispatchBufferCreation(state) {
29403 var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
29404 var context = subscriber.openContext();
29405 var action = this;
29406 if (!subscriber.closed) {
29407 subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
29408 action.schedule(state, bufferCreationInterval);
29409 }
29410}
29411function dispatchBufferClose(arg) {
29412 var subscriber = arg.subscriber, context = arg.context;
29413 subscriber.closeContext(context);
29414}
29415//# sourceMappingURL=bufferTime.js.map
29416
29417
29418/***/ }),
29419/* 275 */
29420/***/ (function(module, __webpack_exports__, __webpack_require__) {
29421
29422"use strict";
29423__webpack_require__.r(__webpack_exports__);
29424/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
29425/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29426/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
29427/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29428/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
29429/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
29430
29431
29432
29433
29434function bufferToggle(openings, closingSelector) {
29435 return function bufferToggleOperatorFunction(source) {
29436 return source.lift(new BufferToggleOperator(openings, closingSelector));
29437 };
29438}
29439var BufferToggleOperator = /*@__PURE__*/ (function () {
29440 function BufferToggleOperator(openings, closingSelector) {
29441 this.openings = openings;
29442 this.closingSelector = closingSelector;
29443 }
29444 BufferToggleOperator.prototype.call = function (subscriber, source) {
29445 return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
29446 };
29447 return BufferToggleOperator;
29448}());
29449var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
29450 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferToggleSubscriber, _super);
29451 function BufferToggleSubscriber(destination, openings, closingSelector) {
29452 var _this = _super.call(this, destination) || this;
29453 _this.openings = openings;
29454 _this.closingSelector = closingSelector;
29455 _this.contexts = [];
29456 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, openings));
29457 return _this;
29458 }
29459 BufferToggleSubscriber.prototype._next = function (value) {
29460 var contexts = this.contexts;
29461 var len = contexts.length;
29462 for (var i = 0; i < len; i++) {
29463 contexts[i].buffer.push(value);
29464 }
29465 };
29466 BufferToggleSubscriber.prototype._error = function (err) {
29467 var contexts = this.contexts;
29468 while (contexts.length > 0) {
29469 var context_1 = contexts.shift();
29470 context_1.subscription.unsubscribe();
29471 context_1.buffer = null;
29472 context_1.subscription = null;
29473 }
29474 this.contexts = null;
29475 _super.prototype._error.call(this, err);
29476 };
29477 BufferToggleSubscriber.prototype._complete = function () {
29478 var contexts = this.contexts;
29479 while (contexts.length > 0) {
29480 var context_2 = contexts.shift();
29481 this.destination.next(context_2.buffer);
29482 context_2.subscription.unsubscribe();
29483 context_2.buffer = null;
29484 context_2.subscription = null;
29485 }
29486 this.contexts = null;
29487 _super.prototype._complete.call(this);
29488 };
29489 BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29490 outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
29491 };
29492 BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
29493 this.closeBuffer(innerSub.context);
29494 };
29495 BufferToggleSubscriber.prototype.openBuffer = function (value) {
29496 try {
29497 var closingSelector = this.closingSelector;
29498 var closingNotifier = closingSelector.call(this, value);
29499 if (closingNotifier) {
29500 this.trySubscribe(closingNotifier);
29501 }
29502 }
29503 catch (err) {
29504 this._error(err);
29505 }
29506 };
29507 BufferToggleSubscriber.prototype.closeBuffer = function (context) {
29508 var contexts = this.contexts;
29509 if (contexts && context) {
29510 var buffer = context.buffer, subscription = context.subscription;
29511 this.destination.next(buffer);
29512 contexts.splice(contexts.indexOf(context), 1);
29513 this.remove(subscription);
29514 subscription.unsubscribe();
29515 }
29516 };
29517 BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
29518 var contexts = this.contexts;
29519 var buffer = [];
29520 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
29521 var context = { buffer: buffer, subscription: subscription };
29522 contexts.push(context);
29523 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier, context);
29524 if (!innerSubscription || innerSubscription.closed) {
29525 this.closeBuffer(context);
29526 }
29527 else {
29528 innerSubscription.context = context;
29529 this.add(innerSubscription);
29530 subscription.add(innerSubscription);
29531 }
29532 };
29533 return BufferToggleSubscriber;
29534}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
29535//# sourceMappingURL=bufferToggle.js.map
29536
29537
29538/***/ }),
29539/* 276 */
29540/***/ (function(module, __webpack_exports__, __webpack_require__) {
29541
29542"use strict";
29543__webpack_require__.r(__webpack_exports__);
29544/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
29545/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29546/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
29547/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
29548/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
29549/** PURE_IMPORTS_START tslib,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29550
29551
29552
29553
29554function bufferWhen(closingSelector) {
29555 return function (source) {
29556 return source.lift(new BufferWhenOperator(closingSelector));
29557 };
29558}
29559var BufferWhenOperator = /*@__PURE__*/ (function () {
29560 function BufferWhenOperator(closingSelector) {
29561 this.closingSelector = closingSelector;
29562 }
29563 BufferWhenOperator.prototype.call = function (subscriber, source) {
29564 return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
29565 };
29566 return BufferWhenOperator;
29567}());
29568var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
29569 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferWhenSubscriber, _super);
29570 function BufferWhenSubscriber(destination, closingSelector) {
29571 var _this = _super.call(this, destination) || this;
29572 _this.closingSelector = closingSelector;
29573 _this.subscribing = false;
29574 _this.openBuffer();
29575 return _this;
29576 }
29577 BufferWhenSubscriber.prototype._next = function (value) {
29578 this.buffer.push(value);
29579 };
29580 BufferWhenSubscriber.prototype._complete = function () {
29581 var buffer = this.buffer;
29582 if (buffer) {
29583 this.destination.next(buffer);
29584 }
29585 _super.prototype._complete.call(this);
29586 };
29587 BufferWhenSubscriber.prototype._unsubscribe = function () {
29588 this.buffer = null;
29589 this.subscribing = false;
29590 };
29591 BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29592 this.openBuffer();
29593 };
29594 BufferWhenSubscriber.prototype.notifyComplete = function () {
29595 if (this.subscribing) {
29596 this.complete();
29597 }
29598 else {
29599 this.openBuffer();
29600 }
29601 };
29602 BufferWhenSubscriber.prototype.openBuffer = function () {
29603 var closingSubscription = this.closingSubscription;
29604 if (closingSubscription) {
29605 this.remove(closingSubscription);
29606 closingSubscription.unsubscribe();
29607 }
29608 var buffer = this.buffer;
29609 if (this.buffer) {
29610 this.destination.next(buffer);
29611 }
29612 this.buffer = [];
29613 var closingNotifier;
29614 try {
29615 var closingSelector = this.closingSelector;
29616 closingNotifier = closingSelector();
29617 }
29618 catch (err) {
29619 return this.error(err);
29620 }
29621 closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
29622 this.closingSubscription = closingSubscription;
29623 this.add(closingSubscription);
29624 this.subscribing = true;
29625 closingSubscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
29626 this.subscribing = false;
29627 };
29628 return BufferWhenSubscriber;
29629}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
29630//# sourceMappingURL=bufferWhen.js.map
29631
29632
29633/***/ }),
29634/* 277 */
29635/***/ (function(module, __webpack_exports__, __webpack_require__) {
29636
29637"use strict";
29638__webpack_require__.r(__webpack_exports__);
29639/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
29640/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29641/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29642/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
29643/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
29644/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29645
29646
29647
29648
29649function catchError(selector) {
29650 return function catchErrorOperatorFunction(source) {
29651 var operator = new CatchOperator(selector);
29652 var caught = source.lift(operator);
29653 return (operator.caught = caught);
29654 };
29655}
29656var CatchOperator = /*@__PURE__*/ (function () {
29657 function CatchOperator(selector) {
29658 this.selector = selector;
29659 }
29660 CatchOperator.prototype.call = function (subscriber, source) {
29661 return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
29662 };
29663 return CatchOperator;
29664}());
29665var CatchSubscriber = /*@__PURE__*/ (function (_super) {
29666 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CatchSubscriber, _super);
29667 function CatchSubscriber(destination, selector, caught) {
29668 var _this = _super.call(this, destination) || this;
29669 _this.selector = selector;
29670 _this.caught = caught;
29671 return _this;
29672 }
29673 CatchSubscriber.prototype.error = function (err) {
29674 if (!this.isStopped) {
29675 var result = void 0;
29676 try {
29677 result = this.selector(err, this.caught);
29678 }
29679 catch (err2) {
29680 _super.prototype.error.call(this, err2);
29681 return;
29682 }
29683 this._unsubscribeAndRecycle();
29684 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
29685 this.add(innerSubscriber);
29686 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
29687 if (innerSubscription !== innerSubscriber) {
29688 this.add(innerSubscription);
29689 }
29690 }
29691 };
29692 return CatchSubscriber;
29693}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29694//# sourceMappingURL=catchError.js.map
29695
29696
29697/***/ }),
29698/* 278 */
29699/***/ (function(module, __webpack_exports__, __webpack_require__) {
29700
29701"use strict";
29702__webpack_require__.r(__webpack_exports__);
29703/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
29704/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(226);
29705/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
29706
29707function combineAll(project) {
29708 return function (source) { return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); };
29709}
29710//# sourceMappingURL=combineAll.js.map
29711
29712
29713/***/ }),
29714/* 279 */
29715/***/ (function(module, __webpack_exports__, __webpack_require__) {
29716
29717"use strict";
29718__webpack_require__.r(__webpack_exports__);
29719/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
29720/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
29721/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
29722/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(241);
29723/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
29724
29725
29726
29727var none = {};
29728function combineLatest() {
29729 var observables = [];
29730 for (var _i = 0; _i < arguments.length; _i++) {
29731 observables[_i] = arguments[_i];
29732 }
29733 var project = null;
29734 if (typeof observables[observables.length - 1] === 'function') {
29735 project = observables.pop();
29736 }
29737 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
29738 observables = observables[0].slice();
29739 }
29740 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)); };
29741}
29742//# sourceMappingURL=combineLatest.js.map
29743
29744
29745/***/ }),
29746/* 280 */
29747/***/ (function(module, __webpack_exports__, __webpack_require__) {
29748
29749"use strict";
29750__webpack_require__.r(__webpack_exports__);
29751/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
29752/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
29753/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
29754
29755function concat() {
29756 var observables = [];
29757 for (var _i = 0; _i < arguments.length; _i++) {
29758 observables[_i] = arguments[_i];
29759 }
29760 return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"].apply(void 0, [source].concat(observables))); };
29761}
29762//# sourceMappingURL=concat.js.map
29763
29764
29765/***/ }),
29766/* 281 */
29767/***/ (function(module, __webpack_exports__, __webpack_require__) {
29768
29769"use strict";
29770__webpack_require__.r(__webpack_exports__);
29771/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
29772/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
29773/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
29774
29775function concatMap(project, resultSelector) {
29776 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
29777}
29778//# sourceMappingURL=concatMap.js.map
29779
29780
29781/***/ }),
29782/* 282 */
29783/***/ (function(module, __webpack_exports__, __webpack_require__) {
29784
29785"use strict";
29786__webpack_require__.r(__webpack_exports__);
29787/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
29788/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(281);
29789/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
29790
29791function concatMapTo(innerObservable, resultSelector) {
29792 return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () { return innerObservable; }, resultSelector);
29793}
29794//# sourceMappingURL=concatMapTo.js.map
29795
29796
29797/***/ }),
29798/* 283 */
29799/***/ (function(module, __webpack_exports__, __webpack_require__) {
29800
29801"use strict";
29802__webpack_require__.r(__webpack_exports__);
29803/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
29804/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29805/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29806/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29807
29808
29809function count(predicate) {
29810 return function (source) { return source.lift(new CountOperator(predicate, source)); };
29811}
29812var CountOperator = /*@__PURE__*/ (function () {
29813 function CountOperator(predicate, source) {
29814 this.predicate = predicate;
29815 this.source = source;
29816 }
29817 CountOperator.prototype.call = function (subscriber, source) {
29818 return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
29819 };
29820 return CountOperator;
29821}());
29822var CountSubscriber = /*@__PURE__*/ (function (_super) {
29823 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountSubscriber, _super);
29824 function CountSubscriber(destination, predicate, source) {
29825 var _this = _super.call(this, destination) || this;
29826 _this.predicate = predicate;
29827 _this.source = source;
29828 _this.count = 0;
29829 _this.index = 0;
29830 return _this;
29831 }
29832 CountSubscriber.prototype._next = function (value) {
29833 if (this.predicate) {
29834 this._tryPredicate(value);
29835 }
29836 else {
29837 this.count++;
29838 }
29839 };
29840 CountSubscriber.prototype._tryPredicate = function (value) {
29841 var result;
29842 try {
29843 result = this.predicate(value, this.index++, this.source);
29844 }
29845 catch (err) {
29846 this.destination.error(err);
29847 return;
29848 }
29849 if (result) {
29850 this.count++;
29851 }
29852 };
29853 CountSubscriber.prototype._complete = function () {
29854 this.destination.next(this.count);
29855 this.destination.complete();
29856 };
29857 return CountSubscriber;
29858}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29859//# sourceMappingURL=count.js.map
29860
29861
29862/***/ }),
29863/* 284 */
29864/***/ (function(module, __webpack_exports__, __webpack_require__) {
29865
29866"use strict";
29867__webpack_require__.r(__webpack_exports__);
29868/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
29869/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29870/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29871/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29872/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29873
29874
29875
29876function debounce(durationSelector) {
29877 return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
29878}
29879var DebounceOperator = /*@__PURE__*/ (function () {
29880 function DebounceOperator(durationSelector) {
29881 this.durationSelector = durationSelector;
29882 }
29883 DebounceOperator.prototype.call = function (subscriber, source) {
29884 return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
29885 };
29886 return DebounceOperator;
29887}());
29888var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
29889 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceSubscriber, _super);
29890 function DebounceSubscriber(destination, durationSelector) {
29891 var _this = _super.call(this, destination) || this;
29892 _this.durationSelector = durationSelector;
29893 _this.hasValue = false;
29894 _this.durationSubscription = null;
29895 return _this;
29896 }
29897 DebounceSubscriber.prototype._next = function (value) {
29898 try {
29899 var result = this.durationSelector.call(this, value);
29900 if (result) {
29901 this._tryNext(value, result);
29902 }
29903 }
29904 catch (err) {
29905 this.destination.error(err);
29906 }
29907 };
29908 DebounceSubscriber.prototype._complete = function () {
29909 this.emitValue();
29910 this.destination.complete();
29911 };
29912 DebounceSubscriber.prototype._tryNext = function (value, duration) {
29913 var subscription = this.durationSubscription;
29914 this.value = value;
29915 this.hasValue = true;
29916 if (subscription) {
29917 subscription.unsubscribe();
29918 this.remove(subscription);
29919 }
29920 subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
29921 if (subscription && !subscription.closed) {
29922 this.add(this.durationSubscription = subscription);
29923 }
29924 };
29925 DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29926 this.emitValue();
29927 };
29928 DebounceSubscriber.prototype.notifyComplete = function () {
29929 this.emitValue();
29930 };
29931 DebounceSubscriber.prototype.emitValue = function () {
29932 if (this.hasValue) {
29933 var value = this.value;
29934 var subscription = this.durationSubscription;
29935 if (subscription) {
29936 this.durationSubscription = null;
29937 subscription.unsubscribe();
29938 this.remove(subscription);
29939 }
29940 this.value = null;
29941 this.hasValue = false;
29942 _super.prototype._next.call(this, value);
29943 }
29944 };
29945 return DebounceSubscriber;
29946}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29947//# sourceMappingURL=debounce.js.map
29948
29949
29950/***/ }),
29951/* 285 */
29952/***/ (function(module, __webpack_exports__, __webpack_require__) {
29953
29954"use strict";
29955__webpack_require__.r(__webpack_exports__);
29956/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
29957/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29958/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29959/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
29960/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
29961
29962
29963
29964function debounceTime(dueTime, scheduler) {
29965 if (scheduler === void 0) {
29966 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
29967 }
29968 return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
29969}
29970var DebounceTimeOperator = /*@__PURE__*/ (function () {
29971 function DebounceTimeOperator(dueTime, scheduler) {
29972 this.dueTime = dueTime;
29973 this.scheduler = scheduler;
29974 }
29975 DebounceTimeOperator.prototype.call = function (subscriber, source) {
29976 return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
29977 };
29978 return DebounceTimeOperator;
29979}());
29980var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
29981 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceTimeSubscriber, _super);
29982 function DebounceTimeSubscriber(destination, dueTime, scheduler) {
29983 var _this = _super.call(this, destination) || this;
29984 _this.dueTime = dueTime;
29985 _this.scheduler = scheduler;
29986 _this.debouncedSubscription = null;
29987 _this.lastValue = null;
29988 _this.hasValue = false;
29989 return _this;
29990 }
29991 DebounceTimeSubscriber.prototype._next = function (value) {
29992 this.clearDebounce();
29993 this.lastValue = value;
29994 this.hasValue = true;
29995 this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
29996 };
29997 DebounceTimeSubscriber.prototype._complete = function () {
29998 this.debouncedNext();
29999 this.destination.complete();
30000 };
30001 DebounceTimeSubscriber.prototype.debouncedNext = function () {
30002 this.clearDebounce();
30003 if (this.hasValue) {
30004 var lastValue = this.lastValue;
30005 this.lastValue = null;
30006 this.hasValue = false;
30007 this.destination.next(lastValue);
30008 }
30009 };
30010 DebounceTimeSubscriber.prototype.clearDebounce = function () {
30011 var debouncedSubscription = this.debouncedSubscription;
30012 if (debouncedSubscription !== null) {
30013 this.remove(debouncedSubscription);
30014 debouncedSubscription.unsubscribe();
30015 this.debouncedSubscription = null;
30016 }
30017 };
30018 return DebounceTimeSubscriber;
30019}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30020function dispatchNext(subscriber) {
30021 subscriber.debouncedNext();
30022}
30023//# sourceMappingURL=debounceTime.js.map
30024
30025
30026/***/ }),
30027/* 286 */
30028/***/ (function(module, __webpack_exports__, __webpack_require__) {
30029
30030"use strict";
30031__webpack_require__.r(__webpack_exports__);
30032/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
30033/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30034/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30035/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30036
30037
30038function defaultIfEmpty(defaultValue) {
30039 if (defaultValue === void 0) {
30040 defaultValue = null;
30041 }
30042 return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
30043}
30044var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
30045 function DefaultIfEmptyOperator(defaultValue) {
30046 this.defaultValue = defaultValue;
30047 }
30048 DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
30049 return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
30050 };
30051 return DefaultIfEmptyOperator;
30052}());
30053var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
30054 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DefaultIfEmptySubscriber, _super);
30055 function DefaultIfEmptySubscriber(destination, defaultValue) {
30056 var _this = _super.call(this, destination) || this;
30057 _this.defaultValue = defaultValue;
30058 _this.isEmpty = true;
30059 return _this;
30060 }
30061 DefaultIfEmptySubscriber.prototype._next = function (value) {
30062 this.isEmpty = false;
30063 this.destination.next(value);
30064 };
30065 DefaultIfEmptySubscriber.prototype._complete = function () {
30066 if (this.isEmpty) {
30067 this.destination.next(this.defaultValue);
30068 }
30069 this.destination.complete();
30070 };
30071 return DefaultIfEmptySubscriber;
30072}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30073//# sourceMappingURL=defaultIfEmpty.js.map
30074
30075
30076/***/ }),
30077/* 287 */
30078/***/ (function(module, __webpack_exports__, __webpack_require__) {
30079
30080"use strict";
30081__webpack_require__.r(__webpack_exports__);
30082/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
30083/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30084/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
30085/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(288);
30086/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
30087/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(200);
30088/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
30089
30090
30091
30092
30093
30094function delay(delay, scheduler) {
30095 if (scheduler === void 0) {
30096 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
30097 }
30098 var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(delay);
30099 var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
30100 return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
30101}
30102var DelayOperator = /*@__PURE__*/ (function () {
30103 function DelayOperator(delay, scheduler) {
30104 this.delay = delay;
30105 this.scheduler = scheduler;
30106 }
30107 DelayOperator.prototype.call = function (subscriber, source) {
30108 return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
30109 };
30110 return DelayOperator;
30111}());
30112var DelaySubscriber = /*@__PURE__*/ (function (_super) {
30113 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelaySubscriber, _super);
30114 function DelaySubscriber(destination, delay, scheduler) {
30115 var _this = _super.call(this, destination) || this;
30116 _this.delay = delay;
30117 _this.scheduler = scheduler;
30118 _this.queue = [];
30119 _this.active = false;
30120 _this.errored = false;
30121 return _this;
30122 }
30123 DelaySubscriber.dispatch = function (state) {
30124 var source = state.source;
30125 var queue = source.queue;
30126 var scheduler = state.scheduler;
30127 var destination = state.destination;
30128 while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
30129 queue.shift().notification.observe(destination);
30130 }
30131 if (queue.length > 0) {
30132 var delay_1 = Math.max(0, queue[0].time - scheduler.now());
30133 this.schedule(state, delay_1);
30134 }
30135 else {
30136 this.unsubscribe();
30137 source.active = false;
30138 }
30139 };
30140 DelaySubscriber.prototype._schedule = function (scheduler) {
30141 this.active = true;
30142 var destination = this.destination;
30143 destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
30144 source: this, destination: this.destination, scheduler: scheduler
30145 }));
30146 };
30147 DelaySubscriber.prototype.scheduleNotification = function (notification) {
30148 if (this.errored === true) {
30149 return;
30150 }
30151 var scheduler = this.scheduler;
30152 var message = new DelayMessage(scheduler.now() + this.delay, notification);
30153 this.queue.push(message);
30154 if (this.active === false) {
30155 this._schedule(scheduler);
30156 }
30157 };
30158 DelaySubscriber.prototype._next = function (value) {
30159 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createNext(value));
30160 };
30161 DelaySubscriber.prototype._error = function (err) {
30162 this.errored = true;
30163 this.queue = [];
30164 this.destination.error(err);
30165 this.unsubscribe();
30166 };
30167 DelaySubscriber.prototype._complete = function () {
30168 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createComplete());
30169 this.unsubscribe();
30170 };
30171 return DelaySubscriber;
30172}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
30173var DelayMessage = /*@__PURE__*/ (function () {
30174 function DelayMessage(time, notification) {
30175 this.time = time;
30176 this.notification = notification;
30177 }
30178 return DelayMessage;
30179}());
30180//# sourceMappingURL=delay.js.map
30181
30182
30183/***/ }),
30184/* 288 */
30185/***/ (function(module, __webpack_exports__, __webpack_require__) {
30186
30187"use strict";
30188__webpack_require__.r(__webpack_exports__);
30189/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
30190/** PURE_IMPORTS_START PURE_IMPORTS_END */
30191function isDate(value) {
30192 return value instanceof Date && !isNaN(+value);
30193}
30194//# sourceMappingURL=isDate.js.map
30195
30196
30197/***/ }),
30198/* 289 */
30199/***/ (function(module, __webpack_exports__, __webpack_require__) {
30200
30201"use strict";
30202__webpack_require__.r(__webpack_exports__);
30203/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
30204/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30205/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30206/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
30207/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
30208/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
30209/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30210
30211
30212
30213
30214
30215function delayWhen(delayDurationSelector, subscriptionDelay) {
30216 if (subscriptionDelay) {
30217 return function (source) {
30218 return new SubscriptionDelayObservable(source, subscriptionDelay)
30219 .lift(new DelayWhenOperator(delayDurationSelector));
30220 };
30221 }
30222 return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
30223}
30224var DelayWhenOperator = /*@__PURE__*/ (function () {
30225 function DelayWhenOperator(delayDurationSelector) {
30226 this.delayDurationSelector = delayDurationSelector;
30227 }
30228 DelayWhenOperator.prototype.call = function (subscriber, source) {
30229 return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
30230 };
30231 return DelayWhenOperator;
30232}());
30233var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
30234 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelayWhenSubscriber, _super);
30235 function DelayWhenSubscriber(destination, delayDurationSelector) {
30236 var _this = _super.call(this, destination) || this;
30237 _this.delayDurationSelector = delayDurationSelector;
30238 _this.completed = false;
30239 _this.delayNotifierSubscriptions = [];
30240 _this.index = 0;
30241 return _this;
30242 }
30243 DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30244 this.destination.next(outerValue);
30245 this.removeSubscription(innerSub);
30246 this.tryComplete();
30247 };
30248 DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
30249 this._error(error);
30250 };
30251 DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
30252 var value = this.removeSubscription(innerSub);
30253 if (value) {
30254 this.destination.next(value);
30255 }
30256 this.tryComplete();
30257 };
30258 DelayWhenSubscriber.prototype._next = function (value) {
30259 var index = this.index++;
30260 try {
30261 var delayNotifier = this.delayDurationSelector(value, index);
30262 if (delayNotifier) {
30263 this.tryDelay(delayNotifier, value);
30264 }
30265 }
30266 catch (err) {
30267 this.destination.error(err);
30268 }
30269 };
30270 DelayWhenSubscriber.prototype._complete = function () {
30271 this.completed = true;
30272 this.tryComplete();
30273 this.unsubscribe();
30274 };
30275 DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
30276 subscription.unsubscribe();
30277 var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
30278 if (subscriptionIdx !== -1) {
30279 this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
30280 }
30281 return subscription.outerValue;
30282 };
30283 DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
30284 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, delayNotifier, value);
30285 if (notifierSubscription && !notifierSubscription.closed) {
30286 var destination = this.destination;
30287 destination.add(notifierSubscription);
30288 this.delayNotifierSubscriptions.push(notifierSubscription);
30289 }
30290 };
30291 DelayWhenSubscriber.prototype.tryComplete = function () {
30292 if (this.completed && this.delayNotifierSubscriptions.length === 0) {
30293 this.destination.complete();
30294 }
30295 };
30296 return DelayWhenSubscriber;
30297}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
30298var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
30299 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelayObservable, _super);
30300 function SubscriptionDelayObservable(source, subscriptionDelay) {
30301 var _this = _super.call(this) || this;
30302 _this.source = source;
30303 _this.subscriptionDelay = subscriptionDelay;
30304 return _this;
30305 }
30306 SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
30307 this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
30308 };
30309 return SubscriptionDelayObservable;
30310}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
30311var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
30312 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelaySubscriber, _super);
30313 function SubscriptionDelaySubscriber(parent, source) {
30314 var _this = _super.call(this) || this;
30315 _this.parent = parent;
30316 _this.source = source;
30317 _this.sourceSubscribed = false;
30318 return _this;
30319 }
30320 SubscriptionDelaySubscriber.prototype._next = function (unused) {
30321 this.subscribeToSource();
30322 };
30323 SubscriptionDelaySubscriber.prototype._error = function (err) {
30324 this.unsubscribe();
30325 this.parent.error(err);
30326 };
30327 SubscriptionDelaySubscriber.prototype._complete = function () {
30328 this.unsubscribe();
30329 this.subscribeToSource();
30330 };
30331 SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
30332 if (!this.sourceSubscribed) {
30333 this.sourceSubscribed = true;
30334 this.unsubscribe();
30335 this.source.subscribe(this.parent);
30336 }
30337 };
30338 return SubscriptionDelaySubscriber;
30339}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30340//# sourceMappingURL=delayWhen.js.map
30341
30342
30343/***/ }),
30344/* 290 */
30345/***/ (function(module, __webpack_exports__, __webpack_require__) {
30346
30347"use strict";
30348__webpack_require__.r(__webpack_exports__);
30349/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
30350/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30351/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30352/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30353
30354
30355function dematerialize() {
30356 return function dematerializeOperatorFunction(source) {
30357 return source.lift(new DeMaterializeOperator());
30358 };
30359}
30360var DeMaterializeOperator = /*@__PURE__*/ (function () {
30361 function DeMaterializeOperator() {
30362 }
30363 DeMaterializeOperator.prototype.call = function (subscriber, source) {
30364 return source.subscribe(new DeMaterializeSubscriber(subscriber));
30365 };
30366 return DeMaterializeOperator;
30367}());
30368var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
30369 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DeMaterializeSubscriber, _super);
30370 function DeMaterializeSubscriber(destination) {
30371 return _super.call(this, destination) || this;
30372 }
30373 DeMaterializeSubscriber.prototype._next = function (value) {
30374 value.observe(this.destination);
30375 };
30376 return DeMaterializeSubscriber;
30377}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30378//# sourceMappingURL=dematerialize.js.map
30379
30380
30381/***/ }),
30382/* 291 */
30383/***/ (function(module, __webpack_exports__, __webpack_require__) {
30384
30385"use strict";
30386__webpack_require__.r(__webpack_exports__);
30387/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
30388/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; });
30389/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30390/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30391/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
30392/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30393
30394
30395
30396function distinct(keySelector, flushes) {
30397 return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
30398}
30399var DistinctOperator = /*@__PURE__*/ (function () {
30400 function DistinctOperator(keySelector, flushes) {
30401 this.keySelector = keySelector;
30402 this.flushes = flushes;
30403 }
30404 DistinctOperator.prototype.call = function (subscriber, source) {
30405 return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
30406 };
30407 return DistinctOperator;
30408}());
30409var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
30410 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctSubscriber, _super);
30411 function DistinctSubscriber(destination, keySelector, flushes) {
30412 var _this = _super.call(this, destination) || this;
30413 _this.keySelector = keySelector;
30414 _this.values = new Set();
30415 if (flushes) {
30416 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, flushes));
30417 }
30418 return _this;
30419 }
30420 DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30421 this.values.clear();
30422 };
30423 DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
30424 this._error(error);
30425 };
30426 DistinctSubscriber.prototype._next = function (value) {
30427 if (this.keySelector) {
30428 this._useKeySelector(value);
30429 }
30430 else {
30431 this._finalizeNext(value, value);
30432 }
30433 };
30434 DistinctSubscriber.prototype._useKeySelector = function (value) {
30435 var key;
30436 var destination = this.destination;
30437 try {
30438 key = this.keySelector(value);
30439 }
30440 catch (err) {
30441 destination.error(err);
30442 return;
30443 }
30444 this._finalizeNext(key, value);
30445 };
30446 DistinctSubscriber.prototype._finalizeNext = function (key, value) {
30447 var values = this.values;
30448 if (!values.has(key)) {
30449 values.add(key);
30450 this.destination.next(value);
30451 }
30452 };
30453 return DistinctSubscriber;
30454}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30455
30456//# sourceMappingURL=distinct.js.map
30457
30458
30459/***/ }),
30460/* 292 */
30461/***/ (function(module, __webpack_exports__, __webpack_require__) {
30462
30463"use strict";
30464__webpack_require__.r(__webpack_exports__);
30465/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
30466/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30467/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30468/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30469
30470
30471function distinctUntilChanged(compare, keySelector) {
30472 return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
30473}
30474var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
30475 function DistinctUntilChangedOperator(compare, keySelector) {
30476 this.compare = compare;
30477 this.keySelector = keySelector;
30478 }
30479 DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
30480 return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
30481 };
30482 return DistinctUntilChangedOperator;
30483}());
30484var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
30485 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctUntilChangedSubscriber, _super);
30486 function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
30487 var _this = _super.call(this, destination) || this;
30488 _this.keySelector = keySelector;
30489 _this.hasKey = false;
30490 if (typeof compare === 'function') {
30491 _this.compare = compare;
30492 }
30493 return _this;
30494 }
30495 DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
30496 return x === y;
30497 };
30498 DistinctUntilChangedSubscriber.prototype._next = function (value) {
30499 var key;
30500 try {
30501 var keySelector = this.keySelector;
30502 key = keySelector ? keySelector(value) : value;
30503 }
30504 catch (err) {
30505 return this.destination.error(err);
30506 }
30507 var result = false;
30508 if (this.hasKey) {
30509 try {
30510 var compare = this.compare;
30511 result = compare(this.key, key);
30512 }
30513 catch (err) {
30514 return this.destination.error(err);
30515 }
30516 }
30517 else {
30518 this.hasKey = true;
30519 }
30520 if (!result) {
30521 this.key = key;
30522 this.destination.next(value);
30523 }
30524 };
30525 return DistinctUntilChangedSubscriber;
30526}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30527//# sourceMappingURL=distinctUntilChanged.js.map
30528
30529
30530/***/ }),
30531/* 293 */
30532/***/ (function(module, __webpack_exports__, __webpack_require__) {
30533
30534"use strict";
30535__webpack_require__.r(__webpack_exports__);
30536/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
30537/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(292);
30538/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
30539
30540function distinctUntilKeyChanged(key, compare) {
30541 return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
30542}
30543//# sourceMappingURL=distinctUntilKeyChanged.js.map
30544
30545
30546/***/ }),
30547/* 294 */
30548/***/ (function(module, __webpack_exports__, __webpack_require__) {
30549
30550"use strict";
30551__webpack_require__.r(__webpack_exports__);
30552/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
30553/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(220);
30554/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
30555/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(295);
30556/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(286);
30557/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(296);
30558/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
30559
30560
30561
30562
30563
30564function elementAt(index, defaultValue) {
30565 if (index < 0) {
30566 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
30567 }
30568 var hasDefaultValue = arguments.length >= 2;
30569 return function (source) {
30570 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
30571 ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
30572 : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
30573 };
30574}
30575//# sourceMappingURL=elementAt.js.map
30576
30577
30578/***/ }),
30579/* 295 */
30580/***/ (function(module, __webpack_exports__, __webpack_require__) {
30581
30582"use strict";
30583__webpack_require__.r(__webpack_exports__);
30584/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
30585/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30586/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(221);
30587/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
30588/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */
30589
30590
30591
30592function throwIfEmpty(errorFactory) {
30593 if (errorFactory === void 0) {
30594 errorFactory = defaultErrorFactory;
30595 }
30596 return function (source) {
30597 return source.lift(new ThrowIfEmptyOperator(errorFactory));
30598 };
30599}
30600var ThrowIfEmptyOperator = /*@__PURE__*/ (function () {
30601 function ThrowIfEmptyOperator(errorFactory) {
30602 this.errorFactory = errorFactory;
30603 }
30604 ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {
30605 return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
30606 };
30607 return ThrowIfEmptyOperator;
30608}());
30609var ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
30610 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrowIfEmptySubscriber, _super);
30611 function ThrowIfEmptySubscriber(destination, errorFactory) {
30612 var _this = _super.call(this, destination) || this;
30613 _this.errorFactory = errorFactory;
30614 _this.hasValue = false;
30615 return _this;
30616 }
30617 ThrowIfEmptySubscriber.prototype._next = function (value) {
30618 this.hasValue = true;
30619 this.destination.next(value);
30620 };
30621 ThrowIfEmptySubscriber.prototype._complete = function () {
30622 if (!this.hasValue) {
30623 var err = void 0;
30624 try {
30625 err = this.errorFactory();
30626 }
30627 catch (e) {
30628 err = e;
30629 }
30630 this.destination.error(err);
30631 }
30632 else {
30633 return this.destination.complete();
30634 }
30635 };
30636 return ThrowIfEmptySubscriber;
30637}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
30638function defaultErrorFactory() {
30639 return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
30640}
30641//# sourceMappingURL=throwIfEmpty.js.map
30642
30643
30644/***/ }),
30645/* 296 */
30646/***/ (function(module, __webpack_exports__, __webpack_require__) {
30647
30648"use strict";
30649__webpack_require__.r(__webpack_exports__);
30650/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; });
30651/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30652/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30653/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
30654/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
30655/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
30656
30657
30658
30659
30660function take(count) {
30661 return function (source) {
30662 if (count === 0) {
30663 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
30664 }
30665 else {
30666 return source.lift(new TakeOperator(count));
30667 }
30668 };
30669}
30670var TakeOperator = /*@__PURE__*/ (function () {
30671 function TakeOperator(total) {
30672 this.total = total;
30673 if (this.total < 0) {
30674 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
30675 }
30676 }
30677 TakeOperator.prototype.call = function (subscriber, source) {
30678 return source.subscribe(new TakeSubscriber(subscriber, this.total));
30679 };
30680 return TakeOperator;
30681}());
30682var TakeSubscriber = /*@__PURE__*/ (function (_super) {
30683 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeSubscriber, _super);
30684 function TakeSubscriber(destination, total) {
30685 var _this = _super.call(this, destination) || this;
30686 _this.total = total;
30687 _this.count = 0;
30688 return _this;
30689 }
30690 TakeSubscriber.prototype._next = function (value) {
30691 var total = this.total;
30692 var count = ++this.count;
30693 if (count <= total) {
30694 this.destination.next(value);
30695 if (count === total) {
30696 this.destination.complete();
30697 this.unsubscribe();
30698 }
30699 }
30700 };
30701 return TakeSubscriber;
30702}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30703//# sourceMappingURL=take.js.map
30704
30705
30706/***/ }),
30707/* 297 */
30708/***/ (function(module, __webpack_exports__, __webpack_require__) {
30709
30710"use strict";
30711__webpack_require__.r(__webpack_exports__);
30712/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; });
30713/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
30714/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
30715/** PURE_IMPORTS_START _observable_concat,_observable_of PURE_IMPORTS_END */
30716
30717
30718function endWith() {
30719 var array = [];
30720 for (var _i = 0; _i < arguments.length; _i++) {
30721 array[_i] = arguments[_i];
30722 }
30723 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, _observable_of__WEBPACK_IMPORTED_MODULE_1__["of"].apply(void 0, array)); };
30724}
30725//# sourceMappingURL=endWith.js.map
30726
30727
30728/***/ }),
30729/* 298 */
30730/***/ (function(module, __webpack_exports__, __webpack_require__) {
30731
30732"use strict";
30733__webpack_require__.r(__webpack_exports__);
30734/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; });
30735/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30736/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30737/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30738
30739
30740function every(predicate, thisArg) {
30741 return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
30742}
30743var EveryOperator = /*@__PURE__*/ (function () {
30744 function EveryOperator(predicate, thisArg, source) {
30745 this.predicate = predicate;
30746 this.thisArg = thisArg;
30747 this.source = source;
30748 }
30749 EveryOperator.prototype.call = function (observer, source) {
30750 return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
30751 };
30752 return EveryOperator;
30753}());
30754var EverySubscriber = /*@__PURE__*/ (function (_super) {
30755 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EverySubscriber, _super);
30756 function EverySubscriber(destination, predicate, thisArg, source) {
30757 var _this = _super.call(this, destination) || this;
30758 _this.predicate = predicate;
30759 _this.thisArg = thisArg;
30760 _this.source = source;
30761 _this.index = 0;
30762 _this.thisArg = thisArg || _this;
30763 return _this;
30764 }
30765 EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
30766 this.destination.next(everyValueMatch);
30767 this.destination.complete();
30768 };
30769 EverySubscriber.prototype._next = function (value) {
30770 var result = false;
30771 try {
30772 result = this.predicate.call(this.thisArg, value, this.index++, this.source);
30773 }
30774 catch (err) {
30775 this.destination.error(err);
30776 return;
30777 }
30778 if (!result) {
30779 this.notifyComplete(false);
30780 }
30781 };
30782 EverySubscriber.prototype._complete = function () {
30783 this.notifyComplete(true);
30784 };
30785 return EverySubscriber;
30786}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30787//# sourceMappingURL=every.js.map
30788
30789
30790/***/ }),
30791/* 299 */
30792/***/ (function(module, __webpack_exports__, __webpack_require__) {
30793
30794"use strict";
30795__webpack_require__.r(__webpack_exports__);
30796/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
30797/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30798/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30799/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
30800/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30801
30802
30803
30804function exhaust() {
30805 return function (source) { return source.lift(new SwitchFirstOperator()); };
30806}
30807var SwitchFirstOperator = /*@__PURE__*/ (function () {
30808 function SwitchFirstOperator() {
30809 }
30810 SwitchFirstOperator.prototype.call = function (subscriber, source) {
30811 return source.subscribe(new SwitchFirstSubscriber(subscriber));
30812 };
30813 return SwitchFirstOperator;
30814}());
30815var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
30816 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchFirstSubscriber, _super);
30817 function SwitchFirstSubscriber(destination) {
30818 var _this = _super.call(this, destination) || this;
30819 _this.hasCompleted = false;
30820 _this.hasSubscription = false;
30821 return _this;
30822 }
30823 SwitchFirstSubscriber.prototype._next = function (value) {
30824 if (!this.hasSubscription) {
30825 this.hasSubscription = true;
30826 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, value));
30827 }
30828 };
30829 SwitchFirstSubscriber.prototype._complete = function () {
30830 this.hasCompleted = true;
30831 if (!this.hasSubscription) {
30832 this.destination.complete();
30833 }
30834 };
30835 SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
30836 this.remove(innerSub);
30837 this.hasSubscription = false;
30838 if (this.hasCompleted) {
30839 this.destination.complete();
30840 }
30841 };
30842 return SwitchFirstSubscriber;
30843}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30844//# sourceMappingURL=exhaust.js.map
30845
30846
30847/***/ }),
30848/* 300 */
30849/***/ (function(module, __webpack_exports__, __webpack_require__) {
30850
30851"use strict";
30852__webpack_require__.r(__webpack_exports__);
30853/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
30854/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30855/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30856/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
30857/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
30858/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
30859/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
30860/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
30861
30862
30863
30864
30865
30866
30867function exhaustMap(project, resultSelector) {
30868 if (resultSelector) {
30869 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); })); })); };
30870 }
30871 return function (source) {
30872 return source.lift(new ExhaustMapOperator(project));
30873 };
30874}
30875var ExhaustMapOperator = /*@__PURE__*/ (function () {
30876 function ExhaustMapOperator(project) {
30877 this.project = project;
30878 }
30879 ExhaustMapOperator.prototype.call = function (subscriber, source) {
30880 return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
30881 };
30882 return ExhaustMapOperator;
30883}());
30884var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
30885 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExhaustMapSubscriber, _super);
30886 function ExhaustMapSubscriber(destination, project) {
30887 var _this = _super.call(this, destination) || this;
30888 _this.project = project;
30889 _this.hasSubscription = false;
30890 _this.hasCompleted = false;
30891 _this.index = 0;
30892 return _this;
30893 }
30894 ExhaustMapSubscriber.prototype._next = function (value) {
30895 if (!this.hasSubscription) {
30896 this.tryNext(value);
30897 }
30898 };
30899 ExhaustMapSubscriber.prototype.tryNext = function (value) {
30900 var result;
30901 var index = this.index++;
30902 try {
30903 result = this.project(value, index);
30904 }
30905 catch (err) {
30906 this.destination.error(err);
30907 return;
30908 }
30909 this.hasSubscription = true;
30910 this._innerSub(result, value, index);
30911 };
30912 ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) {
30913 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, value, index);
30914 var destination = this.destination;
30915 destination.add(innerSubscriber);
30916 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
30917 if (innerSubscription !== innerSubscriber) {
30918 destination.add(innerSubscription);
30919 }
30920 };
30921 ExhaustMapSubscriber.prototype._complete = function () {
30922 this.hasCompleted = true;
30923 if (!this.hasSubscription) {
30924 this.destination.complete();
30925 }
30926 this.unsubscribe();
30927 };
30928 ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30929 this.destination.next(innerValue);
30930 };
30931 ExhaustMapSubscriber.prototype.notifyError = function (err) {
30932 this.destination.error(err);
30933 };
30934 ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
30935 var destination = this.destination;
30936 destination.remove(innerSub);
30937 this.hasSubscription = false;
30938 if (this.hasCompleted) {
30939 this.destination.complete();
30940 }
30941 };
30942 return ExhaustMapSubscriber;
30943}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30944//# sourceMappingURL=exhaustMap.js.map
30945
30946
30947/***/ }),
30948/* 301 */
30949/***/ (function(module, __webpack_exports__, __webpack_require__) {
30950
30951"use strict";
30952__webpack_require__.r(__webpack_exports__);
30953/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
30954/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; });
30955/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; });
30956/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30957/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30958/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
30959/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30960
30961
30962
30963function expand(project, concurrent, scheduler) {
30964 if (concurrent === void 0) {
30965 concurrent = Number.POSITIVE_INFINITY;
30966 }
30967 if (scheduler === void 0) {
30968 scheduler = undefined;
30969 }
30970 concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
30971 return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
30972}
30973var ExpandOperator = /*@__PURE__*/ (function () {
30974 function ExpandOperator(project, concurrent, scheduler) {
30975 this.project = project;
30976 this.concurrent = concurrent;
30977 this.scheduler = scheduler;
30978 }
30979 ExpandOperator.prototype.call = function (subscriber, source) {
30980 return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
30981 };
30982 return ExpandOperator;
30983}());
30984
30985var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
30986 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExpandSubscriber, _super);
30987 function ExpandSubscriber(destination, project, concurrent, scheduler) {
30988 var _this = _super.call(this, destination) || this;
30989 _this.project = project;
30990 _this.concurrent = concurrent;
30991 _this.scheduler = scheduler;
30992 _this.index = 0;
30993 _this.active = 0;
30994 _this.hasCompleted = false;
30995 if (concurrent < Number.POSITIVE_INFINITY) {
30996 _this.buffer = [];
30997 }
30998 return _this;
30999 }
31000 ExpandSubscriber.dispatch = function (arg) {
31001 var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
31002 subscriber.subscribeToProjection(result, value, index);
31003 };
31004 ExpandSubscriber.prototype._next = function (value) {
31005 var destination = this.destination;
31006 if (destination.closed) {
31007 this._complete();
31008 return;
31009 }
31010 var index = this.index++;
31011 if (this.active < this.concurrent) {
31012 destination.next(value);
31013 try {
31014 var project = this.project;
31015 var result = project(value, index);
31016 if (!this.scheduler) {
31017 this.subscribeToProjection(result, value, index);
31018 }
31019 else {
31020 var state = { subscriber: this, result: result, value: value, index: index };
31021 var destination_1 = this.destination;
31022 destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
31023 }
31024 }
31025 catch (e) {
31026 destination.error(e);
31027 }
31028 }
31029 else {
31030 this.buffer.push(value);
31031 }
31032 };
31033 ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
31034 this.active++;
31035 var destination = this.destination;
31036 destination.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index));
31037 };
31038 ExpandSubscriber.prototype._complete = function () {
31039 this.hasCompleted = true;
31040 if (this.hasCompleted && this.active === 0) {
31041 this.destination.complete();
31042 }
31043 this.unsubscribe();
31044 };
31045 ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31046 this._next(innerValue);
31047 };
31048 ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
31049 var buffer = this.buffer;
31050 var destination = this.destination;
31051 destination.remove(innerSub);
31052 this.active--;
31053 if (buffer && buffer.length > 0) {
31054 this._next(buffer.shift());
31055 }
31056 if (this.hasCompleted && this.active === 0) {
31057 this.destination.complete();
31058 }
31059 };
31060 return ExpandSubscriber;
31061}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
31062
31063//# sourceMappingURL=expand.js.map
31064
31065
31066/***/ }),
31067/* 302 */
31068/***/ (function(module, __webpack_exports__, __webpack_require__) {
31069
31070"use strict";
31071__webpack_require__.r(__webpack_exports__);
31072/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
31073/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31074/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31075/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
31076/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
31077
31078
31079
31080function finalize(callback) {
31081 return function (source) { return source.lift(new FinallyOperator(callback)); };
31082}
31083var FinallyOperator = /*@__PURE__*/ (function () {
31084 function FinallyOperator(callback) {
31085 this.callback = callback;
31086 }
31087 FinallyOperator.prototype.call = function (subscriber, source) {
31088 return source.subscribe(new FinallySubscriber(subscriber, this.callback));
31089 };
31090 return FinallyOperator;
31091}());
31092var FinallySubscriber = /*@__PURE__*/ (function (_super) {
31093 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FinallySubscriber, _super);
31094 function FinallySubscriber(destination, callback) {
31095 var _this = _super.call(this, destination) || this;
31096 _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"](callback));
31097 return _this;
31098 }
31099 return FinallySubscriber;
31100}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31101//# sourceMappingURL=finalize.js.map
31102
31103
31104/***/ }),
31105/* 303 */
31106/***/ (function(module, __webpack_exports__, __webpack_require__) {
31107
31108"use strict";
31109__webpack_require__.r(__webpack_exports__);
31110/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
31111/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; });
31112/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; });
31113/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31114/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31115/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31116
31117
31118function find(predicate, thisArg) {
31119 if (typeof predicate !== 'function') {
31120 throw new TypeError('predicate is not a function');
31121 }
31122 return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
31123}
31124var FindValueOperator = /*@__PURE__*/ (function () {
31125 function FindValueOperator(predicate, source, yieldIndex, thisArg) {
31126 this.predicate = predicate;
31127 this.source = source;
31128 this.yieldIndex = yieldIndex;
31129 this.thisArg = thisArg;
31130 }
31131 FindValueOperator.prototype.call = function (observer, source) {
31132 return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
31133 };
31134 return FindValueOperator;
31135}());
31136
31137var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
31138 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FindValueSubscriber, _super);
31139 function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
31140 var _this = _super.call(this, destination) || this;
31141 _this.predicate = predicate;
31142 _this.source = source;
31143 _this.yieldIndex = yieldIndex;
31144 _this.thisArg = thisArg;
31145 _this.index = 0;
31146 return _this;
31147 }
31148 FindValueSubscriber.prototype.notifyComplete = function (value) {
31149 var destination = this.destination;
31150 destination.next(value);
31151 destination.complete();
31152 this.unsubscribe();
31153 };
31154 FindValueSubscriber.prototype._next = function (value) {
31155 var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
31156 var index = this.index++;
31157 try {
31158 var result = predicate.call(thisArg || this, value, index, this.source);
31159 if (result) {
31160 this.notifyComplete(this.yieldIndex ? index : value);
31161 }
31162 }
31163 catch (err) {
31164 this.destination.error(err);
31165 }
31166 };
31167 FindValueSubscriber.prototype._complete = function () {
31168 this.notifyComplete(this.yieldIndex ? -1 : undefined);
31169 };
31170 return FindValueSubscriber;
31171}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31172
31173//# sourceMappingURL=find.js.map
31174
31175
31176/***/ }),
31177/* 304 */
31178/***/ (function(module, __webpack_exports__, __webpack_require__) {
31179
31180"use strict";
31181__webpack_require__.r(__webpack_exports__);
31182/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
31183/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(303);
31184/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
31185
31186function findIndex(predicate, thisArg) {
31187 return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); };
31188}
31189//# sourceMappingURL=findIndex.js.map
31190
31191
31192/***/ }),
31193/* 305 */
31194/***/ (function(module, __webpack_exports__, __webpack_require__) {
31195
31196"use strict";
31197__webpack_require__.r(__webpack_exports__);
31198/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; });
31199/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
31200/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
31201/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(296);
31202/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(286);
31203/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(295);
31204/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(183);
31205/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
31206
31207
31208
31209
31210
31211
31212function first(predicate, defaultValue) {
31213 var hasDefaultValue = arguments.length >= 2;
31214 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"](); })); };
31215}
31216//# sourceMappingURL=first.js.map
31217
31218
31219/***/ }),
31220/* 306 */
31221/***/ (function(module, __webpack_exports__, __webpack_require__) {
31222
31223"use strict";
31224__webpack_require__.r(__webpack_exports__);
31225/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
31226/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31227/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31228/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31229
31230
31231function ignoreElements() {
31232 return function ignoreElementsOperatorFunction(source) {
31233 return source.lift(new IgnoreElementsOperator());
31234 };
31235}
31236var IgnoreElementsOperator = /*@__PURE__*/ (function () {
31237 function IgnoreElementsOperator() {
31238 }
31239 IgnoreElementsOperator.prototype.call = function (subscriber, source) {
31240 return source.subscribe(new IgnoreElementsSubscriber(subscriber));
31241 };
31242 return IgnoreElementsOperator;
31243}());
31244var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
31245 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IgnoreElementsSubscriber, _super);
31246 function IgnoreElementsSubscriber() {
31247 return _super !== null && _super.apply(this, arguments) || this;
31248 }
31249 IgnoreElementsSubscriber.prototype._next = function (unused) {
31250 };
31251 return IgnoreElementsSubscriber;
31252}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31253//# sourceMappingURL=ignoreElements.js.map
31254
31255
31256/***/ }),
31257/* 307 */
31258/***/ (function(module, __webpack_exports__, __webpack_require__) {
31259
31260"use strict";
31261__webpack_require__.r(__webpack_exports__);
31262/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
31263/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31264/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31265/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31266
31267
31268function isEmpty() {
31269 return function (source) { return source.lift(new IsEmptyOperator()); };
31270}
31271var IsEmptyOperator = /*@__PURE__*/ (function () {
31272 function IsEmptyOperator() {
31273 }
31274 IsEmptyOperator.prototype.call = function (observer, source) {
31275 return source.subscribe(new IsEmptySubscriber(observer));
31276 };
31277 return IsEmptyOperator;
31278}());
31279var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
31280 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IsEmptySubscriber, _super);
31281 function IsEmptySubscriber(destination) {
31282 return _super.call(this, destination) || this;
31283 }
31284 IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
31285 var destination = this.destination;
31286 destination.next(isEmpty);
31287 destination.complete();
31288 };
31289 IsEmptySubscriber.prototype._next = function (value) {
31290 this.notifyComplete(false);
31291 };
31292 IsEmptySubscriber.prototype._complete = function () {
31293 this.notifyComplete(true);
31294 };
31295 return IsEmptySubscriber;
31296}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31297//# sourceMappingURL=isEmpty.js.map
31298
31299
31300/***/ }),
31301/* 308 */
31302/***/ (function(module, __webpack_exports__, __webpack_require__) {
31303
31304"use strict";
31305__webpack_require__.r(__webpack_exports__);
31306/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
31307/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
31308/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
31309/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(309);
31310/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(295);
31311/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(286);
31312/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(183);
31313/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
31314
31315
31316
31317
31318
31319
31320function last(predicate, defaultValue) {
31321 var hasDefaultValue = arguments.length >= 2;
31322 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"](); })); };
31323}
31324//# sourceMappingURL=last.js.map
31325
31326
31327/***/ }),
31328/* 309 */
31329/***/ (function(module, __webpack_exports__, __webpack_require__) {
31330
31331"use strict";
31332__webpack_require__.r(__webpack_exports__);
31333/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
31334/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31335/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31336/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
31337/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
31338/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
31339
31340
31341
31342
31343function takeLast(count) {
31344 return function takeLastOperatorFunction(source) {
31345 if (count === 0) {
31346 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
31347 }
31348 else {
31349 return source.lift(new TakeLastOperator(count));
31350 }
31351 };
31352}
31353var TakeLastOperator = /*@__PURE__*/ (function () {
31354 function TakeLastOperator(total) {
31355 this.total = total;
31356 if (this.total < 0) {
31357 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
31358 }
31359 }
31360 TakeLastOperator.prototype.call = function (subscriber, source) {
31361 return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
31362 };
31363 return TakeLastOperator;
31364}());
31365var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
31366 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeLastSubscriber, _super);
31367 function TakeLastSubscriber(destination, total) {
31368 var _this = _super.call(this, destination) || this;
31369 _this.total = total;
31370 _this.ring = new Array();
31371 _this.count = 0;
31372 return _this;
31373 }
31374 TakeLastSubscriber.prototype._next = function (value) {
31375 var ring = this.ring;
31376 var total = this.total;
31377 var count = this.count++;
31378 if (ring.length < total) {
31379 ring.push(value);
31380 }
31381 else {
31382 var index = count % total;
31383 ring[index] = value;
31384 }
31385 };
31386 TakeLastSubscriber.prototype._complete = function () {
31387 var destination = this.destination;
31388 var count = this.count;
31389 if (count > 0) {
31390 var total = this.count >= this.total ? this.total : this.count;
31391 var ring = this.ring;
31392 for (var i = 0; i < total; i++) {
31393 var idx = (count++) % total;
31394 destination.next(ring[idx]);
31395 }
31396 }
31397 destination.complete();
31398 };
31399 return TakeLastSubscriber;
31400}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31401//# sourceMappingURL=takeLast.js.map
31402
31403
31404/***/ }),
31405/* 310 */
31406/***/ (function(module, __webpack_exports__, __webpack_require__) {
31407
31408"use strict";
31409__webpack_require__.r(__webpack_exports__);
31410/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
31411/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31412/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31413/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31414
31415
31416function mapTo(value) {
31417 return function (source) { return source.lift(new MapToOperator(value)); };
31418}
31419var MapToOperator = /*@__PURE__*/ (function () {
31420 function MapToOperator(value) {
31421 this.value = value;
31422 }
31423 MapToOperator.prototype.call = function (subscriber, source) {
31424 return source.subscribe(new MapToSubscriber(subscriber, this.value));
31425 };
31426 return MapToOperator;
31427}());
31428var MapToSubscriber = /*@__PURE__*/ (function (_super) {
31429 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapToSubscriber, _super);
31430 function MapToSubscriber(destination, value) {
31431 var _this = _super.call(this, destination) || this;
31432 _this.value = value;
31433 return _this;
31434 }
31435 MapToSubscriber.prototype._next = function (x) {
31436 this.destination.next(this.value);
31437 };
31438 return MapToSubscriber;
31439}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31440//# sourceMappingURL=mapTo.js.map
31441
31442
31443/***/ }),
31444/* 311 */
31445/***/ (function(module, __webpack_exports__, __webpack_require__) {
31446
31447"use strict";
31448__webpack_require__.r(__webpack_exports__);
31449/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
31450/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31451/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31452/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
31453/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
31454
31455
31456
31457function materialize() {
31458 return function materializeOperatorFunction(source) {
31459 return source.lift(new MaterializeOperator());
31460 };
31461}
31462var MaterializeOperator = /*@__PURE__*/ (function () {
31463 function MaterializeOperator() {
31464 }
31465 MaterializeOperator.prototype.call = function (subscriber, source) {
31466 return source.subscribe(new MaterializeSubscriber(subscriber));
31467 };
31468 return MaterializeOperator;
31469}());
31470var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
31471 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MaterializeSubscriber, _super);
31472 function MaterializeSubscriber(destination) {
31473 return _super.call(this, destination) || this;
31474 }
31475 MaterializeSubscriber.prototype._next = function (value) {
31476 this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
31477 };
31478 MaterializeSubscriber.prototype._error = function (err) {
31479 var destination = this.destination;
31480 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
31481 destination.complete();
31482 };
31483 MaterializeSubscriber.prototype._complete = function () {
31484 var destination = this.destination;
31485 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
31486 destination.complete();
31487 };
31488 return MaterializeSubscriber;
31489}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31490//# sourceMappingURL=materialize.js.map
31491
31492
31493/***/ }),
31494/* 312 */
31495/***/ (function(module, __webpack_exports__, __webpack_require__) {
31496
31497"use strict";
31498__webpack_require__.r(__webpack_exports__);
31499/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
31500/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(313);
31501/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
31502
31503function max(comparer) {
31504 var max = (typeof comparer === 'function')
31505 ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
31506 : function (x, y) { return x > y ? x : y; };
31507 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
31508}
31509//# sourceMappingURL=max.js.map
31510
31511
31512/***/ }),
31513/* 313 */
31514/***/ (function(module, __webpack_exports__, __webpack_require__) {
31515
31516"use strict";
31517__webpack_require__.r(__webpack_exports__);
31518/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
31519/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314);
31520/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(309);
31521/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(286);
31522/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
31523/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
31524
31525
31526
31527
31528function reduce(accumulator, seed) {
31529 if (arguments.length >= 2) {
31530 return function reduceOperatorFunctionWithSeed(source) {
31531 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);
31532 };
31533 }
31534 return function reduceOperatorFunction(source) {
31535 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);
31536 };
31537}
31538//# sourceMappingURL=reduce.js.map
31539
31540
31541/***/ }),
31542/* 314 */
31543/***/ (function(module, __webpack_exports__, __webpack_require__) {
31544
31545"use strict";
31546__webpack_require__.r(__webpack_exports__);
31547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
31548/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31549/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31550/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31551
31552
31553function scan(accumulator, seed) {
31554 var hasSeed = false;
31555 if (arguments.length >= 2) {
31556 hasSeed = true;
31557 }
31558 return function scanOperatorFunction(source) {
31559 return source.lift(new ScanOperator(accumulator, seed, hasSeed));
31560 };
31561}
31562var ScanOperator = /*@__PURE__*/ (function () {
31563 function ScanOperator(accumulator, seed, hasSeed) {
31564 if (hasSeed === void 0) {
31565 hasSeed = false;
31566 }
31567 this.accumulator = accumulator;
31568 this.seed = seed;
31569 this.hasSeed = hasSeed;
31570 }
31571 ScanOperator.prototype.call = function (subscriber, source) {
31572 return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
31573 };
31574 return ScanOperator;
31575}());
31576var ScanSubscriber = /*@__PURE__*/ (function (_super) {
31577 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ScanSubscriber, _super);
31578 function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
31579 var _this = _super.call(this, destination) || this;
31580 _this.accumulator = accumulator;
31581 _this._seed = _seed;
31582 _this.hasSeed = hasSeed;
31583 _this.index = 0;
31584 return _this;
31585 }
31586 Object.defineProperty(ScanSubscriber.prototype, "seed", {
31587 get: function () {
31588 return this._seed;
31589 },
31590 set: function (value) {
31591 this.hasSeed = true;
31592 this._seed = value;
31593 },
31594 enumerable: true,
31595 configurable: true
31596 });
31597 ScanSubscriber.prototype._next = function (value) {
31598 if (!this.hasSeed) {
31599 this.seed = value;
31600 this.destination.next(value);
31601 }
31602 else {
31603 return this._tryNext(value);
31604 }
31605 };
31606 ScanSubscriber.prototype._tryNext = function (value) {
31607 var index = this.index++;
31608 var result;
31609 try {
31610 result = this.accumulator(this.seed, value, index);
31611 }
31612 catch (err) {
31613 this.destination.error(err);
31614 }
31615 this.seed = result;
31616 this.destination.next(result);
31617 };
31618 return ScanSubscriber;
31619}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31620//# sourceMappingURL=scan.js.map
31621
31622
31623/***/ }),
31624/* 315 */
31625/***/ (function(module, __webpack_exports__, __webpack_require__) {
31626
31627"use strict";
31628__webpack_require__.r(__webpack_exports__);
31629/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
31630/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(256);
31631/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
31632
31633function merge() {
31634 var observables = [];
31635 for (var _i = 0; _i < arguments.length; _i++) {
31636 observables[_i] = arguments[_i];
31637 }
31638 return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
31639}
31640//# sourceMappingURL=merge.js.map
31641
31642
31643/***/ }),
31644/* 316 */
31645/***/ (function(module, __webpack_exports__, __webpack_require__) {
31646
31647"use strict";
31648__webpack_require__.r(__webpack_exports__);
31649/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
31650/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
31651/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
31652
31653function mergeMapTo(innerObservable, resultSelector, concurrent) {
31654 if (concurrent === void 0) {
31655 concurrent = Number.POSITIVE_INFINITY;
31656 }
31657 if (typeof resultSelector === 'function') {
31658 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, resultSelector, concurrent);
31659 }
31660 if (typeof resultSelector === 'number') {
31661 concurrent = resultSelector;
31662 }
31663 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, concurrent);
31664}
31665//# sourceMappingURL=mergeMapTo.js.map
31666
31667
31668/***/ }),
31669/* 317 */
31670/***/ (function(module, __webpack_exports__, __webpack_require__) {
31671
31672"use strict";
31673__webpack_require__.r(__webpack_exports__);
31674/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
31675/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; });
31676/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; });
31677/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31678/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
31679/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
31680/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
31681/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber PURE_IMPORTS_END */
31682
31683
31684
31685
31686function mergeScan(accumulator, seed, concurrent) {
31687 if (concurrent === void 0) {
31688 concurrent = Number.POSITIVE_INFINITY;
31689 }
31690 return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
31691}
31692var MergeScanOperator = /*@__PURE__*/ (function () {
31693 function MergeScanOperator(accumulator, seed, concurrent) {
31694 this.accumulator = accumulator;
31695 this.seed = seed;
31696 this.concurrent = concurrent;
31697 }
31698 MergeScanOperator.prototype.call = function (subscriber, source) {
31699 return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
31700 };
31701 return MergeScanOperator;
31702}());
31703
31704var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
31705 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeScanSubscriber, _super);
31706 function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
31707 var _this = _super.call(this, destination) || this;
31708 _this.accumulator = accumulator;
31709 _this.acc = acc;
31710 _this.concurrent = concurrent;
31711 _this.hasValue = false;
31712 _this.hasCompleted = false;
31713 _this.buffer = [];
31714 _this.active = 0;
31715 _this.index = 0;
31716 return _this;
31717 }
31718 MergeScanSubscriber.prototype._next = function (value) {
31719 if (this.active < this.concurrent) {
31720 var index = this.index++;
31721 var destination = this.destination;
31722 var ish = void 0;
31723 try {
31724 var accumulator = this.accumulator;
31725 ish = accumulator(this.acc, value, index);
31726 }
31727 catch (e) {
31728 return destination.error(e);
31729 }
31730 this.active++;
31731 this._innerSub(ish, value, index);
31732 }
31733 else {
31734 this.buffer.push(value);
31735 }
31736 };
31737 MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
31738 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, value, index);
31739 var destination = this.destination;
31740 destination.add(innerSubscriber);
31741 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, undefined, undefined, innerSubscriber);
31742 if (innerSubscription !== innerSubscriber) {
31743 destination.add(innerSubscription);
31744 }
31745 };
31746 MergeScanSubscriber.prototype._complete = function () {
31747 this.hasCompleted = true;
31748 if (this.active === 0 && this.buffer.length === 0) {
31749 if (this.hasValue === false) {
31750 this.destination.next(this.acc);
31751 }
31752 this.destination.complete();
31753 }
31754 this.unsubscribe();
31755 };
31756 MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31757 var destination = this.destination;
31758 this.acc = innerValue;
31759 this.hasValue = true;
31760 destination.next(innerValue);
31761 };
31762 MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
31763 var buffer = this.buffer;
31764 var destination = this.destination;
31765 destination.remove(innerSub);
31766 this.active--;
31767 if (buffer.length > 0) {
31768 this._next(buffer.shift());
31769 }
31770 else if (this.active === 0 && this.hasCompleted) {
31771 if (this.hasValue === false) {
31772 this.destination.next(this.acc);
31773 }
31774 this.destination.complete();
31775 }
31776 };
31777 return MergeScanSubscriber;
31778}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
31779
31780//# sourceMappingURL=mergeScan.js.map
31781
31782
31783/***/ }),
31784/* 318 */
31785/***/ (function(module, __webpack_exports__, __webpack_require__) {
31786
31787"use strict";
31788__webpack_require__.r(__webpack_exports__);
31789/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
31790/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(313);
31791/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
31792
31793function min(comparer) {
31794 var min = (typeof comparer === 'function')
31795 ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
31796 : function (x, y) { return x < y ? x : y; };
31797 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min);
31798}
31799//# sourceMappingURL=min.js.map
31800
31801
31802/***/ }),
31803/* 319 */
31804/***/ (function(module, __webpack_exports__, __webpack_require__) {
31805
31806"use strict";
31807__webpack_require__.r(__webpack_exports__);
31808/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
31809/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; });
31810/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(184);
31811/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
31812
31813function multicast(subjectOrSubjectFactory, selector) {
31814 return function multicastOperatorFunction(source) {
31815 var subjectFactory;
31816 if (typeof subjectOrSubjectFactory === 'function') {
31817 subjectFactory = subjectOrSubjectFactory;
31818 }
31819 else {
31820 subjectFactory = function subjectFactory() {
31821 return subjectOrSubjectFactory;
31822 };
31823 }
31824 if (typeof selector === 'function') {
31825 return source.lift(new MulticastOperator(subjectFactory, selector));
31826 }
31827 var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
31828 connectable.source = source;
31829 connectable.subjectFactory = subjectFactory;
31830 return connectable;
31831 };
31832}
31833var MulticastOperator = /*@__PURE__*/ (function () {
31834 function MulticastOperator(subjectFactory, selector) {
31835 this.subjectFactory = subjectFactory;
31836 this.selector = selector;
31837 }
31838 MulticastOperator.prototype.call = function (subscriber, source) {
31839 var selector = this.selector;
31840 var subject = this.subjectFactory();
31841 var subscription = selector(subject).subscribe(subscriber);
31842 subscription.add(source.subscribe(subject));
31843 return subscription;
31844 };
31845 return MulticastOperator;
31846}());
31847
31848//# sourceMappingURL=multicast.js.map
31849
31850
31851/***/ }),
31852/* 320 */
31853/***/ (function(module, __webpack_exports__, __webpack_require__) {
31854
31855"use strict";
31856__webpack_require__.r(__webpack_exports__);
31857/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
31858/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; });
31859/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31860/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
31861/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
31862/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
31863/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(229);
31864/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(228);
31865/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31866
31867
31868
31869
31870
31871
31872function onErrorResumeNext() {
31873 var nextSources = [];
31874 for (var _i = 0; _i < arguments.length; _i++) {
31875 nextSources[_i] = arguments[_i];
31876 }
31877 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
31878 nextSources = nextSources[0];
31879 }
31880 return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
31881}
31882function onErrorResumeNextStatic() {
31883 var nextSources = [];
31884 for (var _i = 0; _i < arguments.length; _i++) {
31885 nextSources[_i] = arguments[_i];
31886 }
31887 var source = null;
31888 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
31889 nextSources = nextSources[0];
31890 }
31891 source = nextSources.shift();
31892 return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
31893}
31894var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
31895 function OnErrorResumeNextOperator(nextSources) {
31896 this.nextSources = nextSources;
31897 }
31898 OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
31899 return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
31900 };
31901 return OnErrorResumeNextOperator;
31902}());
31903var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
31904 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OnErrorResumeNextSubscriber, _super);
31905 function OnErrorResumeNextSubscriber(destination, nextSources) {
31906 var _this = _super.call(this, destination) || this;
31907 _this.destination = destination;
31908 _this.nextSources = nextSources;
31909 return _this;
31910 }
31911 OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
31912 this.subscribeToNextSource();
31913 };
31914 OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
31915 this.subscribeToNextSource();
31916 };
31917 OnErrorResumeNextSubscriber.prototype._error = function (err) {
31918 this.subscribeToNextSource();
31919 this.unsubscribe();
31920 };
31921 OnErrorResumeNextSubscriber.prototype._complete = function () {
31922 this.subscribeToNextSource();
31923 this.unsubscribe();
31924 };
31925 OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
31926 var next = this.nextSources.shift();
31927 if (!!next) {
31928 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__["InnerSubscriber"](this, undefined, undefined);
31929 var destination = this.destination;
31930 destination.add(innerSubscriber);
31931 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, next, undefined, undefined, innerSubscriber);
31932 if (innerSubscription !== innerSubscriber) {
31933 destination.add(innerSubscription);
31934 }
31935 }
31936 else {
31937 this.destination.complete();
31938 }
31939 };
31940 return OnErrorResumeNextSubscriber;
31941}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
31942//# sourceMappingURL=onErrorResumeNext.js.map
31943
31944
31945/***/ }),
31946/* 321 */
31947/***/ (function(module, __webpack_exports__, __webpack_require__) {
31948
31949"use strict";
31950__webpack_require__.r(__webpack_exports__);
31951/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
31952/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31953/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31954/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31955
31956
31957function pairwise() {
31958 return function (source) { return source.lift(new PairwiseOperator()); };
31959}
31960var PairwiseOperator = /*@__PURE__*/ (function () {
31961 function PairwiseOperator() {
31962 }
31963 PairwiseOperator.prototype.call = function (subscriber, source) {
31964 return source.subscribe(new PairwiseSubscriber(subscriber));
31965 };
31966 return PairwiseOperator;
31967}());
31968var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
31969 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](PairwiseSubscriber, _super);
31970 function PairwiseSubscriber(destination) {
31971 var _this = _super.call(this, destination) || this;
31972 _this.hasPrev = false;
31973 return _this;
31974 }
31975 PairwiseSubscriber.prototype._next = function (value) {
31976 var pair;
31977 if (this.hasPrev) {
31978 pair = [this.prev, value];
31979 }
31980 else {
31981 this.hasPrev = true;
31982 }
31983 this.prev = value;
31984 if (pair) {
31985 this.destination.next(pair);
31986 }
31987 };
31988 return PairwiseSubscriber;
31989}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31990//# sourceMappingURL=pairwise.js.map
31991
31992
31993/***/ }),
31994/* 322 */
31995/***/ (function(module, __webpack_exports__, __webpack_require__) {
31996
31997"use strict";
31998__webpack_require__.r(__webpack_exports__);
31999/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
32000/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(261);
32001/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
32002/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
32003
32004
32005function partition(predicate, thisArg) {
32006 return function (source) {
32007 return [
32008 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source),
32009 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source)
32010 ];
32011 };
32012}
32013//# sourceMappingURL=partition.js.map
32014
32015
32016/***/ }),
32017/* 323 */
32018/***/ (function(module, __webpack_exports__, __webpack_require__) {
32019
32020"use strict";
32021__webpack_require__.r(__webpack_exports__);
32022/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
32023/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(224);
32024/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
32025
32026function pluck() {
32027 var properties = [];
32028 for (var _i = 0; _i < arguments.length; _i++) {
32029 properties[_i] = arguments[_i];
32030 }
32031 var length = properties.length;
32032 if (length === 0) {
32033 throw new Error('list of properties cannot be empty.');
32034 }
32035 return function (source) { return Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); };
32036}
32037function plucker(props, length) {
32038 var mapper = function (x) {
32039 var currentProp = x;
32040 for (var i = 0; i < length; i++) {
32041 var p = currentProp[props[i]];
32042 if (typeof p !== 'undefined') {
32043 currentProp = p;
32044 }
32045 else {
32046 return undefined;
32047 }
32048 }
32049 return currentProp;
32050 };
32051 return mapper;
32052}
32053//# sourceMappingURL=pluck.js.map
32054
32055
32056/***/ }),
32057/* 324 */
32058/***/ (function(module, __webpack_exports__, __webpack_require__) {
32059
32060"use strict";
32061__webpack_require__.r(__webpack_exports__);
32062/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
32063/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(185);
32064/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
32065/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
32066
32067
32068function publish(selector) {
32069 return selector ?
32070 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); }, selector) :
32071 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]());
32072}
32073//# sourceMappingURL=publish.js.map
32074
32075
32076/***/ }),
32077/* 325 */
32078/***/ (function(module, __webpack_exports__, __webpack_require__) {
32079
32080"use strict";
32081__webpack_require__.r(__webpack_exports__);
32082/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
32083/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
32084/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
32085/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
32086
32087
32088function publishBehavior(value) {
32089 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); };
32090}
32091//# sourceMappingURL=publishBehavior.js.map
32092
32093
32094/***/ }),
32095/* 326 */
32096/***/ (function(module, __webpack_exports__, __webpack_require__) {
32097
32098"use strict";
32099__webpack_require__.r(__webpack_exports__);
32100/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
32101/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(208);
32102/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
32103/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
32104
32105
32106function publishLast() {
32107 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); };
32108}
32109//# sourceMappingURL=publishLast.js.map
32110
32111
32112/***/ }),
32113/* 327 */
32114/***/ (function(module, __webpack_exports__, __webpack_require__) {
32115
32116"use strict";
32117__webpack_require__.r(__webpack_exports__);
32118/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
32119/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(191);
32120/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
32121/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
32122
32123
32124function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
32125 if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
32126 scheduler = selectorOrScheduler;
32127 }
32128 var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
32129 var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
32130 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return subject; }, selector)(source); };
32131}
32132//# sourceMappingURL=publishReplay.js.map
32133
32134
32135/***/ }),
32136/* 328 */
32137/***/ (function(module, __webpack_exports__, __webpack_require__) {
32138
32139"use strict";
32140__webpack_require__.r(__webpack_exports__);
32141/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
32142/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
32143/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(263);
32144/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
32145
32146
32147function race() {
32148 var observables = [];
32149 for (var _i = 0; _i < arguments.length; _i++) {
32150 observables[_i] = arguments[_i];
32151 }
32152 return function raceOperatorFunction(source) {
32153 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
32154 observables = observables[0];
32155 }
32156 return source.lift.call(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"].apply(void 0, [source].concat(observables)));
32157 };
32158}
32159//# sourceMappingURL=race.js.map
32160
32161
32162/***/ }),
32163/* 329 */
32164/***/ (function(module, __webpack_exports__, __webpack_require__) {
32165
32166"use strict";
32167__webpack_require__.r(__webpack_exports__);
32168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
32169/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32170/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32171/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
32172/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
32173
32174
32175
32176function repeat(count) {
32177 if (count === void 0) {
32178 count = -1;
32179 }
32180 return function (source) {
32181 if (count === 0) {
32182 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
32183 }
32184 else if (count < 0) {
32185 return source.lift(new RepeatOperator(-1, source));
32186 }
32187 else {
32188 return source.lift(new RepeatOperator(count - 1, source));
32189 }
32190 };
32191}
32192var RepeatOperator = /*@__PURE__*/ (function () {
32193 function RepeatOperator(count, source) {
32194 this.count = count;
32195 this.source = source;
32196 }
32197 RepeatOperator.prototype.call = function (subscriber, source) {
32198 return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
32199 };
32200 return RepeatOperator;
32201}());
32202var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
32203 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatSubscriber, _super);
32204 function RepeatSubscriber(destination, count, source) {
32205 var _this = _super.call(this, destination) || this;
32206 _this.count = count;
32207 _this.source = source;
32208 return _this;
32209 }
32210 RepeatSubscriber.prototype.complete = function () {
32211 if (!this.isStopped) {
32212 var _a = this, source = _a.source, count = _a.count;
32213 if (count === 0) {
32214 return _super.prototype.complete.call(this);
32215 }
32216 else if (count > -1) {
32217 this.count = count - 1;
32218 }
32219 source.subscribe(this._unsubscribeAndRecycle());
32220 }
32221 };
32222 return RepeatSubscriber;
32223}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32224//# sourceMappingURL=repeat.js.map
32225
32226
32227/***/ }),
32228/* 330 */
32229/***/ (function(module, __webpack_exports__, __webpack_require__) {
32230
32231"use strict";
32232__webpack_require__.r(__webpack_exports__);
32233/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
32234/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32235/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
32236/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
32237/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
32238/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32239
32240
32241
32242
32243function repeatWhen(notifier) {
32244 return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
32245}
32246var RepeatWhenOperator = /*@__PURE__*/ (function () {
32247 function RepeatWhenOperator(notifier) {
32248 this.notifier = notifier;
32249 }
32250 RepeatWhenOperator.prototype.call = function (subscriber, source) {
32251 return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
32252 };
32253 return RepeatWhenOperator;
32254}());
32255var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
32256 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatWhenSubscriber, _super);
32257 function RepeatWhenSubscriber(destination, notifier, source) {
32258 var _this = _super.call(this, destination) || this;
32259 _this.notifier = notifier;
32260 _this.source = source;
32261 _this.sourceIsBeingSubscribedTo = true;
32262 return _this;
32263 }
32264 RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32265 this.sourceIsBeingSubscribedTo = true;
32266 this.source.subscribe(this);
32267 };
32268 RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
32269 if (this.sourceIsBeingSubscribedTo === false) {
32270 return _super.prototype.complete.call(this);
32271 }
32272 };
32273 RepeatWhenSubscriber.prototype.complete = function () {
32274 this.sourceIsBeingSubscribedTo = false;
32275 if (!this.isStopped) {
32276 if (!this.retries) {
32277 this.subscribeToRetries();
32278 }
32279 if (!this.retriesSubscription || this.retriesSubscription.closed) {
32280 return _super.prototype.complete.call(this);
32281 }
32282 this._unsubscribeAndRecycle();
32283 this.notifications.next();
32284 }
32285 };
32286 RepeatWhenSubscriber.prototype._unsubscribe = function () {
32287 var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
32288 if (notifications) {
32289 notifications.unsubscribe();
32290 this.notifications = null;
32291 }
32292 if (retriesSubscription) {
32293 retriesSubscription.unsubscribe();
32294 this.retriesSubscription = null;
32295 }
32296 this.retries = null;
32297 };
32298 RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
32299 var _unsubscribe = this._unsubscribe;
32300 this._unsubscribe = null;
32301 _super.prototype._unsubscribeAndRecycle.call(this);
32302 this._unsubscribe = _unsubscribe;
32303 return this;
32304 };
32305 RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
32306 this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
32307 var retries;
32308 try {
32309 var notifier = this.notifier;
32310 retries = notifier(this.notifications);
32311 }
32312 catch (e) {
32313 return _super.prototype.complete.call(this);
32314 }
32315 this.retries = retries;
32316 this.retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
32317 };
32318 return RepeatWhenSubscriber;
32319}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
32320//# sourceMappingURL=repeatWhen.js.map
32321
32322
32323/***/ }),
32324/* 331 */
32325/***/ (function(module, __webpack_exports__, __webpack_require__) {
32326
32327"use strict";
32328__webpack_require__.r(__webpack_exports__);
32329/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
32330/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32331/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32332/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32333
32334
32335function retry(count) {
32336 if (count === void 0) {
32337 count = -1;
32338 }
32339 return function (source) { return source.lift(new RetryOperator(count, source)); };
32340}
32341var RetryOperator = /*@__PURE__*/ (function () {
32342 function RetryOperator(count, source) {
32343 this.count = count;
32344 this.source = source;
32345 }
32346 RetryOperator.prototype.call = function (subscriber, source) {
32347 return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
32348 };
32349 return RetryOperator;
32350}());
32351var RetrySubscriber = /*@__PURE__*/ (function (_super) {
32352 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetrySubscriber, _super);
32353 function RetrySubscriber(destination, count, source) {
32354 var _this = _super.call(this, destination) || this;
32355 _this.count = count;
32356 _this.source = source;
32357 return _this;
32358 }
32359 RetrySubscriber.prototype.error = function (err) {
32360 if (!this.isStopped) {
32361 var _a = this, source = _a.source, count = _a.count;
32362 if (count === 0) {
32363 return _super.prototype.error.call(this, err);
32364 }
32365 else if (count > -1) {
32366 this.count = count - 1;
32367 }
32368 source.subscribe(this._unsubscribeAndRecycle());
32369 }
32370 };
32371 return RetrySubscriber;
32372}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32373//# sourceMappingURL=retry.js.map
32374
32375
32376/***/ }),
32377/* 332 */
32378/***/ (function(module, __webpack_exports__, __webpack_require__) {
32379
32380"use strict";
32381__webpack_require__.r(__webpack_exports__);
32382/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
32383/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32384/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
32385/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
32386/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
32387/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32388
32389
32390
32391
32392function retryWhen(notifier) {
32393 return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
32394}
32395var RetryWhenOperator = /*@__PURE__*/ (function () {
32396 function RetryWhenOperator(notifier, source) {
32397 this.notifier = notifier;
32398 this.source = source;
32399 }
32400 RetryWhenOperator.prototype.call = function (subscriber, source) {
32401 return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
32402 };
32403 return RetryWhenOperator;
32404}());
32405var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
32406 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetryWhenSubscriber, _super);
32407 function RetryWhenSubscriber(destination, notifier, source) {
32408 var _this = _super.call(this, destination) || this;
32409 _this.notifier = notifier;
32410 _this.source = source;
32411 return _this;
32412 }
32413 RetryWhenSubscriber.prototype.error = function (err) {
32414 if (!this.isStopped) {
32415 var errors = this.errors;
32416 var retries = this.retries;
32417 var retriesSubscription = this.retriesSubscription;
32418 if (!retries) {
32419 errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
32420 try {
32421 var notifier = this.notifier;
32422 retries = notifier(errors);
32423 }
32424 catch (e) {
32425 return _super.prototype.error.call(this, e);
32426 }
32427 retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
32428 }
32429 else {
32430 this.errors = null;
32431 this.retriesSubscription = null;
32432 }
32433 this._unsubscribeAndRecycle();
32434 this.errors = errors;
32435 this.retries = retries;
32436 this.retriesSubscription = retriesSubscription;
32437 errors.next(err);
32438 }
32439 };
32440 RetryWhenSubscriber.prototype._unsubscribe = function () {
32441 var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
32442 if (errors) {
32443 errors.unsubscribe();
32444 this.errors = null;
32445 }
32446 if (retriesSubscription) {
32447 retriesSubscription.unsubscribe();
32448 this.retriesSubscription = null;
32449 }
32450 this.retries = null;
32451 };
32452 RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32453 var _unsubscribe = this._unsubscribe;
32454 this._unsubscribe = null;
32455 this._unsubscribeAndRecycle();
32456 this._unsubscribe = _unsubscribe;
32457 this.source.subscribe(this);
32458 };
32459 return RetryWhenSubscriber;
32460}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
32461//# sourceMappingURL=retryWhen.js.map
32462
32463
32464/***/ }),
32465/* 333 */
32466/***/ (function(module, __webpack_exports__, __webpack_require__) {
32467
32468"use strict";
32469__webpack_require__.r(__webpack_exports__);
32470/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
32471/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32472/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
32473/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
32474/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32475
32476
32477
32478function sample(notifier) {
32479 return function (source) { return source.lift(new SampleOperator(notifier)); };
32480}
32481var SampleOperator = /*@__PURE__*/ (function () {
32482 function SampleOperator(notifier) {
32483 this.notifier = notifier;
32484 }
32485 SampleOperator.prototype.call = function (subscriber, source) {
32486 var sampleSubscriber = new SampleSubscriber(subscriber);
32487 var subscription = source.subscribe(sampleSubscriber);
32488 subscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(sampleSubscriber, this.notifier));
32489 return subscription;
32490 };
32491 return SampleOperator;
32492}());
32493var SampleSubscriber = /*@__PURE__*/ (function (_super) {
32494 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleSubscriber, _super);
32495 function SampleSubscriber() {
32496 var _this = _super !== null && _super.apply(this, arguments) || this;
32497 _this.hasValue = false;
32498 return _this;
32499 }
32500 SampleSubscriber.prototype._next = function (value) {
32501 this.value = value;
32502 this.hasValue = true;
32503 };
32504 SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32505 this.emitValue();
32506 };
32507 SampleSubscriber.prototype.notifyComplete = function () {
32508 this.emitValue();
32509 };
32510 SampleSubscriber.prototype.emitValue = function () {
32511 if (this.hasValue) {
32512 this.hasValue = false;
32513 this.destination.next(this.value);
32514 }
32515 };
32516 return SampleSubscriber;
32517}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
32518//# sourceMappingURL=sample.js.map
32519
32520
32521/***/ }),
32522/* 334 */
32523/***/ (function(module, __webpack_exports__, __webpack_require__) {
32524
32525"use strict";
32526__webpack_require__.r(__webpack_exports__);
32527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
32528/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32529/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32530/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
32531/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
32532
32533
32534
32535function sampleTime(period, scheduler) {
32536 if (scheduler === void 0) {
32537 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
32538 }
32539 return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
32540}
32541var SampleTimeOperator = /*@__PURE__*/ (function () {
32542 function SampleTimeOperator(period, scheduler) {
32543 this.period = period;
32544 this.scheduler = scheduler;
32545 }
32546 SampleTimeOperator.prototype.call = function (subscriber, source) {
32547 return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
32548 };
32549 return SampleTimeOperator;
32550}());
32551var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
32552 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleTimeSubscriber, _super);
32553 function SampleTimeSubscriber(destination, period, scheduler) {
32554 var _this = _super.call(this, destination) || this;
32555 _this.period = period;
32556 _this.scheduler = scheduler;
32557 _this.hasValue = false;
32558 _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
32559 return _this;
32560 }
32561 SampleTimeSubscriber.prototype._next = function (value) {
32562 this.lastValue = value;
32563 this.hasValue = true;
32564 };
32565 SampleTimeSubscriber.prototype.notifyNext = function () {
32566 if (this.hasValue) {
32567 this.hasValue = false;
32568 this.destination.next(this.lastValue);
32569 }
32570 };
32571 return SampleTimeSubscriber;
32572}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32573function dispatchNotification(state) {
32574 var subscriber = state.subscriber, period = state.period;
32575 subscriber.notifyNext();
32576 this.schedule(state, period);
32577}
32578//# sourceMappingURL=sampleTime.js.map
32579
32580
32581/***/ }),
32582/* 335 */
32583/***/ (function(module, __webpack_exports__, __webpack_require__) {
32584
32585"use strict";
32586__webpack_require__.r(__webpack_exports__);
32587/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
32588/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; });
32589/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; });
32590/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32591/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32592/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32593
32594
32595function sequenceEqual(compareTo, comparator) {
32596 return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };
32597}
32598var SequenceEqualOperator = /*@__PURE__*/ (function () {
32599 function SequenceEqualOperator(compareTo, comparator) {
32600 this.compareTo = compareTo;
32601 this.comparator = comparator;
32602 }
32603 SequenceEqualOperator.prototype.call = function (subscriber, source) {
32604 return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
32605 };
32606 return SequenceEqualOperator;
32607}());
32608
32609var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
32610 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualSubscriber, _super);
32611 function SequenceEqualSubscriber(destination, compareTo, comparator) {
32612 var _this = _super.call(this, destination) || this;
32613 _this.compareTo = compareTo;
32614 _this.comparator = comparator;
32615 _this._a = [];
32616 _this._b = [];
32617 _this._oneComplete = false;
32618 _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
32619 return _this;
32620 }
32621 SequenceEqualSubscriber.prototype._next = function (value) {
32622 if (this._oneComplete && this._b.length === 0) {
32623 this.emit(false);
32624 }
32625 else {
32626 this._a.push(value);
32627 this.checkValues();
32628 }
32629 };
32630 SequenceEqualSubscriber.prototype._complete = function () {
32631 if (this._oneComplete) {
32632 this.emit(this._a.length === 0 && this._b.length === 0);
32633 }
32634 else {
32635 this._oneComplete = true;
32636 }
32637 this.unsubscribe();
32638 };
32639 SequenceEqualSubscriber.prototype.checkValues = function () {
32640 var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;
32641 while (_a.length > 0 && _b.length > 0) {
32642 var a = _a.shift();
32643 var b = _b.shift();
32644 var areEqual = false;
32645 try {
32646 areEqual = comparator ? comparator(a, b) : a === b;
32647 }
32648 catch (e) {
32649 this.destination.error(e);
32650 }
32651 if (!areEqual) {
32652 this.emit(false);
32653 }
32654 }
32655 };
32656 SequenceEqualSubscriber.prototype.emit = function (value) {
32657 var destination = this.destination;
32658 destination.next(value);
32659 destination.complete();
32660 };
32661 SequenceEqualSubscriber.prototype.nextB = function (value) {
32662 if (this._oneComplete && this._a.length === 0) {
32663 this.emit(false);
32664 }
32665 else {
32666 this._b.push(value);
32667 this.checkValues();
32668 }
32669 };
32670 SequenceEqualSubscriber.prototype.completeB = function () {
32671 if (this._oneComplete) {
32672 this.emit(this._a.length === 0 && this._b.length === 0);
32673 }
32674 else {
32675 this._oneComplete = true;
32676 }
32677 };
32678 return SequenceEqualSubscriber;
32679}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32680
32681var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
32682 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualCompareToSubscriber, _super);
32683 function SequenceEqualCompareToSubscriber(destination, parent) {
32684 var _this = _super.call(this, destination) || this;
32685 _this.parent = parent;
32686 return _this;
32687 }
32688 SequenceEqualCompareToSubscriber.prototype._next = function (value) {
32689 this.parent.nextB(value);
32690 };
32691 SequenceEqualCompareToSubscriber.prototype._error = function (err) {
32692 this.parent.error(err);
32693 this.unsubscribe();
32694 };
32695 SequenceEqualCompareToSubscriber.prototype._complete = function () {
32696 this.parent.completeB();
32697 this.unsubscribe();
32698 };
32699 return SequenceEqualCompareToSubscriber;
32700}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32701//# sourceMappingURL=sequenceEqual.js.map
32702
32703
32704/***/ }),
32705/* 336 */
32706/***/ (function(module, __webpack_exports__, __webpack_require__) {
32707
32708"use strict";
32709__webpack_require__.r(__webpack_exports__);
32710/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; });
32711/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
32712/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(188);
32713/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
32714/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
32715
32716
32717
32718function shareSubjectFactory() {
32719 return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
32720}
32721function share() {
32722 return function (source) { return Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); };
32723}
32724//# sourceMappingURL=share.js.map
32725
32726
32727/***/ }),
32728/* 337 */
32729/***/ (function(module, __webpack_exports__, __webpack_require__) {
32730
32731"use strict";
32732__webpack_require__.r(__webpack_exports__);
32733/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
32734/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(191);
32735/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
32736
32737function shareReplay(configOrBufferSize, windowTime, scheduler) {
32738 var config;
32739 if (configOrBufferSize && typeof configOrBufferSize === 'object') {
32740 config = configOrBufferSize;
32741 }
32742 else {
32743 config = {
32744 bufferSize: configOrBufferSize,
32745 windowTime: windowTime,
32746 refCount: false,
32747 scheduler: scheduler
32748 };
32749 }
32750 return function (source) { return source.lift(shareReplayOperator(config)); };
32751}
32752function shareReplayOperator(_a) {
32753 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;
32754 var subject;
32755 var refCount = 0;
32756 var subscription;
32757 var hasError = false;
32758 var isComplete = false;
32759 return function shareReplayOperation(source) {
32760 refCount++;
32761 if (!subject || hasError) {
32762 hasError = false;
32763 subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
32764 subscription = source.subscribe({
32765 next: function (value) { subject.next(value); },
32766 error: function (err) {
32767 hasError = true;
32768 subject.error(err);
32769 },
32770 complete: function () {
32771 isComplete = true;
32772 subscription = undefined;
32773 subject.complete();
32774 },
32775 });
32776 }
32777 var innerSub = subject.subscribe(this);
32778 this.add(function () {
32779 refCount--;
32780 innerSub.unsubscribe();
32781 if (subscription && !isComplete && useRefCount && refCount === 0) {
32782 subscription.unsubscribe();
32783 subscription = undefined;
32784 subject = undefined;
32785 }
32786 });
32787 };
32788}
32789//# sourceMappingURL=shareReplay.js.map
32790
32791
32792/***/ }),
32793/* 338 */
32794/***/ (function(module, __webpack_exports__, __webpack_require__) {
32795
32796"use strict";
32797__webpack_require__.r(__webpack_exports__);
32798/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; });
32799/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32800/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32801/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(221);
32802/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
32803
32804
32805
32806function single(predicate) {
32807 return function (source) { return source.lift(new SingleOperator(predicate, source)); };
32808}
32809var SingleOperator = /*@__PURE__*/ (function () {
32810 function SingleOperator(predicate, source) {
32811 this.predicate = predicate;
32812 this.source = source;
32813 }
32814 SingleOperator.prototype.call = function (subscriber, source) {
32815 return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
32816 };
32817 return SingleOperator;
32818}());
32819var SingleSubscriber = /*@__PURE__*/ (function (_super) {
32820 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SingleSubscriber, _super);
32821 function SingleSubscriber(destination, predicate, source) {
32822 var _this = _super.call(this, destination) || this;
32823 _this.predicate = predicate;
32824 _this.source = source;
32825 _this.seenValue = false;
32826 _this.index = 0;
32827 return _this;
32828 }
32829 SingleSubscriber.prototype.applySingleValue = function (value) {
32830 if (this.seenValue) {
32831 this.destination.error('Sequence contains more than one element');
32832 }
32833 else {
32834 this.seenValue = true;
32835 this.singleValue = value;
32836 }
32837 };
32838 SingleSubscriber.prototype._next = function (value) {
32839 var index = this.index++;
32840 if (this.predicate) {
32841 this.tryNext(value, index);
32842 }
32843 else {
32844 this.applySingleValue(value);
32845 }
32846 };
32847 SingleSubscriber.prototype.tryNext = function (value, index) {
32848 try {
32849 if (this.predicate(value, index, this.source)) {
32850 this.applySingleValue(value);
32851 }
32852 }
32853 catch (err) {
32854 this.destination.error(err);
32855 }
32856 };
32857 SingleSubscriber.prototype._complete = function () {
32858 var destination = this.destination;
32859 if (this.index > 0) {
32860 destination.next(this.seenValue ? this.singleValue : undefined);
32861 destination.complete();
32862 }
32863 else {
32864 destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__["EmptyError"]);
32865 }
32866 };
32867 return SingleSubscriber;
32868}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32869//# sourceMappingURL=single.js.map
32870
32871
32872/***/ }),
32873/* 339 */
32874/***/ (function(module, __webpack_exports__, __webpack_require__) {
32875
32876"use strict";
32877__webpack_require__.r(__webpack_exports__);
32878/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
32879/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32880/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32881/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32882
32883
32884function skip(count) {
32885 return function (source) { return source.lift(new SkipOperator(count)); };
32886}
32887var SkipOperator = /*@__PURE__*/ (function () {
32888 function SkipOperator(total) {
32889 this.total = total;
32890 }
32891 SkipOperator.prototype.call = function (subscriber, source) {
32892 return source.subscribe(new SkipSubscriber(subscriber, this.total));
32893 };
32894 return SkipOperator;
32895}());
32896var SkipSubscriber = /*@__PURE__*/ (function (_super) {
32897 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipSubscriber, _super);
32898 function SkipSubscriber(destination, total) {
32899 var _this = _super.call(this, destination) || this;
32900 _this.total = total;
32901 _this.count = 0;
32902 return _this;
32903 }
32904 SkipSubscriber.prototype._next = function (x) {
32905 if (++this.count > this.total) {
32906 this.destination.next(x);
32907 }
32908 };
32909 return SkipSubscriber;
32910}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32911//# sourceMappingURL=skip.js.map
32912
32913
32914/***/ }),
32915/* 340 */
32916/***/ (function(module, __webpack_exports__, __webpack_require__) {
32917
32918"use strict";
32919__webpack_require__.r(__webpack_exports__);
32920/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
32921/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32922/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32923/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
32924/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
32925
32926
32927
32928function skipLast(count) {
32929 return function (source) { return source.lift(new SkipLastOperator(count)); };
32930}
32931var SkipLastOperator = /*@__PURE__*/ (function () {
32932 function SkipLastOperator(_skipCount) {
32933 this._skipCount = _skipCount;
32934 if (this._skipCount < 0) {
32935 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
32936 }
32937 }
32938 SkipLastOperator.prototype.call = function (subscriber, source) {
32939 if (this._skipCount === 0) {
32940 return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"](subscriber));
32941 }
32942 else {
32943 return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
32944 }
32945 };
32946 return SkipLastOperator;
32947}());
32948var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
32949 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipLastSubscriber, _super);
32950 function SkipLastSubscriber(destination, _skipCount) {
32951 var _this = _super.call(this, destination) || this;
32952 _this._skipCount = _skipCount;
32953 _this._count = 0;
32954 _this._ring = new Array(_skipCount);
32955 return _this;
32956 }
32957 SkipLastSubscriber.prototype._next = function (value) {
32958 var skipCount = this._skipCount;
32959 var count = this._count++;
32960 if (count < skipCount) {
32961 this._ring[count] = value;
32962 }
32963 else {
32964 var currentIndex = count % skipCount;
32965 var ring = this._ring;
32966 var oldValue = ring[currentIndex];
32967 ring[currentIndex] = value;
32968 this.destination.next(oldValue);
32969 }
32970 };
32971 return SkipLastSubscriber;
32972}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32973//# sourceMappingURL=skipLast.js.map
32974
32975
32976/***/ }),
32977/* 341 */
32978/***/ (function(module, __webpack_exports__, __webpack_require__) {
32979
32980"use strict";
32981__webpack_require__.r(__webpack_exports__);
32982/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
32983/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32984/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
32985/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
32986/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
32987/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32988
32989
32990
32991
32992function skipUntil(notifier) {
32993 return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
32994}
32995var SkipUntilOperator = /*@__PURE__*/ (function () {
32996 function SkipUntilOperator(notifier) {
32997 this.notifier = notifier;
32998 }
32999 SkipUntilOperator.prototype.call = function (destination, source) {
33000 return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
33001 };
33002 return SkipUntilOperator;
33003}());
33004var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
33005 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipUntilSubscriber, _super);
33006 function SkipUntilSubscriber(destination, notifier) {
33007 var _this = _super.call(this, destination) || this;
33008 _this.hasValue = false;
33009 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](_this, undefined, undefined);
33010 _this.add(innerSubscriber);
33011 _this.innerSubscription = innerSubscriber;
33012 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_this, notifier, undefined, undefined, innerSubscriber);
33013 if (innerSubscription !== innerSubscriber) {
33014 _this.add(innerSubscription);
33015 _this.innerSubscription = innerSubscription;
33016 }
33017 return _this;
33018 }
33019 SkipUntilSubscriber.prototype._next = function (value) {
33020 if (this.hasValue) {
33021 _super.prototype._next.call(this, value);
33022 }
33023 };
33024 SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33025 this.hasValue = true;
33026 if (this.innerSubscription) {
33027 this.innerSubscription.unsubscribe();
33028 }
33029 };
33030 SkipUntilSubscriber.prototype.notifyComplete = function () {
33031 };
33032 return SkipUntilSubscriber;
33033}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33034//# sourceMappingURL=skipUntil.js.map
33035
33036
33037/***/ }),
33038/* 342 */
33039/***/ (function(module, __webpack_exports__, __webpack_require__) {
33040
33041"use strict";
33042__webpack_require__.r(__webpack_exports__);
33043/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
33044/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33045/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33046/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
33047
33048
33049function skipWhile(predicate) {
33050 return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
33051}
33052var SkipWhileOperator = /*@__PURE__*/ (function () {
33053 function SkipWhileOperator(predicate) {
33054 this.predicate = predicate;
33055 }
33056 SkipWhileOperator.prototype.call = function (subscriber, source) {
33057 return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
33058 };
33059 return SkipWhileOperator;
33060}());
33061var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
33062 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipWhileSubscriber, _super);
33063 function SkipWhileSubscriber(destination, predicate) {
33064 var _this = _super.call(this, destination) || this;
33065 _this.predicate = predicate;
33066 _this.skipping = true;
33067 _this.index = 0;
33068 return _this;
33069 }
33070 SkipWhileSubscriber.prototype._next = function (value) {
33071 var destination = this.destination;
33072 if (this.skipping) {
33073 this.tryCallPredicate(value);
33074 }
33075 if (!this.skipping) {
33076 destination.next(value);
33077 }
33078 };
33079 SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
33080 try {
33081 var result = this.predicate(value, this.index++);
33082 this.skipping = Boolean(result);
33083 }
33084 catch (err) {
33085 this.destination.error(err);
33086 }
33087 };
33088 return SkipWhileSubscriber;
33089}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33090//# sourceMappingURL=skipWhile.js.map
33091
33092
33093/***/ }),
33094/* 343 */
33095/***/ (function(module, __webpack_exports__, __webpack_require__) {
33096
33097"use strict";
33098__webpack_require__.r(__webpack_exports__);
33099/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
33100/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
33101/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
33102/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
33103
33104
33105function startWith() {
33106 var array = [];
33107 for (var _i = 0; _i < arguments.length; _i++) {
33108 array[_i] = arguments[_i];
33109 }
33110 var scheduler = array[array.length - 1];
33111 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) {
33112 array.pop();
33113 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); };
33114 }
33115 else {
33116 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); };
33117 }
33118}
33119//# sourceMappingURL=startWith.js.map
33120
33121
33122/***/ }),
33123/* 344 */
33124/***/ (function(module, __webpack_exports__, __webpack_require__) {
33125
33126"use strict";
33127__webpack_require__.r(__webpack_exports__);
33128/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
33129/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(345);
33130/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
33131
33132function subscribeOn(scheduler, delay) {
33133 if (delay === void 0) {
33134 delay = 0;
33135 }
33136 return function subscribeOnOperatorFunction(source) {
33137 return source.lift(new SubscribeOnOperator(scheduler, delay));
33138 };
33139}
33140var SubscribeOnOperator = /*@__PURE__*/ (function () {
33141 function SubscribeOnOperator(scheduler, delay) {
33142 this.scheduler = scheduler;
33143 this.delay = delay;
33144 }
33145 SubscribeOnOperator.prototype.call = function (subscriber, source) {
33146 return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber);
33147 };
33148 return SubscribeOnOperator;
33149}());
33150//# sourceMappingURL=subscribeOn.js.map
33151
33152
33153/***/ }),
33154/* 345 */
33155/***/ (function(module, __webpack_exports__, __webpack_require__) {
33156
33157"use strict";
33158__webpack_require__.r(__webpack_exports__);
33159/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; });
33160/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33161/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
33162/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
33163/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(255);
33164/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
33165
33166
33167
33168
33169var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
33170 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscribeOnObservable, _super);
33171 function SubscribeOnObservable(source, delayTime, scheduler) {
33172 if (delayTime === void 0) {
33173 delayTime = 0;
33174 }
33175 if (scheduler === void 0) {
33176 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
33177 }
33178 var _this = _super.call(this) || this;
33179 _this.source = source;
33180 _this.delayTime = delayTime;
33181 _this.scheduler = scheduler;
33182 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(delayTime) || delayTime < 0) {
33183 _this.delayTime = 0;
33184 }
33185 if (!scheduler || typeof scheduler.schedule !== 'function') {
33186 _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
33187 }
33188 return _this;
33189 }
33190 SubscribeOnObservable.create = function (source, delay, scheduler) {
33191 if (delay === void 0) {
33192 delay = 0;
33193 }
33194 if (scheduler === void 0) {
33195 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
33196 }
33197 return new SubscribeOnObservable(source, delay, scheduler);
33198 };
33199 SubscribeOnObservable.dispatch = function (arg) {
33200 var source = arg.source, subscriber = arg.subscriber;
33201 return this.add(source.subscribe(subscriber));
33202 };
33203 SubscribeOnObservable.prototype._subscribe = function (subscriber) {
33204 var delay = this.delayTime;
33205 var source = this.source;
33206 var scheduler = this.scheduler;
33207 return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
33208 source: source, subscriber: subscriber
33209 });
33210 };
33211 return SubscribeOnObservable;
33212}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
33213
33214//# sourceMappingURL=SubscribeOnObservable.js.map
33215
33216
33217/***/ }),
33218/* 346 */
33219/***/ (function(module, __webpack_exports__, __webpack_require__) {
33220
33221"use strict";
33222__webpack_require__.r(__webpack_exports__);
33223/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
33224/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(347);
33225/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
33226/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
33227
33228
33229function switchAll() {
33230 return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
33231}
33232//# sourceMappingURL=switchAll.js.map
33233
33234
33235/***/ }),
33236/* 347 */
33237/***/ (function(module, __webpack_exports__, __webpack_require__) {
33238
33239"use strict";
33240__webpack_require__.r(__webpack_exports__);
33241/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
33242/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33243/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33244/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
33245/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
33246/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
33247/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
33248/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
33249
33250
33251
33252
33253
33254
33255function switchMap(project, resultSelector) {
33256 if (typeof resultSelector === 'function') {
33257 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); })); })); };
33258 }
33259 return function (source) { return source.lift(new SwitchMapOperator(project)); };
33260}
33261var SwitchMapOperator = /*@__PURE__*/ (function () {
33262 function SwitchMapOperator(project) {
33263 this.project = project;
33264 }
33265 SwitchMapOperator.prototype.call = function (subscriber, source) {
33266 return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
33267 };
33268 return SwitchMapOperator;
33269}());
33270var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
33271 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchMapSubscriber, _super);
33272 function SwitchMapSubscriber(destination, project) {
33273 var _this = _super.call(this, destination) || this;
33274 _this.project = project;
33275 _this.index = 0;
33276 return _this;
33277 }
33278 SwitchMapSubscriber.prototype._next = function (value) {
33279 var result;
33280 var index = this.index++;
33281 try {
33282 result = this.project(value, index);
33283 }
33284 catch (error) {
33285 this.destination.error(error);
33286 return;
33287 }
33288 this._innerSub(result, value, index);
33289 };
33290 SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
33291 var innerSubscription = this.innerSubscription;
33292 if (innerSubscription) {
33293 innerSubscription.unsubscribe();
33294 }
33295 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, value, index);
33296 var destination = this.destination;
33297 destination.add(innerSubscriber);
33298 this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
33299 if (this.innerSubscription !== innerSubscriber) {
33300 destination.add(this.innerSubscription);
33301 }
33302 };
33303 SwitchMapSubscriber.prototype._complete = function () {
33304 var innerSubscription = this.innerSubscription;
33305 if (!innerSubscription || innerSubscription.closed) {
33306 _super.prototype._complete.call(this);
33307 }
33308 this.unsubscribe();
33309 };
33310 SwitchMapSubscriber.prototype._unsubscribe = function () {
33311 this.innerSubscription = null;
33312 };
33313 SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
33314 var destination = this.destination;
33315 destination.remove(innerSub);
33316 this.innerSubscription = null;
33317 if (this.isStopped) {
33318 _super.prototype._complete.call(this);
33319 }
33320 };
33321 SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33322 this.destination.next(innerValue);
33323 };
33324 return SwitchMapSubscriber;
33325}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33326//# sourceMappingURL=switchMap.js.map
33327
33328
33329/***/ }),
33330/* 348 */
33331/***/ (function(module, __webpack_exports__, __webpack_require__) {
33332
33333"use strict";
33334__webpack_require__.r(__webpack_exports__);
33335/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
33336/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(347);
33337/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
33338
33339function switchMapTo(innerObservable, resultSelector) {
33340 return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; });
33341}
33342//# sourceMappingURL=switchMapTo.js.map
33343
33344
33345/***/ }),
33346/* 349 */
33347/***/ (function(module, __webpack_exports__, __webpack_require__) {
33348
33349"use strict";
33350__webpack_require__.r(__webpack_exports__);
33351/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
33352/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33353/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33354/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
33355/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33356
33357
33358
33359function takeUntil(notifier) {
33360 return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
33361}
33362var TakeUntilOperator = /*@__PURE__*/ (function () {
33363 function TakeUntilOperator(notifier) {
33364 this.notifier = notifier;
33365 }
33366 TakeUntilOperator.prototype.call = function (subscriber, source) {
33367 var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
33368 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(takeUntilSubscriber, this.notifier);
33369 if (notifierSubscription && !takeUntilSubscriber.seenValue) {
33370 takeUntilSubscriber.add(notifierSubscription);
33371 return source.subscribe(takeUntilSubscriber);
33372 }
33373 return takeUntilSubscriber;
33374 };
33375 return TakeUntilOperator;
33376}());
33377var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
33378 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeUntilSubscriber, _super);
33379 function TakeUntilSubscriber(destination) {
33380 var _this = _super.call(this, destination) || this;
33381 _this.seenValue = false;
33382 return _this;
33383 }
33384 TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33385 this.seenValue = true;
33386 this.complete();
33387 };
33388 TakeUntilSubscriber.prototype.notifyComplete = function () {
33389 };
33390 return TakeUntilSubscriber;
33391}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33392//# sourceMappingURL=takeUntil.js.map
33393
33394
33395/***/ }),
33396/* 350 */
33397/***/ (function(module, __webpack_exports__, __webpack_require__) {
33398
33399"use strict";
33400__webpack_require__.r(__webpack_exports__);
33401/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
33402/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33403/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33404/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
33405
33406
33407function takeWhile(predicate, inclusive) {
33408 if (inclusive === void 0) {
33409 inclusive = false;
33410 }
33411 return function (source) {
33412 return source.lift(new TakeWhileOperator(predicate, inclusive));
33413 };
33414}
33415var TakeWhileOperator = /*@__PURE__*/ (function () {
33416 function TakeWhileOperator(predicate, inclusive) {
33417 this.predicate = predicate;
33418 this.inclusive = inclusive;
33419 }
33420 TakeWhileOperator.prototype.call = function (subscriber, source) {
33421 return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
33422 };
33423 return TakeWhileOperator;
33424}());
33425var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
33426 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeWhileSubscriber, _super);
33427 function TakeWhileSubscriber(destination, predicate, inclusive) {
33428 var _this = _super.call(this, destination) || this;
33429 _this.predicate = predicate;
33430 _this.inclusive = inclusive;
33431 _this.index = 0;
33432 return _this;
33433 }
33434 TakeWhileSubscriber.prototype._next = function (value) {
33435 var destination = this.destination;
33436 var result;
33437 try {
33438 result = this.predicate(value, this.index++);
33439 }
33440 catch (err) {
33441 destination.error(err);
33442 return;
33443 }
33444 this.nextOrComplete(value, result);
33445 };
33446 TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
33447 var destination = this.destination;
33448 if (Boolean(predicateResult)) {
33449 destination.next(value);
33450 }
33451 else {
33452 if (this.inclusive) {
33453 destination.next(value);
33454 }
33455 destination.complete();
33456 }
33457 };
33458 return TakeWhileSubscriber;
33459}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33460//# sourceMappingURL=takeWhile.js.map
33461
33462
33463/***/ }),
33464/* 351 */
33465/***/ (function(module, __webpack_exports__, __webpack_require__) {
33466
33467"use strict";
33468__webpack_require__.r(__webpack_exports__);
33469/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
33470/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33471/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33472/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(218);
33473/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
33474/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
33475
33476
33477
33478
33479function tap(nextOrObserver, error, complete) {
33480 return function tapOperatorFunction(source) {
33481 return source.lift(new DoOperator(nextOrObserver, error, complete));
33482 };
33483}
33484var DoOperator = /*@__PURE__*/ (function () {
33485 function DoOperator(nextOrObserver, error, complete) {
33486 this.nextOrObserver = nextOrObserver;
33487 this.error = error;
33488 this.complete = complete;
33489 }
33490 DoOperator.prototype.call = function (subscriber, source) {
33491 return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
33492 };
33493 return DoOperator;
33494}());
33495var TapSubscriber = /*@__PURE__*/ (function (_super) {
33496 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TapSubscriber, _super);
33497 function TapSubscriber(destination, observerOrNext, error, complete) {
33498 var _this = _super.call(this, destination) || this;
33499 _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33500 _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33501 _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33502 _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33503 _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33504 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(observerOrNext)) {
33505 _this._context = _this;
33506 _this._tapNext = observerOrNext;
33507 }
33508 else if (observerOrNext) {
33509 _this._context = observerOrNext;
33510 _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33511 _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33512 _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33513 }
33514 return _this;
33515 }
33516 TapSubscriber.prototype._next = function (value) {
33517 try {
33518 this._tapNext.call(this._context, value);
33519 }
33520 catch (err) {
33521 this.destination.error(err);
33522 return;
33523 }
33524 this.destination.next(value);
33525 };
33526 TapSubscriber.prototype._error = function (err) {
33527 try {
33528 this._tapError.call(this._context, err);
33529 }
33530 catch (err) {
33531 this.destination.error(err);
33532 return;
33533 }
33534 this.destination.error(err);
33535 };
33536 TapSubscriber.prototype._complete = function () {
33537 try {
33538 this._tapComplete.call(this._context);
33539 }
33540 catch (err) {
33541 this.destination.error(err);
33542 return;
33543 }
33544 return this.destination.complete();
33545 };
33546 return TapSubscriber;
33547}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33548//# sourceMappingURL=tap.js.map
33549
33550
33551/***/ }),
33552/* 352 */
33553/***/ (function(module, __webpack_exports__, __webpack_require__) {
33554
33555"use strict";
33556__webpack_require__.r(__webpack_exports__);
33557/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; });
33558/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
33559/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33560/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33561/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
33562/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33563
33564
33565
33566var defaultThrottleConfig = {
33567 leading: true,
33568 trailing: false
33569};
33570function throttle(durationSelector, config) {
33571 if (config === void 0) {
33572 config = defaultThrottleConfig;
33573 }
33574 return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
33575}
33576var ThrottleOperator = /*@__PURE__*/ (function () {
33577 function ThrottleOperator(durationSelector, leading, trailing) {
33578 this.durationSelector = durationSelector;
33579 this.leading = leading;
33580 this.trailing = trailing;
33581 }
33582 ThrottleOperator.prototype.call = function (subscriber, source) {
33583 return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
33584 };
33585 return ThrottleOperator;
33586}());
33587var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
33588 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleSubscriber, _super);
33589 function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
33590 var _this = _super.call(this, destination) || this;
33591 _this.destination = destination;
33592 _this.durationSelector = durationSelector;
33593 _this._leading = _leading;
33594 _this._trailing = _trailing;
33595 _this._hasValue = false;
33596 return _this;
33597 }
33598 ThrottleSubscriber.prototype._next = function (value) {
33599 this._hasValue = true;
33600 this._sendValue = value;
33601 if (!this._throttled) {
33602 if (this._leading) {
33603 this.send();
33604 }
33605 else {
33606 this.throttle(value);
33607 }
33608 }
33609 };
33610 ThrottleSubscriber.prototype.send = function () {
33611 var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
33612 if (_hasValue) {
33613 this.destination.next(_sendValue);
33614 this.throttle(_sendValue);
33615 }
33616 this._hasValue = false;
33617 this._sendValue = null;
33618 };
33619 ThrottleSubscriber.prototype.throttle = function (value) {
33620 var duration = this.tryDurationSelector(value);
33621 if (!!duration) {
33622 this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration));
33623 }
33624 };
33625 ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
33626 try {
33627 return this.durationSelector(value);
33628 }
33629 catch (err) {
33630 this.destination.error(err);
33631 return null;
33632 }
33633 };
33634 ThrottleSubscriber.prototype.throttlingDone = function () {
33635 var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
33636 if (_throttled) {
33637 _throttled.unsubscribe();
33638 }
33639 this._throttled = null;
33640 if (_trailing) {
33641 this.send();
33642 }
33643 };
33644 ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33645 this.throttlingDone();
33646 };
33647 ThrottleSubscriber.prototype.notifyComplete = function () {
33648 this.throttlingDone();
33649 };
33650 return ThrottleSubscriber;
33651}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33652//# sourceMappingURL=throttle.js.map
33653
33654
33655/***/ }),
33656/* 353 */
33657/***/ (function(module, __webpack_exports__, __webpack_require__) {
33658
33659"use strict";
33660__webpack_require__.r(__webpack_exports__);
33661/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
33662/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33663/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33664/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
33665/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(352);
33666/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
33667
33668
33669
33670
33671function throttleTime(duration, scheduler, config) {
33672 if (scheduler === void 0) {
33673 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
33674 }
33675 if (config === void 0) {
33676 config = _throttle__WEBPACK_IMPORTED_MODULE_3__["defaultThrottleConfig"];
33677 }
33678 return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
33679}
33680var ThrottleTimeOperator = /*@__PURE__*/ (function () {
33681 function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
33682 this.duration = duration;
33683 this.scheduler = scheduler;
33684 this.leading = leading;
33685 this.trailing = trailing;
33686 }
33687 ThrottleTimeOperator.prototype.call = function (subscriber, source) {
33688 return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
33689 };
33690 return ThrottleTimeOperator;
33691}());
33692var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
33693 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleTimeSubscriber, _super);
33694 function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
33695 var _this = _super.call(this, destination) || this;
33696 _this.duration = duration;
33697 _this.scheduler = scheduler;
33698 _this.leading = leading;
33699 _this.trailing = trailing;
33700 _this._hasTrailingValue = false;
33701 _this._trailingValue = null;
33702 return _this;
33703 }
33704 ThrottleTimeSubscriber.prototype._next = function (value) {
33705 if (this.throttled) {
33706 if (this.trailing) {
33707 this._trailingValue = value;
33708 this._hasTrailingValue = true;
33709 }
33710 }
33711 else {
33712 this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));
33713 if (this.leading) {
33714 this.destination.next(value);
33715 }
33716 else if (this.trailing) {
33717 this._trailingValue = value;
33718 this._hasTrailingValue = true;
33719 }
33720 }
33721 };
33722 ThrottleTimeSubscriber.prototype._complete = function () {
33723 if (this._hasTrailingValue) {
33724 this.destination.next(this._trailingValue);
33725 this.destination.complete();
33726 }
33727 else {
33728 this.destination.complete();
33729 }
33730 };
33731 ThrottleTimeSubscriber.prototype.clearThrottle = function () {
33732 var throttled = this.throttled;
33733 if (throttled) {
33734 if (this.trailing && this._hasTrailingValue) {
33735 this.destination.next(this._trailingValue);
33736 this._trailingValue = null;
33737 this._hasTrailingValue = false;
33738 }
33739 throttled.unsubscribe();
33740 this.remove(throttled);
33741 this.throttled = null;
33742 }
33743 };
33744 return ThrottleTimeSubscriber;
33745}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33746function dispatchNext(arg) {
33747 var subscriber = arg.subscriber;
33748 subscriber.clearThrottle();
33749}
33750//# sourceMappingURL=throttleTime.js.map
33751
33752
33753/***/ }),
33754/* 354 */
33755/***/ (function(module, __webpack_exports__, __webpack_require__) {
33756
33757"use strict";
33758__webpack_require__.r(__webpack_exports__);
33759/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
33760/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; });
33761/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
33762/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
33763/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(248);
33764/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(224);
33765/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
33766
33767
33768
33769
33770function timeInterval(scheduler) {
33771 if (scheduler === void 0) {
33772 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
33773 }
33774 return function (source) {
33775 return Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
33776 return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(function (_a, value) {
33777 var current = _a.current;
33778 return ({ value: value, current: scheduler.now(), last: current });
33779 }, { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_a) {
33780 var current = _a.current, last = _a.last, value = _a.value;
33781 return new TimeInterval(value, current - last);
33782 }));
33783 });
33784 };
33785}
33786var TimeInterval = /*@__PURE__*/ (function () {
33787 function TimeInterval(value, interval) {
33788 this.value = value;
33789 this.interval = interval;
33790 }
33791 return TimeInterval;
33792}());
33793
33794//# sourceMappingURL=timeInterval.js.map
33795
33796
33797/***/ }),
33798/* 355 */
33799/***/ (function(module, __webpack_exports__, __webpack_require__) {
33800
33801"use strict";
33802__webpack_require__.r(__webpack_exports__);
33803/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
33804/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
33805/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(222);
33806/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(356);
33807/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(207);
33808/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
33809
33810
33811
33812
33813function timeout(due, scheduler) {
33814 if (scheduler === void 0) {
33815 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
33816 }
33817 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);
33818}
33819//# sourceMappingURL=timeout.js.map
33820
33821
33822/***/ }),
33823/* 356 */
33824/***/ (function(module, __webpack_exports__, __webpack_require__) {
33825
33826"use strict";
33827__webpack_require__.r(__webpack_exports__);
33828/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
33829/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33830/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
33831/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(288);
33832/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
33833/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
33834/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33835
33836
33837
33838
33839
33840function timeoutWith(due, withObservable, scheduler) {
33841 if (scheduler === void 0) {
33842 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
33843 }
33844 return function (source) {
33845 var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(due);
33846 var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
33847 return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
33848 };
33849}
33850var TimeoutWithOperator = /*@__PURE__*/ (function () {
33851 function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
33852 this.waitFor = waitFor;
33853 this.absoluteTimeout = absoluteTimeout;
33854 this.withObservable = withObservable;
33855 this.scheduler = scheduler;
33856 }
33857 TimeoutWithOperator.prototype.call = function (subscriber, source) {
33858 return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
33859 };
33860 return TimeoutWithOperator;
33861}());
33862var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
33863 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutWithSubscriber, _super);
33864 function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
33865 var _this = _super.call(this, destination) || this;
33866 _this.absoluteTimeout = absoluteTimeout;
33867 _this.waitFor = waitFor;
33868 _this.withObservable = withObservable;
33869 _this.scheduler = scheduler;
33870 _this.action = null;
33871 _this.scheduleTimeout();
33872 return _this;
33873 }
33874 TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
33875 var withObservable = subscriber.withObservable;
33876 subscriber._unsubscribeAndRecycle();
33877 subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(subscriber, withObservable));
33878 };
33879 TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
33880 var action = this.action;
33881 if (action) {
33882 this.action = action.schedule(this, this.waitFor);
33883 }
33884 else {
33885 this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
33886 }
33887 };
33888 TimeoutWithSubscriber.prototype._next = function (value) {
33889 if (!this.absoluteTimeout) {
33890 this.scheduleTimeout();
33891 }
33892 _super.prototype._next.call(this, value);
33893 };
33894 TimeoutWithSubscriber.prototype._unsubscribe = function () {
33895 this.action = null;
33896 this.scheduler = null;
33897 this.withObservable = null;
33898 };
33899 return TimeoutWithSubscriber;
33900}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
33901//# sourceMappingURL=timeoutWith.js.map
33902
33903
33904/***/ }),
33905/* 357 */
33906/***/ (function(module, __webpack_exports__, __webpack_require__) {
33907
33908"use strict";
33909__webpack_require__.r(__webpack_exports__);
33910/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
33911/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
33912/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
33913/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(224);
33914/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
33915
33916
33917function timestamp(scheduler) {
33918 if (scheduler === void 0) {
33919 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
33920 }
33921 return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) { return new Timestamp(value, scheduler.now()); });
33922}
33923var Timestamp = /*@__PURE__*/ (function () {
33924 function Timestamp(value, timestamp) {
33925 this.value = value;
33926 this.timestamp = timestamp;
33927 }
33928 return Timestamp;
33929}());
33930
33931//# sourceMappingURL=timestamp.js.map
33932
33933
33934/***/ }),
33935/* 358 */
33936/***/ (function(module, __webpack_exports__, __webpack_require__) {
33937
33938"use strict";
33939__webpack_require__.r(__webpack_exports__);
33940/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
33941/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(313);
33942/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
33943
33944function toArrayReducer(arr, item, index) {
33945 if (index === 0) {
33946 return [item];
33947 }
33948 arr.push(item);
33949 return arr;
33950}
33951function toArray() {
33952 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []);
33953}
33954//# sourceMappingURL=toArray.js.map
33955
33956
33957/***/ }),
33958/* 359 */
33959/***/ (function(module, __webpack_exports__, __webpack_require__) {
33960
33961"use strict";
33962__webpack_require__.r(__webpack_exports__);
33963/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; });
33964/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33965/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
33966/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
33967/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
33968/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33969
33970
33971
33972
33973function window(windowBoundaries) {
33974 return function windowOperatorFunction(source) {
33975 return source.lift(new WindowOperator(windowBoundaries));
33976 };
33977}
33978var WindowOperator = /*@__PURE__*/ (function () {
33979 function WindowOperator(windowBoundaries) {
33980 this.windowBoundaries = windowBoundaries;
33981 }
33982 WindowOperator.prototype.call = function (subscriber, source) {
33983 var windowSubscriber = new WindowSubscriber(subscriber);
33984 var sourceSubscription = source.subscribe(windowSubscriber);
33985 if (!sourceSubscription.closed) {
33986 windowSubscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
33987 }
33988 return sourceSubscription;
33989 };
33990 return WindowOperator;
33991}());
33992var WindowSubscriber = /*@__PURE__*/ (function (_super) {
33993 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
33994 function WindowSubscriber(destination) {
33995 var _this = _super.call(this, destination) || this;
33996 _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
33997 destination.next(_this.window);
33998 return _this;
33999 }
34000 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34001 this.openWindow();
34002 };
34003 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
34004 this._error(error);
34005 };
34006 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
34007 this._complete();
34008 };
34009 WindowSubscriber.prototype._next = function (value) {
34010 this.window.next(value);
34011 };
34012 WindowSubscriber.prototype._error = function (err) {
34013 this.window.error(err);
34014 this.destination.error(err);
34015 };
34016 WindowSubscriber.prototype._complete = function () {
34017 this.window.complete();
34018 this.destination.complete();
34019 };
34020 WindowSubscriber.prototype._unsubscribe = function () {
34021 this.window = null;
34022 };
34023 WindowSubscriber.prototype.openWindow = function () {
34024 var prevWindow = this.window;
34025 if (prevWindow) {
34026 prevWindow.complete();
34027 }
34028 var destination = this.destination;
34029 var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
34030 destination.next(newWindow);
34031 };
34032 return WindowSubscriber;
34033}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
34034//# sourceMappingURL=window.js.map
34035
34036
34037/***/ }),
34038/* 360 */
34039/***/ (function(module, __webpack_exports__, __webpack_require__) {
34040
34041"use strict";
34042__webpack_require__.r(__webpack_exports__);
34043/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
34044/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34045/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
34046/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
34047/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
34048
34049
34050
34051function windowCount(windowSize, startWindowEvery) {
34052 if (startWindowEvery === void 0) {
34053 startWindowEvery = 0;
34054 }
34055 return function windowCountOperatorFunction(source) {
34056 return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
34057 };
34058}
34059var WindowCountOperator = /*@__PURE__*/ (function () {
34060 function WindowCountOperator(windowSize, startWindowEvery) {
34061 this.windowSize = windowSize;
34062 this.startWindowEvery = startWindowEvery;
34063 }
34064 WindowCountOperator.prototype.call = function (subscriber, source) {
34065 return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
34066 };
34067 return WindowCountOperator;
34068}());
34069var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
34070 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowCountSubscriber, _super);
34071 function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
34072 var _this = _super.call(this, destination) || this;
34073 _this.destination = destination;
34074 _this.windowSize = windowSize;
34075 _this.startWindowEvery = startWindowEvery;
34076 _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]()];
34077 _this.count = 0;
34078 destination.next(_this.windows[0]);
34079 return _this;
34080 }
34081 WindowCountSubscriber.prototype._next = function (value) {
34082 var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
34083 var destination = this.destination;
34084 var windowSize = this.windowSize;
34085 var windows = this.windows;
34086 var len = windows.length;
34087 for (var i = 0; i < len && !this.closed; i++) {
34088 windows[i].next(value);
34089 }
34090 var c = this.count - windowSize + 1;
34091 if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
34092 windows.shift().complete();
34093 }
34094 if (++this.count % startWindowEvery === 0 && !this.closed) {
34095 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
34096 windows.push(window_1);
34097 destination.next(window_1);
34098 }
34099 };
34100 WindowCountSubscriber.prototype._error = function (err) {
34101 var windows = this.windows;
34102 if (windows) {
34103 while (windows.length > 0 && !this.closed) {
34104 windows.shift().error(err);
34105 }
34106 }
34107 this.destination.error(err);
34108 };
34109 WindowCountSubscriber.prototype._complete = function () {
34110 var windows = this.windows;
34111 if (windows) {
34112 while (windows.length > 0 && !this.closed) {
34113 windows.shift().complete();
34114 }
34115 }
34116 this.destination.complete();
34117 };
34118 WindowCountSubscriber.prototype._unsubscribe = function () {
34119 this.count = 0;
34120 this.windows = null;
34121 };
34122 return WindowCountSubscriber;
34123}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
34124//# sourceMappingURL=windowCount.js.map
34125
34126
34127/***/ }),
34128/* 361 */
34129/***/ (function(module, __webpack_exports__, __webpack_require__) {
34130
34131"use strict";
34132__webpack_require__.r(__webpack_exports__);
34133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; });
34134/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34135/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34136/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
34137/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
34138/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(255);
34139/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(203);
34140/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
34141
34142
34143
34144
34145
34146
34147function windowTime(windowTimeSpan) {
34148 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
34149 var windowCreationInterval = null;
34150 var maxWindowSize = Number.POSITIVE_INFINITY;
34151 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[3])) {
34152 scheduler = arguments[3];
34153 }
34154 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[2])) {
34155 scheduler = arguments[2];
34156 }
34157 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[2])) {
34158 maxWindowSize = arguments[2];
34159 }
34160 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[1])) {
34161 scheduler = arguments[1];
34162 }
34163 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[1])) {
34164 windowCreationInterval = arguments[1];
34165 }
34166 return function windowTimeOperatorFunction(source) {
34167 return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
34168 };
34169}
34170var WindowTimeOperator = /*@__PURE__*/ (function () {
34171 function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
34172 this.windowTimeSpan = windowTimeSpan;
34173 this.windowCreationInterval = windowCreationInterval;
34174 this.maxWindowSize = maxWindowSize;
34175 this.scheduler = scheduler;
34176 }
34177 WindowTimeOperator.prototype.call = function (subscriber, source) {
34178 return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
34179 };
34180 return WindowTimeOperator;
34181}());
34182var CountedSubject = /*@__PURE__*/ (function (_super) {
34183 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountedSubject, _super);
34184 function CountedSubject() {
34185 var _this = _super !== null && _super.apply(this, arguments) || this;
34186 _this._numberOfNextedValues = 0;
34187 return _this;
34188 }
34189 CountedSubject.prototype.next = function (value) {
34190 this._numberOfNextedValues++;
34191 _super.prototype.next.call(this, value);
34192 };
34193 Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
34194 get: function () {
34195 return this._numberOfNextedValues;
34196 },
34197 enumerable: true,
34198 configurable: true
34199 });
34200 return CountedSubject;
34201}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
34202var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
34203 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowTimeSubscriber, _super);
34204 function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
34205 var _this = _super.call(this, destination) || this;
34206 _this.destination = destination;
34207 _this.windowTimeSpan = windowTimeSpan;
34208 _this.windowCreationInterval = windowCreationInterval;
34209 _this.maxWindowSize = maxWindowSize;
34210 _this.scheduler = scheduler;
34211 _this.windows = [];
34212 var window = _this.openWindow();
34213 if (windowCreationInterval !== null && windowCreationInterval >= 0) {
34214 var closeState = { subscriber: _this, window: window, context: null };
34215 var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
34216 _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
34217 _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
34218 }
34219 else {
34220 var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
34221 _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
34222 }
34223 return _this;
34224 }
34225 WindowTimeSubscriber.prototype._next = function (value) {
34226 var windows = this.windows;
34227 var len = windows.length;
34228 for (var i = 0; i < len; i++) {
34229 var window_1 = windows[i];
34230 if (!window_1.closed) {
34231 window_1.next(value);
34232 if (window_1.numberOfNextedValues >= this.maxWindowSize) {
34233 this.closeWindow(window_1);
34234 }
34235 }
34236 }
34237 };
34238 WindowTimeSubscriber.prototype._error = function (err) {
34239 var windows = this.windows;
34240 while (windows.length > 0) {
34241 windows.shift().error(err);
34242 }
34243 this.destination.error(err);
34244 };
34245 WindowTimeSubscriber.prototype._complete = function () {
34246 var windows = this.windows;
34247 while (windows.length > 0) {
34248 var window_2 = windows.shift();
34249 if (!window_2.closed) {
34250 window_2.complete();
34251 }
34252 }
34253 this.destination.complete();
34254 };
34255 WindowTimeSubscriber.prototype.openWindow = function () {
34256 var window = new CountedSubject();
34257 this.windows.push(window);
34258 var destination = this.destination;
34259 destination.next(window);
34260 return window;
34261 };
34262 WindowTimeSubscriber.prototype.closeWindow = function (window) {
34263 window.complete();
34264 var windows = this.windows;
34265 windows.splice(windows.indexOf(window), 1);
34266 };
34267 return WindowTimeSubscriber;
34268}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
34269function dispatchWindowTimeSpanOnly(state) {
34270 var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
34271 if (window) {
34272 subscriber.closeWindow(window);
34273 }
34274 state.window = subscriber.openWindow();
34275 this.schedule(state, windowTimeSpan);
34276}
34277function dispatchWindowCreation(state) {
34278 var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
34279 var window = subscriber.openWindow();
34280 var action = this;
34281 var context = { action: action, subscription: null };
34282 var timeSpanState = { subscriber: subscriber, window: window, context: context };
34283 context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
34284 action.add(context.subscription);
34285 action.schedule(state, windowCreationInterval);
34286}
34287function dispatchWindowClose(state) {
34288 var subscriber = state.subscriber, window = state.window, context = state.context;
34289 if (context && context.action && context.subscription) {
34290 context.action.remove(context.subscription);
34291 }
34292 subscriber.closeWindow(window);
34293}
34294//# sourceMappingURL=windowTime.js.map
34295
34296
34297/***/ }),
34298/* 362 */
34299/***/ (function(module, __webpack_exports__, __webpack_require__) {
34300
34301"use strict";
34302__webpack_require__.r(__webpack_exports__);
34303/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
34304/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34305/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34306/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
34307/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
34308/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
34309/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34310
34311
34312
34313
34314
34315function windowToggle(openings, closingSelector) {
34316 return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
34317}
34318var WindowToggleOperator = /*@__PURE__*/ (function () {
34319 function WindowToggleOperator(openings, closingSelector) {
34320 this.openings = openings;
34321 this.closingSelector = closingSelector;
34322 }
34323 WindowToggleOperator.prototype.call = function (subscriber, source) {
34324 return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
34325 };
34326 return WindowToggleOperator;
34327}());
34328var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
34329 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowToggleSubscriber, _super);
34330 function WindowToggleSubscriber(destination, openings, closingSelector) {
34331 var _this = _super.call(this, destination) || this;
34332 _this.openings = openings;
34333 _this.closingSelector = closingSelector;
34334 _this.contexts = [];
34335 _this.add(_this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(_this, openings, openings));
34336 return _this;
34337 }
34338 WindowToggleSubscriber.prototype._next = function (value) {
34339 var contexts = this.contexts;
34340 if (contexts) {
34341 var len = contexts.length;
34342 for (var i = 0; i < len; i++) {
34343 contexts[i].window.next(value);
34344 }
34345 }
34346 };
34347 WindowToggleSubscriber.prototype._error = function (err) {
34348 var contexts = this.contexts;
34349 this.contexts = null;
34350 if (contexts) {
34351 var len = contexts.length;
34352 var index = -1;
34353 while (++index < len) {
34354 var context_1 = contexts[index];
34355 context_1.window.error(err);
34356 context_1.subscription.unsubscribe();
34357 }
34358 }
34359 _super.prototype._error.call(this, err);
34360 };
34361 WindowToggleSubscriber.prototype._complete = function () {
34362 var contexts = this.contexts;
34363 this.contexts = null;
34364 if (contexts) {
34365 var len = contexts.length;
34366 var index = -1;
34367 while (++index < len) {
34368 var context_2 = contexts[index];
34369 context_2.window.complete();
34370 context_2.subscription.unsubscribe();
34371 }
34372 }
34373 _super.prototype._complete.call(this);
34374 };
34375 WindowToggleSubscriber.prototype._unsubscribe = function () {
34376 var contexts = this.contexts;
34377 this.contexts = null;
34378 if (contexts) {
34379 var len = contexts.length;
34380 var index = -1;
34381 while (++index < len) {
34382 var context_3 = contexts[index];
34383 context_3.window.unsubscribe();
34384 context_3.subscription.unsubscribe();
34385 }
34386 }
34387 };
34388 WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34389 if (outerValue === this.openings) {
34390 var closingNotifier = void 0;
34391 try {
34392 var closingSelector = this.closingSelector;
34393 closingNotifier = closingSelector(innerValue);
34394 }
34395 catch (e) {
34396 return this.error(e);
34397 }
34398 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
34399 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
34400 var context_4 = { window: window_1, subscription: subscription };
34401 this.contexts.push(context_4);
34402 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, closingNotifier, context_4);
34403 if (innerSubscription.closed) {
34404 this.closeWindow(this.contexts.length - 1);
34405 }
34406 else {
34407 innerSubscription.context = context_4;
34408 subscription.add(innerSubscription);
34409 }
34410 this.destination.next(window_1);
34411 }
34412 else {
34413 this.closeWindow(this.contexts.indexOf(outerValue));
34414 }
34415 };
34416 WindowToggleSubscriber.prototype.notifyError = function (err) {
34417 this.error(err);
34418 };
34419 WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
34420 if (inner !== this.openSubscription) {
34421 this.closeWindow(this.contexts.indexOf(inner.context));
34422 }
34423 };
34424 WindowToggleSubscriber.prototype.closeWindow = function (index) {
34425 if (index === -1) {
34426 return;
34427 }
34428 var contexts = this.contexts;
34429 var context = contexts[index];
34430 var window = context.window, subscription = context.subscription;
34431 contexts.splice(index, 1);
34432 window.complete();
34433 subscription.unsubscribe();
34434 };
34435 return WindowToggleSubscriber;
34436}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
34437//# sourceMappingURL=windowToggle.js.map
34438
34439
34440/***/ }),
34441/* 363 */
34442/***/ (function(module, __webpack_exports__, __webpack_require__) {
34443
34444"use strict";
34445__webpack_require__.r(__webpack_exports__);
34446/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
34447/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34448/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34449/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
34450/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
34451/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34452
34453
34454
34455
34456function windowWhen(closingSelector) {
34457 return function windowWhenOperatorFunction(source) {
34458 return source.lift(new WindowOperator(closingSelector));
34459 };
34460}
34461var WindowOperator = /*@__PURE__*/ (function () {
34462 function WindowOperator(closingSelector) {
34463 this.closingSelector = closingSelector;
34464 }
34465 WindowOperator.prototype.call = function (subscriber, source) {
34466 return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
34467 };
34468 return WindowOperator;
34469}());
34470var WindowSubscriber = /*@__PURE__*/ (function (_super) {
34471 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
34472 function WindowSubscriber(destination, closingSelector) {
34473 var _this = _super.call(this, destination) || this;
34474 _this.destination = destination;
34475 _this.closingSelector = closingSelector;
34476 _this.openWindow();
34477 return _this;
34478 }
34479 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34480 this.openWindow(innerSub);
34481 };
34482 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
34483 this._error(error);
34484 };
34485 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
34486 this.openWindow(innerSub);
34487 };
34488 WindowSubscriber.prototype._next = function (value) {
34489 this.window.next(value);
34490 };
34491 WindowSubscriber.prototype._error = function (err) {
34492 this.window.error(err);
34493 this.destination.error(err);
34494 this.unsubscribeClosingNotification();
34495 };
34496 WindowSubscriber.prototype._complete = function () {
34497 this.window.complete();
34498 this.destination.complete();
34499 this.unsubscribeClosingNotification();
34500 };
34501 WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
34502 if (this.closingNotification) {
34503 this.closingNotification.unsubscribe();
34504 }
34505 };
34506 WindowSubscriber.prototype.openWindow = function (innerSub) {
34507 if (innerSub === void 0) {
34508 innerSub = null;
34509 }
34510 if (innerSub) {
34511 this.remove(innerSub);
34512 innerSub.unsubscribe();
34513 }
34514 var prevWindow = this.window;
34515 if (prevWindow) {
34516 prevWindow.complete();
34517 }
34518 var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
34519 this.destination.next(window);
34520 var closingNotifier;
34521 try {
34522 var closingSelector = this.closingSelector;
34523 closingNotifier = closingSelector();
34524 }
34525 catch (e) {
34526 this.destination.error(e);
34527 this.window.error(e);
34528 return;
34529 }
34530 this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
34531 };
34532 return WindowSubscriber;
34533}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
34534//# sourceMappingURL=windowWhen.js.map
34535
34536
34537/***/ }),
34538/* 364 */
34539/***/ (function(module, __webpack_exports__, __webpack_require__) {
34540
34541"use strict";
34542__webpack_require__.r(__webpack_exports__);
34543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
34544/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34545/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
34546/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
34547/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34548
34549
34550
34551function withLatestFrom() {
34552 var args = [];
34553 for (var _i = 0; _i < arguments.length; _i++) {
34554 args[_i] = arguments[_i];
34555 }
34556 return function (source) {
34557 var project;
34558 if (typeof args[args.length - 1] === 'function') {
34559 project = args.pop();
34560 }
34561 var observables = args;
34562 return source.lift(new WithLatestFromOperator(observables, project));
34563 };
34564}
34565var WithLatestFromOperator = /*@__PURE__*/ (function () {
34566 function WithLatestFromOperator(observables, project) {
34567 this.observables = observables;
34568 this.project = project;
34569 }
34570 WithLatestFromOperator.prototype.call = function (subscriber, source) {
34571 return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
34572 };
34573 return WithLatestFromOperator;
34574}());
34575var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
34576 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WithLatestFromSubscriber, _super);
34577 function WithLatestFromSubscriber(destination, observables, project) {
34578 var _this = _super.call(this, destination) || this;
34579 _this.observables = observables;
34580 _this.project = project;
34581 _this.toRespond = [];
34582 var len = observables.length;
34583 _this.values = new Array(len);
34584 for (var i = 0; i < len; i++) {
34585 _this.toRespond.push(i);
34586 }
34587 for (var i = 0; i < len; i++) {
34588 var observable = observables[i];
34589 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, observable, observable, i));
34590 }
34591 return _this;
34592 }
34593 WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34594 this.values[outerIndex] = innerValue;
34595 var toRespond = this.toRespond;
34596 if (toRespond.length > 0) {
34597 var found = toRespond.indexOf(outerIndex);
34598 if (found !== -1) {
34599 toRespond.splice(found, 1);
34600 }
34601 }
34602 };
34603 WithLatestFromSubscriber.prototype.notifyComplete = function () {
34604 };
34605 WithLatestFromSubscriber.prototype._next = function (value) {
34606 if (this.toRespond.length === 0) {
34607 var args = [value].concat(this.values);
34608 if (this.project) {
34609 this._tryProject(args);
34610 }
34611 else {
34612 this.destination.next(args);
34613 }
34614 }
34615 };
34616 WithLatestFromSubscriber.prototype._tryProject = function (args) {
34617 var result;
34618 try {
34619 result = this.project.apply(this, args);
34620 }
34621 catch (err) {
34622 this.destination.error(err);
34623 return;
34624 }
34625 this.destination.next(result);
34626 };
34627 return WithLatestFromSubscriber;
34628}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
34629//# sourceMappingURL=withLatestFrom.js.map
34630
34631
34632/***/ }),
34633/* 365 */
34634/***/ (function(module, __webpack_exports__, __webpack_require__) {
34635
34636"use strict";
34637__webpack_require__.r(__webpack_exports__);
34638/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
34639/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(267);
34640/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
34641
34642function zip() {
34643 var observables = [];
34644 for (var _i = 0; _i < arguments.length; _i++) {
34645 observables[_i] = arguments[_i];
34646 }
34647 return function zipOperatorFunction(source) {
34648 return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"].apply(void 0, [source].concat(observables)));
34649 };
34650}
34651//# sourceMappingURL=zip.js.map
34652
34653
34654/***/ }),
34655/* 366 */
34656/***/ (function(module, __webpack_exports__, __webpack_require__) {
34657
34658"use strict";
34659__webpack_require__.r(__webpack_exports__);
34660/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
34661/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(267);
34662/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
34663
34664function zipAll(project) {
34665 return function (source) { return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); };
34666}
34667//# sourceMappingURL=zipAll.js.map
34668
34669
34670/***/ }),
34671/* 367 */,
34672/* 368 */,
34673/* 369 */,
34674/* 370 */
34675/***/ (function(module, exports, __webpack_require__) {
34676
34677"use strict";
34678
34679var __importDefault = (this && this.__importDefault) || function (mod) {
34680 return (mod && mod.__esModule) ? mod : { "default": mod };
34681};
34682Object.defineProperty(exports, "__esModule", { value: true });
34683var fast_glob_1 = __importDefault(__webpack_require__(60));
34684var os_1 = __importDefault(__webpack_require__(14));
34685var path_1 = __webpack_require__(13);
34686var rxjs_1 = __webpack_require__(166);
34687var operators_1 = __webpack_require__(269);
34688var vscode_uri_1 = __webpack_require__(149);
34689var fs_1 = __webpack_require__(40);
34690var constant_1 = __webpack_require__(44);
34691var util_1 = __webpack_require__(46);
34692var indexes = {};
34693var indexesFiles = {};
34694var queue = [];
34695var source$;
34696var gap = 100;
34697var count = 3;
34698var customProjectRootPatterns = constant_1.projectRootPatterns;
34699function initSource() {
34700 if (source$) {
34701 return;
34702 }
34703 source$ = new rxjs_1.Subject();
34704 source$.pipe(operators_1.concatMap(function (uri) {
34705 return rxjs_1.from(util_1.findProjectRoot(vscode_uri_1.URI.parse(uri).fsPath, customProjectRootPatterns)).pipe(operators_1.switchMap(function (projectRoot) {
34706 return rxjs_1.from(util_1.getRealPath(projectRoot));
34707 }), operators_1.filter(function (projectRoot) { return projectRoot && projectRoot !== os_1.default.homedir(); }), operators_1.map(function (projectRoot) { return ({
34708 uri: uri,
34709 projectRoot: projectRoot,
34710 }); }));
34711 }), operators_1.filter(function (_a) {
34712 var projectRoot = _a.projectRoot;
34713 if (!indexes[projectRoot]) {
34714 indexes[projectRoot] = true;
34715 return true;
34716 }
34717 return false;
34718 }), operators_1.concatMap(function (_a) {
34719 var projectRoot = _a.projectRoot;
34720 var indexPath = path_1.join(projectRoot, "**/*.vim");
34721 return rxjs_1.from(fast_glob_1.default([indexPath, "!**/node_modules/**"])).pipe(operators_1.catchError(function (error) {
34722 process.send({
34723 msglog: [
34724 "Index Workspace Error: " + indexPath,
34725 "Error => " + (error.stack || error.message || error),
34726 ].join("\n"),
34727 });
34728 return rxjs_1.of(undefined);
34729 }), operators_1.filter(function (list) { return list && list.length > 0; }), operators_1.concatMap(function (list) {
34730 return rxjs_1.of.apply(void 0, list.sort(function (a, b) { return a.length - b.length; })).pipe(operators_1.filter(function (fpath) {
34731 if (!indexesFiles[fpath]) {
34732 indexesFiles[fpath] = true;
34733 return true;
34734 }
34735 return false;
34736 }), operators_1.mergeMap(function (fpath) {
34737 return rxjs_1.timer(gap).pipe(operators_1.concatMap(function () {
34738 var content = fs_1.readFileSync(fpath).toString();
34739 return rxjs_1.from(util_1.handleParse(content)).pipe(operators_1.filter(function (res) { return res[0] !== null; }), operators_1.map(function (res) { return ({
34740 node: res[0],
34741 uri: vscode_uri_1.URI.file(fpath).toString(),
34742 }); }), operators_1.catchError(function (error) {
34743 process.send({
34744 msglog: fpath + ":\n" + (error.stack || error.message || error),
34745 });
34746 return rxjs_1.of(undefined);
34747 }));
34748 }));
34749 }, count));
34750 }));
34751 }), operators_1.filter(function (res) { return !!res; })).subscribe(function (res) {
34752 process.send({
34753 data: res,
34754 });
34755 }, function (error) {
34756 process.send({
34757 msglog: error.stack || error.message || error,
34758 });
34759 });
34760 if (queue.length) {
34761 queue.forEach(function (uri) {
34762 source$.next(uri);
34763 });
34764 queue = [];
34765 }
34766}
34767process.on("message", function (mess) {
34768 var uri = mess.uri, config = mess.config;
34769 if (uri) {
34770 if (source$) {
34771 source$.next(uri);
34772 }
34773 else {
34774 queue.push(uri);
34775 }
34776 }
34777 if (config) {
34778 if (config.gap !== undefined) {
34779 gap = config.gap;
34780 }
34781 if (config.count !== undefined) {
34782 count = config.count;
34783 }
34784 if (config.projectRootPatterns !== undefined) {
34785 customProjectRootPatterns = config.projectRootPatterns;
34786 }
34787 initSource();
34788 }
34789});
34790
34791
34792/***/ })
34793/******/ ])));
\No newline at end of file