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 = 369);
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/* 47 */
7156/***/ (function(module, exports, __webpack_require__) {
7157
7158"use strict";
7159
7160var __assign = (this && this.__assign) || function () {
7161 __assign = Object.assign || function(t) {
7162 for (var s, i = 1, n = arguments.length; i < n; i++) {
7163 s = arguments[i];
7164 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7165 t[p] = s[p];
7166 }
7167 return t;
7168 };
7169 return __assign.apply(this, arguments);
7170};
7171var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7172 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7173 return new (P || (P = Promise))(function (resolve, reject) {
7174 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7175 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7176 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7177 step((generator = generator.apply(thisArg, _arguments || [])).next());
7178 });
7179};
7180var __generator = (this && this.__generator) || function (thisArg, body) {
7181 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
7182 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
7183 function verb(n) { return function (v) { return step([n, v]); }; }
7184 function step(op) {
7185 if (f) throw new TypeError("Generator is already executing.");
7186 while (_) try {
7187 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;
7188 if (y = 0, t) op = [op[0] & 2, t.value];
7189 switch (op[0]) {
7190 case 0: case 1: t = op; break;
7191 case 4: _.label++; return { value: op[1], done: false };
7192 case 5: _.label++; y = op[1]; op = [0]; continue;
7193 case 7: op = _.ops.pop(); _.trys.pop(); continue;
7194 default:
7195 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
7196 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
7197 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
7198 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
7199 if (t[2]) _.ops.pop();
7200 _.trys.pop(); continue;
7201 }
7202 op = body.call(thisArg, _);
7203 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
7204 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7205 }
7206};
7207var __spreadArrays = (this && this.__spreadArrays) || function () {
7208 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
7209 for (var r = Array(s), k = 0, i = 0; i < il; i++)
7210 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
7211 r[k] = a[j];
7212 return r;
7213};
7214var __importDefault = (this && this.__importDefault) || function (mod) {
7215 return (mod && mod.__esModule) ? mod : { "default": mod };
7216};
7217Object.defineProperty(exports, "__esModule", { value: true });
7218var child_process_1 = __webpack_require__(41);
7219var findup_1 = __importDefault(__webpack_require__(48));
7220var fs_1 = __importDefault(__webpack_require__(40));
7221var path_1 = __importDefault(__webpack_require__(13));
7222var vscode_languageserver_1 = __webpack_require__(2);
7223var vimparser_1 = __webpack_require__(53);
7224var patterns_1 = __webpack_require__(55);
7225function isSomeMatchPattern(patterns, line) {
7226 return patterns.some(function (p) { return p.test(line); });
7227}
7228exports.isSomeMatchPattern = isSomeMatchPattern;
7229function executeFile(input, command, args, option) {
7230 return new Promise(function (resolve, reject) {
7231 var stdout = "";
7232 var stderr = "";
7233 var error;
7234 var isPassAsText = false;
7235 args = (args || []).map(function (arg) {
7236 if (/%text/.test(arg)) {
7237 isPassAsText = true;
7238 return arg.replace(/%text/g, input.toString());
7239 }
7240 return arg;
7241 });
7242 var cp = child_process_1.spawn(command, args, option);
7243 cp.stdout.on("data", function (data) {
7244 stdout += data;
7245 });
7246 cp.stderr.on("data", function (data) {
7247 stderr += data;
7248 });
7249 cp.on("error", function (err) {
7250 error = err;
7251 reject(error);
7252 });
7253 cp.on("close", function (code) {
7254 if (!error) {
7255 resolve({ code: code, stdout: stdout, stderr: stderr });
7256 }
7257 });
7258 // error will occur when cp get error
7259 if (!isPassAsText) {
7260 input.pipe(cp.stdin).on("error", function () { return; });
7261 }
7262 });
7263}
7264exports.executeFile = executeFile;
7265// cover cb type async function to promise
7266function pcb(cb) {
7267 return function () {
7268 var args = [];
7269 for (var _i = 0; _i < arguments.length; _i++) {
7270 args[_i] = arguments[_i];
7271 }
7272 return new Promise(function (resolve) {
7273 cb.apply(void 0, __spreadArrays(args, [function () {
7274 var params = [];
7275 for (var _i = 0; _i < arguments.length; _i++) {
7276 params[_i] = arguments[_i];
7277 }
7278 resolve(params);
7279 }]));
7280 });
7281 };
7282}
7283exports.pcb = pcb;
7284// find work dirname by root patterns
7285function findProjectRoot(filePath, rootPatterns) {
7286 return __awaiter(this, void 0, void 0, function () {
7287 var dirname, patterns, dirCandidate, _i, patterns_2, pattern, _a, err, dir;
7288 return __generator(this, function (_b) {
7289 switch (_b.label) {
7290 case 0:
7291 dirname = path_1.default.dirname(filePath);
7292 patterns = [].concat(rootPatterns);
7293 dirCandidate = "";
7294 _i = 0, patterns_2 = patterns;
7295 _b.label = 1;
7296 case 1:
7297 if (!(_i < patterns_2.length)) return [3 /*break*/, 4];
7298 pattern = patterns_2[_i];
7299 return [4 /*yield*/, pcb(findup_1.default)(dirname, pattern)];
7300 case 2:
7301 _a = _b.sent(), err = _a[0], dir = _a[1];
7302 if (!err && dir && dir !== "/" && dir.length > dirCandidate.length) {
7303 dirCandidate = dir;
7304 }
7305 _b.label = 3;
7306 case 3:
7307 _i++;
7308 return [3 /*break*/, 1];
7309 case 4:
7310 if (dirCandidate.length) {
7311 return [2 /*return*/, dirCandidate];
7312 }
7313 return [2 /*return*/, dirname];
7314 }
7315 });
7316 });
7317}
7318exports.findProjectRoot = findProjectRoot;
7319function markupSnippets(snippets) {
7320 return [
7321 "```vim",
7322 snippets.replace(/\$\{[0-9]+(:([^}]+))?\}/g, "$2"),
7323 "```",
7324 ].join("\n");
7325}
7326exports.markupSnippets = markupSnippets;
7327function getWordFromPosition(doc, position) {
7328 if (!doc) {
7329 return;
7330 }
7331 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)));
7332 // not keyword position
7333 if (!character || !patterns_1.keywordPattern.test(character)) {
7334 return;
7335 }
7336 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)));
7337 // comment line
7338 if (patterns_1.commentPattern.test(currentLine)) {
7339 return;
7340 }
7341 var preSegment = currentLine.slice(0, position.character);
7342 var nextSegment = currentLine.slice(position.character);
7343 var wordLeft = preSegment.match(patterns_1.wordPrePattern);
7344 var wordRight = nextSegment.match(patterns_1.wordNextPattern);
7345 var word = "" + (wordLeft && wordLeft[1] || "") + (wordRight && wordRight[1] || "");
7346 return {
7347 word: word,
7348 left: wordLeft && wordLeft[1] || "",
7349 right: wordRight && wordRight[1] || "",
7350 wordLeft: wordLeft && wordLeft[1]
7351 ? preSegment.replace(new RegExp(wordLeft[1] + "$"), word)
7352 : "" + preSegment + word,
7353 wordRight: wordRight && wordRight[1]
7354 ? nextSegment.replace(new RegExp("^" + wordRight[1]), word)
7355 : "" + word + nextSegment,
7356 };
7357}
7358exports.getWordFromPosition = getWordFromPosition;
7359// parse vim buffer
7360function handleParse(textDoc) {
7361 return __awaiter(this, void 0, void 0, function () {
7362 var text, tokens, node;
7363 return __generator(this, function (_a) {
7364 text = textDoc instanceof Object ? textDoc.getText() : textDoc;
7365 tokens = new vimparser_1.StringReader(text.split(/\r\n|\r|\n/));
7366 try {
7367 node = new vimparser_1.VimLParser(true).parse(tokens);
7368 return [2 /*return*/, [node, ""]];
7369 }
7370 catch (error) {
7371 return [2 /*return*/, [null, error]];
7372 }
7373 return [2 /*return*/];
7374 });
7375 });
7376}
7377exports.handleParse = handleParse;
7378// remove snippets of completionItem
7379function removeSnippets(completionItems) {
7380 if (completionItems === void 0) { completionItems = []; }
7381 return completionItems.map(function (item) {
7382 if (item.insertTextFormat === vscode_languageserver_1.InsertTextFormat.Snippet) {
7383 return __assign(__assign({}, item), { insertText: item.label, insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText });
7384 }
7385 return item;
7386 });
7387}
7388exports.removeSnippets = removeSnippets;
7389exports.isSymbolLink = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
7390 return __generator(this, function (_a) {
7391 return [2 /*return*/, new Promise(function (resolve) {
7392 fs_1.default.lstat(filePath, function (err, stats) {
7393 resolve({
7394 err: err,
7395 stats: stats && stats.isSymbolicLink(),
7396 });
7397 });
7398 })];
7399 });
7400}); };
7401exports.getRealPath = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
7402 var _a, err, stats;
7403 return __generator(this, function (_b) {
7404 switch (_b.label) {
7405 case 0: return [4 /*yield*/, exports.isSymbolLink(filePath)];
7406 case 1:
7407 _a = _b.sent(), err = _a.err, stats = _a.stats;
7408 if (!err && stats) {
7409 return [2 /*return*/, new Promise(function (resolve) {
7410 fs_1.default.realpath(filePath, function (error, realPath) {
7411 if (error) {
7412 return resolve(filePath);
7413 }
7414 resolve(realPath);
7415 });
7416 })];
7417 }
7418 return [2 /*return*/, filePath];
7419 }
7420 });
7421}); };
7422
7423
7424/***/ }),
7425/* 48 */
7426/***/ (function(module, exports, __webpack_require__) {
7427
7428var fs = __webpack_require__(40),
7429 Path = __webpack_require__(13),
7430 util = __webpack_require__(49),
7431 colors = __webpack_require__(50),
7432 EE = __webpack_require__(52).EventEmitter,
7433 fsExists = fs.exists ? fs.exists : Path.exists,
7434 fsExistsSync = fs.existsSync ? fs.existsSync : Path.existsSync;
7435
7436module.exports = function(dir, iterator, options, callback){
7437 return FindUp(dir, iterator, options, callback);
7438};
7439
7440function FindUp(dir, iterator, options, callback){
7441 if (!(this instanceof FindUp)) {
7442 return new FindUp(dir, iterator, options, callback);
7443 }
7444 if(typeof options === 'function'){
7445 callback = options;
7446 options = {};
7447 }
7448 options = options || {};
7449
7450 EE.call(this);
7451 this.found = false;
7452 this.stopPlease = false;
7453 var self = this;
7454
7455 if(typeof iterator === 'string'){
7456 var file = iterator;
7457 iterator = function(dir, cb){
7458 return fsExists(Path.join(dir, file), cb);
7459 };
7460 }
7461
7462 if(callback) {
7463 this.on('found', function(dir){
7464 if(options.verbose) console.log(('found '+ dir ).green);
7465 callback(null, dir);
7466 self.stop();
7467 });
7468
7469 this.on('end', function(){
7470 if(options.verbose) console.log('end'.grey);
7471 if(!self.found) callback(new Error('not found'));
7472 });
7473
7474 this.on('error', function(err){
7475 if(options.verbose) console.log('error'.red, err);
7476 callback(err);
7477 });
7478 }
7479
7480 this._find(dir, iterator, options, callback);
7481}
7482util.inherits(FindUp, EE);
7483
7484FindUp.prototype._find = function(dir, iterator, options, callback){
7485 var self = this;
7486
7487 iterator(dir, function(exists){
7488 if(options.verbose) console.log(('traverse '+ dir).grey);
7489 if(exists) {
7490 self.found = true;
7491 self.emit('found', dir);
7492 }
7493
7494 var parentDir = Path.join(dir, '..');
7495 if (self.stopPlease) return self.emit('end');
7496 if (dir === parentDir) return self.emit('end');
7497 if(dir.indexOf('../../') !== -1 ) return self.emit('error', new Error(dir + ' is not correct.'));
7498 self._find(parentDir, iterator, options, callback);
7499 });
7500};
7501
7502FindUp.prototype.stop = function(){
7503 this.stopPlease = true;
7504};
7505
7506module.exports.FindUp = FindUp;
7507
7508module.exports.sync = function(dir, iteratorSync){
7509 if(typeof iteratorSync === 'string'){
7510 var file = iteratorSync;
7511 iteratorSync = function(dir){
7512 return fsExistsSync(Path.join(dir, file));
7513 };
7514 }
7515 var initialDir = dir;
7516 while(dir !== Path.join(dir, '..')){
7517 if(dir.indexOf('../../') !== -1 ) throw new Error(initialDir + ' is not correct.');
7518 if(iteratorSync(dir)) return dir;
7519 dir = Path.join(dir, '..');
7520 }
7521 throw new Error('not found');
7522};
7523
7524
7525/***/ }),
7526/* 49 */
7527/***/ (function(module, exports) {
7528
7529module.exports = require("util");
7530
7531/***/ }),
7532/* 50 */
7533/***/ (function(module, exports, __webpack_require__) {
7534
7535/*
7536colors.js
7537
7538Copyright (c) 2010
7539
7540Marak Squires
7541Alexis Sellier (cloudhead)
7542
7543Permission is hereby granted, free of charge, to any person obtaining a copy
7544of this software and associated documentation files (the "Software"), to deal
7545in the Software without restriction, including without limitation the rights
7546to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7547copies of the Software, and to permit persons to whom the Software is
7548furnished to do so, subject to the following conditions:
7549
7550The above copyright notice and this permission notice shall be included in
7551all copies or substantial portions of the Software.
7552
7553THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7554IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7555FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7556AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7557LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
7558OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
7559THE SOFTWARE.
7560
7561*/
7562
7563var isHeadless = false;
7564
7565if (typeof module !== 'undefined') {
7566 isHeadless = true;
7567}
7568
7569if (!isHeadless) {
7570 var exports = {};
7571 var module = {};
7572 var colors = exports;
7573 exports.mode = "browser";
7574} else {
7575 exports.mode = "console";
7576}
7577
7578//
7579// Prototypes the string object to have additional method calls that add terminal colors
7580//
7581var addProperty = function (color, func) {
7582 exports[color] = function (str) {
7583 return func.apply(str);
7584 };
7585 String.prototype.__defineGetter__(color, func);
7586};
7587
7588function stylize(str, style) {
7589
7590 var styles;
7591
7592 if (exports.mode === 'console') {
7593 styles = {
7594 //styles
7595 'bold' : ['\x1B[1m', '\x1B[22m'],
7596 'italic' : ['\x1B[3m', '\x1B[23m'],
7597 'underline' : ['\x1B[4m', '\x1B[24m'],
7598 'inverse' : ['\x1B[7m', '\x1B[27m'],
7599 'strikethrough' : ['\x1B[9m', '\x1B[29m'],
7600 //text colors
7601 //grayscale
7602 'white' : ['\x1B[37m', '\x1B[39m'],
7603 'grey' : ['\x1B[90m', '\x1B[39m'],
7604 'black' : ['\x1B[30m', '\x1B[39m'],
7605 //colors
7606 'blue' : ['\x1B[34m', '\x1B[39m'],
7607 'cyan' : ['\x1B[36m', '\x1B[39m'],
7608 'green' : ['\x1B[32m', '\x1B[39m'],
7609 'magenta' : ['\x1B[35m', '\x1B[39m'],
7610 'red' : ['\x1B[31m', '\x1B[39m'],
7611 'yellow' : ['\x1B[33m', '\x1B[39m'],
7612 //background colors
7613 //grayscale
7614 'whiteBG' : ['\x1B[47m', '\x1B[49m'],
7615 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'],
7616 'blackBG' : ['\x1B[40m', '\x1B[49m'],
7617 //colors
7618 'blueBG' : ['\x1B[44m', '\x1B[49m'],
7619 'cyanBG' : ['\x1B[46m', '\x1B[49m'],
7620 'greenBG' : ['\x1B[42m', '\x1B[49m'],
7621 'magentaBG' : ['\x1B[45m', '\x1B[49m'],
7622 'redBG' : ['\x1B[41m', '\x1B[49m'],
7623 'yellowBG' : ['\x1B[43m', '\x1B[49m']
7624 };
7625 } else if (exports.mode === 'browser') {
7626 styles = {
7627 //styles
7628 'bold' : ['<b>', '</b>'],
7629 'italic' : ['<i>', '</i>'],
7630 'underline' : ['<u>', '</u>'],
7631 'inverse' : ['<span style="background-color:black;color:white;">', '</span>'],
7632 'strikethrough' : ['<del>', '</del>'],
7633 //text colors
7634 //grayscale
7635 'white' : ['<span style="color:white;">', '</span>'],
7636 'grey' : ['<span style="color:gray;">', '</span>'],
7637 'black' : ['<span style="color:black;">', '</span>'],
7638 //colors
7639 'blue' : ['<span style="color:blue;">', '</span>'],
7640 'cyan' : ['<span style="color:cyan;">', '</span>'],
7641 'green' : ['<span style="color:green;">', '</span>'],
7642 'magenta' : ['<span style="color:magenta;">', '</span>'],
7643 'red' : ['<span style="color:red;">', '</span>'],
7644 'yellow' : ['<span style="color:yellow;">', '</span>'],
7645 //background colors
7646 //grayscale
7647 'whiteBG' : ['<span style="background-color:white;">', '</span>'],
7648 'greyBG' : ['<span style="background-color:gray;">', '</span>'],
7649 'blackBG' : ['<span style="background-color:black;">', '</span>'],
7650 //colors
7651 'blueBG' : ['<span style="background-color:blue;">', '</span>'],
7652 'cyanBG' : ['<span style="background-color:cyan;">', '</span>'],
7653 'greenBG' : ['<span style="background-color:green;">', '</span>'],
7654 'magentaBG' : ['<span style="background-color:magenta;">', '</span>'],
7655 'redBG' : ['<span style="background-color:red;">', '</span>'],
7656 'yellowBG' : ['<span style="background-color:yellow;">', '</span>']
7657 };
7658 } else if (exports.mode === 'none') {
7659 return str + '';
7660 } else {
7661 console.log('unsupported mode, try "browser", "console" or "none"');
7662 }
7663 return styles[style][0] + str + styles[style][1];
7664}
7665
7666function applyTheme(theme) {
7667
7668 //
7669 // Remark: This is a list of methods that exist
7670 // on String that you should not overwrite.
7671 //
7672 var stringPrototypeBlacklist = [
7673 '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
7674 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
7675 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
7676 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
7677 ];
7678
7679 Object.keys(theme).forEach(function (prop) {
7680 if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
7681 console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
7682 }
7683 else {
7684 if (typeof(theme[prop]) === 'string') {
7685 addProperty(prop, function () {
7686 return exports[theme[prop]](this);
7687 });
7688 }
7689 else {
7690 addProperty(prop, function () {
7691 var ret = this;
7692 for (var t = 0; t < theme[prop].length; t++) {
7693 ret = exports[theme[prop][t]](ret);
7694 }
7695 return ret;
7696 });
7697 }
7698 }
7699 });
7700}
7701
7702
7703//
7704// Iterate through all default styles and colors
7705//
7706var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG'];
7707x.forEach(function (style) {
7708
7709 // __defineGetter__ at the least works in more browsers
7710 // http://robertnyman.com/javascript/javascript-getters-setters.html
7711 // Object.defineProperty only works in Chrome
7712 addProperty(style, function () {
7713 return stylize(this, style);
7714 });
7715});
7716
7717function sequencer(map) {
7718 return function () {
7719 if (!isHeadless) {
7720 return this.replace(/( )/, '$1');
7721 }
7722 var exploded = this.split(""), i = 0;
7723 exploded = exploded.map(map);
7724 return exploded.join("");
7725 };
7726}
7727
7728var rainbowMap = (function () {
7729 var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
7730 return function (letter, i, exploded) {
7731 if (letter === " ") {
7732 return letter;
7733 } else {
7734 return stylize(letter, rainbowColors[i++ % rainbowColors.length]);
7735 }
7736 };
7737})();
7738
7739exports.themes = {};
7740
7741exports.addSequencer = function (name, map) {
7742 addProperty(name, sequencer(map));
7743};
7744
7745exports.addSequencer('rainbow', rainbowMap);
7746exports.addSequencer('zebra', function (letter, i, exploded) {
7747 return i % 2 === 0 ? letter : letter.inverse;
7748});
7749
7750exports.setTheme = function (theme) {
7751 if (typeof theme === 'string') {
7752 try {
7753 exports.themes[theme] = __webpack_require__(51)(theme);
7754 applyTheme(exports.themes[theme]);
7755 return exports.themes[theme];
7756 } catch (err) {
7757 console.log(err);
7758 return err;
7759 }
7760 } else {
7761 applyTheme(theme);
7762 }
7763};
7764
7765
7766addProperty('stripColors', function () {
7767 return ("" + this).replace(/\x1B\[\d+m/g, '');
7768});
7769
7770// please no
7771function zalgo(text, options) {
7772 var soul = {
7773 "up" : [
7774 '̍', '̎', '̄', '̅',
7775 '̿', '̑', '̆', '̐',
7776 '͒', '͗', '͑', '̇',
7777 '̈', '̊', '͂', '̓',
7778 '̈', '͊', '͋', '͌',
7779 '̃', '̂', '̌', '͐',
7780 '̀', '́', '̋', '̏',
7781 '̒', '̓', '̔', '̽',
7782 '̉', 'ͣ', 'ͤ', 'ͥ',
7783 'ͦ', 'ͧ', 'ͨ', 'ͩ',
7784 'ͪ', 'ͫ', 'ͬ', 'ͭ',
7785 'ͮ', 'ͯ', '̾', '͛',
7786 '͆', '̚'
7787 ],
7788 "down" : [
7789 '̖', '̗', '̘', '̙',
7790 '̜', '̝', '̞', '̟',
7791 '̠', '̤', '̥', '̦',
7792 '̩', '̪', '̫', '̬',
7793 '̭', '̮', '̯', '̰',
7794 '̱', '̲', '̳', '̹',
7795 '̺', '̻', '̼', 'ͅ',
7796 '͇', '͈', '͉', '͍',
7797 '͎', '͓', '͔', '͕',
7798 '͖', '͙', '͚', '̣'
7799 ],
7800 "mid" : [
7801 '̕', '̛', '̀', '́',
7802 '͘', '̡', '̢', '̧',
7803 '̨', '̴', '̵', '̶',
7804 '͜', '͝', '͞',
7805 '͟', '͠', '͢', '̸',
7806 '̷', '͡', ' ҉'
7807 ]
7808 },
7809 all = [].concat(soul.up, soul.down, soul.mid),
7810 zalgo = {};
7811
7812 function randomNumber(range) {
7813 var r = Math.floor(Math.random() * range);
7814 return r;
7815 }
7816
7817 function is_char(character) {
7818 var bool = false;
7819 all.filter(function (i) {
7820 bool = (i === character);
7821 });
7822 return bool;
7823 }
7824
7825 function heComes(text, options) {
7826 var result = '', counts, l;
7827 options = options || {};
7828 options["up"] = options["up"] || true;
7829 options["mid"] = options["mid"] || true;
7830 options["down"] = options["down"] || true;
7831 options["size"] = options["size"] || "maxi";
7832 text = text.split('');
7833 for (l in text) {
7834 if (is_char(l)) {
7835 continue;
7836 }
7837 result = result + text[l];
7838 counts = {"up" : 0, "down" : 0, "mid" : 0};
7839 switch (options.size) {
7840 case 'mini':
7841 counts.up = randomNumber(8);
7842 counts.min = randomNumber(2);
7843 counts.down = randomNumber(8);
7844 break;
7845 case 'maxi':
7846 counts.up = randomNumber(16) + 3;
7847 counts.min = randomNumber(4) + 1;
7848 counts.down = randomNumber(64) + 3;
7849 break;
7850 default:
7851 counts.up = randomNumber(8) + 1;
7852 counts.mid = randomNumber(6) / 2;
7853 counts.down = randomNumber(8) + 1;
7854 break;
7855 }
7856
7857 var arr = ["up", "mid", "down"];
7858 for (var d in arr) {
7859 var index = arr[d];
7860 for (var i = 0 ; i <= counts[index]; i++) {
7861 if (options[index]) {
7862 result = result + soul[index][randomNumber(soul[index].length)];
7863 }
7864 }
7865 }
7866 }
7867 return result;
7868 }
7869 return heComes(text);
7870}
7871
7872
7873// don't summon zalgo
7874addProperty('zalgo', function () {
7875 return zalgo(this);
7876});
7877
7878
7879/***/ }),
7880/* 51 */
7881/***/ (function(module, exports) {
7882
7883function webpackEmptyContext(req) {
7884 var e = new Error("Cannot find module '" + req + "'");
7885 e.code = 'MODULE_NOT_FOUND';
7886 throw e;
7887}
7888webpackEmptyContext.keys = function() { return []; };
7889webpackEmptyContext.resolve = webpackEmptyContext;
7890module.exports = webpackEmptyContext;
7891webpackEmptyContext.id = 51;
7892
7893/***/ }),
7894/* 52 */
7895/***/ (function(module, exports) {
7896
7897module.exports = require("events");
7898
7899/***/ }),
7900/* 53 */
7901/***/ (function(module, exports, __webpack_require__) {
7902
7903/* WEBPACK VAR INJECTION */(function(module) {//!/usr/bin/env nodejs
7904// usage: nodejs vimlparser.js [--neovim] foo.vim
7905
7906var fs = __webpack_require__(40);
7907var util = __webpack_require__(49);
7908
7909function main() {
7910 var neovim = false;
7911 var fpath = ''
7912 var args = process.argv;
7913 if (args.length == 4) {
7914 if (args[2] == '--neovim') {
7915 neovim = true;
7916 }
7917 fpath = args[3];
7918 } else if (args.length == 3) {
7919 neovim = false;
7920 fpath = args[2]
7921 }
7922 var r = new StringReader(viml_readfile(fpath));
7923 var p = new VimLParser(neovim);
7924 var c = new Compiler();
7925 try {
7926 var lines = c.compile(p.parse(r));
7927 for (var i in lines) {
7928 process.stdout.write(lines[i] + "\n");
7929 }
7930 } catch (e) {
7931 process.stdout.write(e + '\n');
7932 }
7933}
7934
7935var pat_vim2js = {
7936 "[0-9a-zA-Z]" : "[0-9a-zA-Z]",
7937 "[@*!=><&~#]" : "[@*!=><&~#]",
7938 "\\<ARGOPT\\>" : "\\bARGOPT\\b",
7939 "\\<BANG\\>" : "\\bBANG\\b",
7940 "\\<EDITCMD\\>" : "\\bEDITCMD\\b",
7941 "\\<NOTRLCOM\\>" : "\\bNOTRLCOM\\b",
7942 "\\<TRLBAR\\>" : "\\bTRLBAR\\b",
7943 "\\<USECTRLV\\>" : "\\bUSECTRLV\\b",
7944 "\\<USERCMD\\>" : "\\bUSERCMD\\b",
7945 "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>" : "\\b(XFILE|FILES|FILE1)\\b",
7946 "\\S" : "\\S",
7947 "\\a" : "[A-Za-z]",
7948 "\\d" : "\\d",
7949 "\\h" : "[A-Za-z_]",
7950 "\\s" : "\\s",
7951 "\\v^d%[elete][lp]$" : "^d(elete|elet|ele|el|e)[lp]$",
7952 "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])" : "^s(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])",
7953 "\\w" : "[0-9A-Za-z_]",
7954 "\\w\\|[:#]" : "[0-9A-Za-z_]|[:#]",
7955 "\\x" : "[0-9A-Fa-f]",
7956 "^++" : "^\+\+",
7957 "^++bad=\\(keep\\|drop\\|.\\)\\>" : "^\\+\\+bad=(keep|drop|.)\\b",
7958 "^++bad=drop" : "^\\+\\+bad=drop",
7959 "^++bad=keep" : "^\\+\\+bad=keep",
7960 "^++bin\\>" : "^\\+\\+bin\\b",
7961 "^++edit\\>" : "^\\+\\+edit\\b",
7962 "^++enc=\\S" : "^\\+\\+enc=\\S",
7963 "^++encoding=\\S" : "^\\+\\+encoding=\\S",
7964 "^++ff=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+ff=(dos|unix|mac)\\b",
7965 "^++fileformat=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+fileformat=(dos|unix|mac)\\b",
7966 "^++nobin\\>" : "^\\+\\+nobin\\b",
7967 "^[A-Z]" : "^[A-Z]",
7968 "^\\$\\w\\+" : "^\\$[0-9A-Za-z_]+",
7969 "^\\(!\\|global\\|vglobal\\)$" : "^(!|global|vglobal)$",
7970 "^\\(WHILE\\|FOR\\)$" : "^(WHILE|FOR)$",
7971 "^\\(vimgrep\\|vimgrepadd\\|lvimgrep\\|lvimgrepadd\\)$" : "^(vimgrep|vimgrepadd|lvimgrep|lvimgrepadd)$",
7972 "^\\d" : "^\\d",
7973 "^\\h" : "^[A-Za-z_]",
7974 "^\\s" : "^\\s",
7975 "^\\s*\\\\" : "^\\s*\\\\",
7976 "^[ \\t]$" : "^[ \\t]$",
7977 "^[A-Za-z]$" : "^[A-Za-z]$",
7978 "^[0-9A-Za-z]$" : "^[0-9A-Za-z]$",
7979 "^[0-9]$" : "^[0-9]$",
7980 "^[0-9A-Fa-f]$" : "^[0-9A-Fa-f]$",
7981 "^[0-9A-Za-z_]$" : "^[0-9A-Za-z_]$",
7982 "^[A-Za-z_]$" : "^[A-Za-z_]$",
7983 "^[0-9A-Za-z_:#]$" : "^[0-9A-Za-z_:#]$",
7984 "^[A-Za-z_][0-9A-Za-z_]*$" : "^[A-Za-z_][0-9A-Za-z_]*$",
7985 "^[A-Z]$" : "^[A-Z]$",
7986 "^[a-z]$" : "^[a-z]$",
7987 "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$" : "^[vgslabwt]:$|^([vgslabwt]:)?[A-Za-z_][0-9A-Za-z_#]*$",
7988 "^[0-7]$" : "^[0-7]$",
7989 "^[0-9A-Fa-f][0-9A-Fa-f]$" : "^[0-9A-Fa-f][0-9A-Fa-f]$",
7990 "^\\.[0-9A-Fa-f]$" : "^\\.[0-9A-Fa-f]$",
7991 "^[0-9A-Fa-f][^0-9A-Fa-f]$" : "^[0-9A-Fa-f][^0-9A-Fa-f]$",
7992}
7993
7994function viml_add(lst, item) {
7995 lst.push(item);
7996}
7997
7998function viml_call(func, args) {
7999 return func.apply(null, args);
8000}
8001
8002function viml_char2nr(c) {
8003 return c.charCodeAt(0);
8004}
8005
8006function viml_empty(obj) {
8007 return obj.length == 0;
8008}
8009
8010function viml_equalci(a, b) {
8011 return a.toLowerCase() == b.toLowerCase();
8012}
8013
8014function viml_eqreg(s, reg) {
8015 var mx = new RegExp(pat_vim2js[reg]);
8016 return mx.exec(s) != null;
8017}
8018
8019function viml_eqregh(s, reg) {
8020 var mx = new RegExp(pat_vim2js[reg]);
8021 return mx.exec(s) != null;
8022}
8023
8024function viml_eqregq(s, reg) {
8025 var mx = new RegExp(pat_vim2js[reg], "i");
8026 return mx.exec(s) != null;
8027}
8028
8029function viml_escape(s, chars) {
8030 var r = '';
8031 for (var i = 0; i < s.length; ++i) {
8032 if (chars.indexOf(s.charAt(i)) != -1) {
8033 r = r + "\\" + s.charAt(i);
8034 } else {
8035 r = r + s.charAt(i);
8036 }
8037 }
8038 return r;
8039}
8040
8041function viml_extend(obj, item) {
8042 obj.push.apply(obj, item);
8043}
8044
8045function viml_insert(lst, item) {
8046 var idx = arguments.length >= 3 ? arguments[2] : 0;
8047 lst.splice(0, 0, item);
8048}
8049
8050function viml_join(lst, sep) {
8051 return lst.join(sep);
8052}
8053
8054function viml_keys(obj) {
8055 return Object.keys(obj);
8056}
8057
8058function viml_len(obj) {
8059 if (typeof obj === 'string') {
8060 var len = 0;
8061 for (var i = 0; i < obj.length; i++) {
8062 var c = obj.charCodeAt(i);
8063 len += c < 128 ? 1 : ((c > 127) && (c < 2048)) ? 2 : 3;
8064 }
8065 return len;
8066 }
8067 return obj.length;
8068}
8069
8070function viml_printf() {
8071 var a000 = Array.prototype.slice.call(arguments, 0);
8072 if (a000.length == 1) {
8073 return a000[0];
8074 } else {
8075 return util.format.apply(null, a000);
8076 }
8077}
8078
8079function viml_range(start) {
8080 var end = arguments.length >= 2 ? arguments[1] : null;
8081 if (end == null) {
8082 var x = [];
8083 for (var i = 0; i < start; ++i) {
8084 x.push(i);
8085 }
8086 return x;
8087 } else {
8088 var x = []
8089 for (var i = start; i <= end; ++i) {
8090 x.push(i);
8091 }
8092 return x;
8093 }
8094}
8095
8096function viml_readfile(path) {
8097 // FIXME: newline?
8098 return fs.readFileSync(path, 'utf-8').split(/\r\n|\r|\n/);
8099}
8100
8101function viml_remove(lst, idx) {
8102 lst.splice(idx, 1);
8103}
8104
8105function viml_split(s, sep) {
8106 if (sep == "\\zs") {
8107 return s.split("");
8108 }
8109 throw "NotImplemented";
8110}
8111
8112function viml_str2nr(s) {
8113 var base = arguments.length >= 2 ? arguments[1] : 10;
8114 return parseInt(s, base);
8115}
8116
8117function viml_string(obj) {
8118 return obj.toString();
8119}
8120
8121function viml_has_key(obj, key) {
8122 return obj[key] !== undefined;
8123}
8124
8125function viml_stridx(a, b) {
8126 return a.indexOf(b);
8127}
8128
8129var NIL = [];
8130var TRUE = 1;
8131var FALSE = 0;
8132var NODE_TOPLEVEL = 1;
8133var NODE_COMMENT = 2;
8134var NODE_EXCMD = 3;
8135var NODE_FUNCTION = 4;
8136var NODE_ENDFUNCTION = 5;
8137var NODE_DELFUNCTION = 6;
8138var NODE_RETURN = 7;
8139var NODE_EXCALL = 8;
8140var NODE_LET = 9;
8141var NODE_UNLET = 10;
8142var NODE_LOCKVAR = 11;
8143var NODE_UNLOCKVAR = 12;
8144var NODE_IF = 13;
8145var NODE_ELSEIF = 14;
8146var NODE_ELSE = 15;
8147var NODE_ENDIF = 16;
8148var NODE_WHILE = 17;
8149var NODE_ENDWHILE = 18;
8150var NODE_FOR = 19;
8151var NODE_ENDFOR = 20;
8152var NODE_CONTINUE = 21;
8153var NODE_BREAK = 22;
8154var NODE_TRY = 23;
8155var NODE_CATCH = 24;
8156var NODE_FINALLY = 25;
8157var NODE_ENDTRY = 26;
8158var NODE_THROW = 27;
8159var NODE_ECHO = 28;
8160var NODE_ECHON = 29;
8161var NODE_ECHOHL = 30;
8162var NODE_ECHOMSG = 31;
8163var NODE_ECHOERR = 32;
8164var NODE_EXECUTE = 33;
8165var NODE_TERNARY = 34;
8166var NODE_OR = 35;
8167var NODE_AND = 36;
8168var NODE_EQUAL = 37;
8169var NODE_EQUALCI = 38;
8170var NODE_EQUALCS = 39;
8171var NODE_NEQUAL = 40;
8172var NODE_NEQUALCI = 41;
8173var NODE_NEQUALCS = 42;
8174var NODE_GREATER = 43;
8175var NODE_GREATERCI = 44;
8176var NODE_GREATERCS = 45;
8177var NODE_GEQUAL = 46;
8178var NODE_GEQUALCI = 47;
8179var NODE_GEQUALCS = 48;
8180var NODE_SMALLER = 49;
8181var NODE_SMALLERCI = 50;
8182var NODE_SMALLERCS = 51;
8183var NODE_SEQUAL = 52;
8184var NODE_SEQUALCI = 53;
8185var NODE_SEQUALCS = 54;
8186var NODE_MATCH = 55;
8187var NODE_MATCHCI = 56;
8188var NODE_MATCHCS = 57;
8189var NODE_NOMATCH = 58;
8190var NODE_NOMATCHCI = 59;
8191var NODE_NOMATCHCS = 60;
8192var NODE_IS = 61;
8193var NODE_ISCI = 62;
8194var NODE_ISCS = 63;
8195var NODE_ISNOT = 64;
8196var NODE_ISNOTCI = 65;
8197var NODE_ISNOTCS = 66;
8198var NODE_ADD = 67;
8199var NODE_SUBTRACT = 68;
8200var NODE_CONCAT = 69;
8201var NODE_MULTIPLY = 70;
8202var NODE_DIVIDE = 71;
8203var NODE_REMAINDER = 72;
8204var NODE_NOT = 73;
8205var NODE_MINUS = 74;
8206var NODE_PLUS = 75;
8207var NODE_SUBSCRIPT = 76;
8208var NODE_SLICE = 77;
8209var NODE_CALL = 78;
8210var NODE_DOT = 79;
8211var NODE_NUMBER = 80;
8212var NODE_STRING = 81;
8213var NODE_LIST = 82;
8214var NODE_DICT = 83;
8215var NODE_OPTION = 85;
8216var NODE_IDENTIFIER = 86;
8217var NODE_CURLYNAME = 87;
8218var NODE_ENV = 88;
8219var NODE_REG = 89;
8220var NODE_CURLYNAMEPART = 90;
8221var NODE_CURLYNAMEEXPR = 91;
8222var NODE_LAMBDA = 92;
8223var NODE_BLOB = 93;
8224var NODE_CONST = 94;
8225var NODE_EVAL = 95;
8226var NODE_HEREDOC = 96;
8227var NODE_METHOD = 97;
8228var TOKEN_EOF = 1;
8229var TOKEN_EOL = 2;
8230var TOKEN_SPACE = 3;
8231var TOKEN_OROR = 4;
8232var TOKEN_ANDAND = 5;
8233var TOKEN_EQEQ = 6;
8234var TOKEN_EQEQCI = 7;
8235var TOKEN_EQEQCS = 8;
8236var TOKEN_NEQ = 9;
8237var TOKEN_NEQCI = 10;
8238var TOKEN_NEQCS = 11;
8239var TOKEN_GT = 12;
8240var TOKEN_GTCI = 13;
8241var TOKEN_GTCS = 14;
8242var TOKEN_GTEQ = 15;
8243var TOKEN_GTEQCI = 16;
8244var TOKEN_GTEQCS = 17;
8245var TOKEN_LT = 18;
8246var TOKEN_LTCI = 19;
8247var TOKEN_LTCS = 20;
8248var TOKEN_LTEQ = 21;
8249var TOKEN_LTEQCI = 22;
8250var TOKEN_LTEQCS = 23;
8251var TOKEN_MATCH = 24;
8252var TOKEN_MATCHCI = 25;
8253var TOKEN_MATCHCS = 26;
8254var TOKEN_NOMATCH = 27;
8255var TOKEN_NOMATCHCI = 28;
8256var TOKEN_NOMATCHCS = 29;
8257var TOKEN_IS = 30;
8258var TOKEN_ISCI = 31;
8259var TOKEN_ISCS = 32;
8260var TOKEN_ISNOT = 33;
8261var TOKEN_ISNOTCI = 34;
8262var TOKEN_ISNOTCS = 35;
8263var TOKEN_PLUS = 36;
8264var TOKEN_MINUS = 37;
8265var TOKEN_DOT = 38;
8266var TOKEN_STAR = 39;
8267var TOKEN_SLASH = 40;
8268var TOKEN_PERCENT = 41;
8269var TOKEN_NOT = 42;
8270var TOKEN_QUESTION = 43;
8271var TOKEN_COLON = 44;
8272var TOKEN_POPEN = 45;
8273var TOKEN_PCLOSE = 46;
8274var TOKEN_SQOPEN = 47;
8275var TOKEN_SQCLOSE = 48;
8276var TOKEN_COPEN = 49;
8277var TOKEN_CCLOSE = 50;
8278var TOKEN_COMMA = 51;
8279var TOKEN_NUMBER = 52;
8280var TOKEN_SQUOTE = 53;
8281var TOKEN_DQUOTE = 54;
8282var TOKEN_OPTION = 55;
8283var TOKEN_IDENTIFIER = 56;
8284var TOKEN_ENV = 57;
8285var TOKEN_REG = 58;
8286var TOKEN_EQ = 59;
8287var TOKEN_OR = 60;
8288var TOKEN_SEMICOLON = 61;
8289var TOKEN_BACKTICK = 62;
8290var TOKEN_DOTDOTDOT = 63;
8291var TOKEN_SHARP = 64;
8292var TOKEN_ARROW = 65;
8293var TOKEN_BLOB = 66;
8294var TOKEN_LITCOPEN = 67;
8295var TOKEN_DOTDOT = 68;
8296var TOKEN_HEREDOC = 69;
8297var MAX_FUNC_ARGS = 20;
8298function isalpha(c) {
8299 return viml_eqregh(c, "^[A-Za-z]$");
8300}
8301
8302function isalnum(c) {
8303 return viml_eqregh(c, "^[0-9A-Za-z]$");
8304}
8305
8306function isdigit(c) {
8307 return viml_eqregh(c, "^[0-9]$");
8308}
8309
8310function isodigit(c) {
8311 return viml_eqregh(c, "^[0-7]$");
8312}
8313
8314function isxdigit(c) {
8315 return viml_eqregh(c, "^[0-9A-Fa-f]$");
8316}
8317
8318function iswordc(c) {
8319 return viml_eqregh(c, "^[0-9A-Za-z_]$");
8320}
8321
8322function iswordc1(c) {
8323 return viml_eqregh(c, "^[A-Za-z_]$");
8324}
8325
8326function iswhite(c) {
8327 return viml_eqregh(c, "^[ \\t]$");
8328}
8329
8330function isnamec(c) {
8331 return viml_eqregh(c, "^[0-9A-Za-z_:#]$");
8332}
8333
8334function isnamec1(c) {
8335 return viml_eqregh(c, "^[A-Za-z_]$");
8336}
8337
8338function isargname(s) {
8339 return viml_eqregh(s, "^[A-Za-z_][0-9A-Za-z_]*$");
8340}
8341
8342function isvarname(s) {
8343 return viml_eqregh(s, "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$");
8344}
8345
8346// FIXME:
8347function isidc(c) {
8348 return viml_eqregh(c, "^[0-9A-Za-z_]$");
8349}
8350
8351function isupper(c) {
8352 return viml_eqregh(c, "^[A-Z]$");
8353}
8354
8355function islower(c) {
8356 return viml_eqregh(c, "^[a-z]$");
8357}
8358
8359function ExArg() {
8360 var ea = {};
8361 ea.forceit = FALSE;
8362 ea.addr_count = 0;
8363 ea.line1 = 0;
8364 ea.line2 = 0;
8365 ea.flags = 0;
8366 ea.do_ecmd_cmd = "";
8367 ea.do_ecmd_lnum = 0;
8368 ea.append = 0;
8369 ea.usefilter = FALSE;
8370 ea.amount = 0;
8371 ea.regname = 0;
8372 ea.force_bin = 0;
8373 ea.read_edit = 0;
8374 ea.force_ff = 0;
8375 ea.force_enc = 0;
8376 ea.bad_char = 0;
8377 ea.linepos = {};
8378 ea.cmdpos = [];
8379 ea.argpos = [];
8380 ea.cmd = {};
8381 ea.modifiers = [];
8382 ea.range = [];
8383 ea.argopt = {};
8384 ea.argcmd = {};
8385 return ea;
8386}
8387
8388// struct node {
8389// int type
8390// pos pos
8391// node left
8392// node right
8393// node cond
8394// node rest
8395// node[] list
8396// node[] rlist
8397// node[] default_args
8398// node[] body
8399// string op
8400// string str
8401// int depth
8402// variant value
8403// }
8404// TOPLEVEL .body
8405// COMMENT .str
8406// EXCMD .ea .str
8407// FUNCTION .ea .body .left .rlist .default_args .attr .endfunction
8408// ENDFUNCTION .ea
8409// DELFUNCTION .ea .left
8410// RETURN .ea .left
8411// EXCALL .ea .left
8412// LET .ea .op .left .list .rest .right
8413// CONST .ea .op .left .list .rest .right
8414// UNLET .ea .list
8415// LOCKVAR .ea .depth .list
8416// UNLOCKVAR .ea .depth .list
8417// IF .ea .body .cond .elseif .else .endif
8418// ELSEIF .ea .body .cond
8419// ELSE .ea .body
8420// ENDIF .ea
8421// WHILE .ea .body .cond .endwhile
8422// ENDWHILE .ea
8423// FOR .ea .body .left .list .rest .right .endfor
8424// ENDFOR .ea
8425// CONTINUE .ea
8426// BREAK .ea
8427// TRY .ea .body .catch .finally .endtry
8428// CATCH .ea .body .pattern
8429// FINALLY .ea .body
8430// ENDTRY .ea
8431// THROW .ea .left
8432// EVAL .ea .left
8433// ECHO .ea .list
8434// ECHON .ea .list
8435// ECHOHL .ea .str
8436// ECHOMSG .ea .list
8437// ECHOERR .ea .list
8438// EXECUTE .ea .list
8439// TERNARY .cond .left .right
8440// OR .left .right
8441// AND .left .right
8442// EQUAL .left .right
8443// EQUALCI .left .right
8444// EQUALCS .left .right
8445// NEQUAL .left .right
8446// NEQUALCI .left .right
8447// NEQUALCS .left .right
8448// GREATER .left .right
8449// GREATERCI .left .right
8450// GREATERCS .left .right
8451// GEQUAL .left .right
8452// GEQUALCI .left .right
8453// GEQUALCS .left .right
8454// SMALLER .left .right
8455// SMALLERCI .left .right
8456// SMALLERCS .left .right
8457// SEQUAL .left .right
8458// SEQUALCI .left .right
8459// SEQUALCS .left .right
8460// MATCH .left .right
8461// MATCHCI .left .right
8462// MATCHCS .left .right
8463// NOMATCH .left .right
8464// NOMATCHCI .left .right
8465// NOMATCHCS .left .right
8466// IS .left .right
8467// ISCI .left .right
8468// ISCS .left .right
8469// ISNOT .left .right
8470// ISNOTCI .left .right
8471// ISNOTCS .left .right
8472// ADD .left .right
8473// SUBTRACT .left .right
8474// CONCAT .left .right
8475// MULTIPLY .left .right
8476// DIVIDE .left .right
8477// REMAINDER .left .right
8478// NOT .left
8479// MINUS .left
8480// PLUS .left
8481// SUBSCRIPT .left .right
8482// SLICE .left .rlist
8483// METHOD .left .right
8484// CALL .left .rlist
8485// DOT .left .right
8486// NUMBER .value
8487// STRING .value
8488// LIST .value
8489// DICT .value
8490// BLOB .value
8491// NESTING .left
8492// OPTION .value
8493// IDENTIFIER .value
8494// CURLYNAME .value
8495// ENV .value
8496// REG .value
8497// CURLYNAMEPART .value
8498// CURLYNAMEEXPR .value
8499// LAMBDA .rlist .left
8500// HEREDOC .rlist .op .body
8501function Node(type) {
8502 return {"type":type};
8503}
8504
8505function Err(msg, pos) {
8506 return viml_printf("vimlparser: %s: line %d col %d", msg, pos.lnum, pos.col);
8507}
8508
8509function VimLParser() { this.__init__.apply(this, arguments); }
8510VimLParser.prototype.__init__ = function() {
8511 var a000 = Array.prototype.slice.call(arguments, 0);
8512 if (viml_len(a000) > 0) {
8513 this.neovim = a000[0];
8514 }
8515 else {
8516 this.neovim = 0;
8517 }
8518 this.find_command_cache = {};
8519}
8520
8521VimLParser.prototype.push_context = function(node) {
8522 viml_insert(this.context, node);
8523}
8524
8525VimLParser.prototype.pop_context = function() {
8526 viml_remove(this.context, 0);
8527}
8528
8529VimLParser.prototype.find_context = function(type) {
8530 var i = 0;
8531 var __c3 = this.context;
8532 for (var __i3 = 0; __i3 < __c3.length; ++__i3) {
8533 var node = __c3[__i3];
8534 if (node.type == type) {
8535 return i;
8536 }
8537 i += 1;
8538 }
8539 return -1;
8540}
8541
8542VimLParser.prototype.add_node = function(node) {
8543 viml_add(this.context[0].body, node);
8544}
8545
8546VimLParser.prototype.check_missing_endfunction = function(ends, pos) {
8547 if (this.context[0].type == NODE_FUNCTION) {
8548 throw Err(viml_printf("E126: Missing :endfunction: %s", ends), pos);
8549 }
8550}
8551
8552VimLParser.prototype.check_missing_endif = function(ends, pos) {
8553 if (this.context[0].type == NODE_IF || this.context[0].type == NODE_ELSEIF || this.context[0].type == NODE_ELSE) {
8554 throw Err(viml_printf("E171: Missing :endif: %s", ends), pos);
8555 }
8556}
8557
8558VimLParser.prototype.check_missing_endtry = function(ends, pos) {
8559 if (this.context[0].type == NODE_TRY || this.context[0].type == NODE_CATCH || this.context[0].type == NODE_FINALLY) {
8560 throw Err(viml_printf("E600: Missing :endtry: %s", ends), pos);
8561 }
8562}
8563
8564VimLParser.prototype.check_missing_endwhile = function(ends, pos) {
8565 if (this.context[0].type == NODE_WHILE) {
8566 throw Err(viml_printf("E170: Missing :endwhile: %s", ends), pos);
8567 }
8568}
8569
8570VimLParser.prototype.check_missing_endfor = function(ends, pos) {
8571 if (this.context[0].type == NODE_FOR) {
8572 throw Err(viml_printf("E170: Missing :endfor: %s", ends), pos);
8573 }
8574}
8575
8576VimLParser.prototype.parse = function(reader) {
8577 this.reader = reader;
8578 this.context = [];
8579 var toplevel = Node(NODE_TOPLEVEL);
8580 toplevel.pos = this.reader.getpos();
8581 toplevel.body = [];
8582 this.push_context(toplevel);
8583 while (this.reader.peek() != "<EOF>") {
8584 this.parse_one_cmd();
8585 }
8586 this.check_missing_endfunction("TOPLEVEL", this.reader.getpos());
8587 this.check_missing_endif("TOPLEVEL", this.reader.getpos());
8588 this.check_missing_endtry("TOPLEVEL", this.reader.getpos());
8589 this.check_missing_endwhile("TOPLEVEL", this.reader.getpos());
8590 this.check_missing_endfor("TOPLEVEL", this.reader.getpos());
8591 this.pop_context();
8592 return toplevel;
8593}
8594
8595VimLParser.prototype.parse_one_cmd = function() {
8596 this.ea = ExArg();
8597 if (this.reader.peekn(2) == "#!") {
8598 this.parse_hashbang();
8599 this.reader.get();
8600 return;
8601 }
8602 this.reader.skip_white_and_colon();
8603 if (this.reader.peekn(1) == "") {
8604 this.reader.get();
8605 return;
8606 }
8607 if (this.reader.peekn(1) == "\"") {
8608 this.parse_comment();
8609 this.reader.get();
8610 return;
8611 }
8612 this.ea.linepos = this.reader.getpos();
8613 this.parse_command_modifiers();
8614 this.parse_range();
8615 this.parse_command();
8616 this.parse_trail();
8617}
8618
8619// FIXME:
8620VimLParser.prototype.parse_command_modifiers = function() {
8621 var modifiers = [];
8622 while (TRUE) {
8623 var pos = this.reader.tell();
8624 var d = "";
8625 if (isdigit(this.reader.peekn(1))) {
8626 var d = this.reader.read_digit();
8627 this.reader.skip_white();
8628 }
8629 var k = this.reader.read_alpha();
8630 var c = this.reader.peekn(1);
8631 this.reader.skip_white();
8632 if (viml_stridx("aboveleft", k) == 0 && viml_len(k) >= 3) {
8633 // abo\%[veleft]
8634 viml_add(modifiers, {"name":"aboveleft"});
8635 }
8636 else if (viml_stridx("belowright", k) == 0 && viml_len(k) >= 3) {
8637 // bel\%[owright]
8638 viml_add(modifiers, {"name":"belowright"});
8639 }
8640 else if (viml_stridx("browse", k) == 0 && viml_len(k) >= 3) {
8641 // bro\%[wse]
8642 viml_add(modifiers, {"name":"browse"});
8643 }
8644 else if (viml_stridx("botright", k) == 0 && viml_len(k) >= 2) {
8645 // bo\%[tright]
8646 viml_add(modifiers, {"name":"botright"});
8647 }
8648 else if (viml_stridx("confirm", k) == 0 && viml_len(k) >= 4) {
8649 // conf\%[irm]
8650 viml_add(modifiers, {"name":"confirm"});
8651 }
8652 else if (viml_stridx("keepmarks", k) == 0 && viml_len(k) >= 3) {
8653 // kee\%[pmarks]
8654 viml_add(modifiers, {"name":"keepmarks"});
8655 }
8656 else if (viml_stridx("keepalt", k) == 0 && viml_len(k) >= 5) {
8657 // keepa\%[lt]
8658 viml_add(modifiers, {"name":"keepalt"});
8659 }
8660 else if (viml_stridx("keepjumps", k) == 0 && viml_len(k) >= 5) {
8661 // keepj\%[umps]
8662 viml_add(modifiers, {"name":"keepjumps"});
8663 }
8664 else if (viml_stridx("keeppatterns", k) == 0 && viml_len(k) >= 5) {
8665 // keepp\%[atterns]
8666 viml_add(modifiers, {"name":"keeppatterns"});
8667 }
8668 else if (viml_stridx("hide", k) == 0 && viml_len(k) >= 3) {
8669 // hid\%[e]
8670 if (this.ends_excmds(c)) {
8671 break;
8672 }
8673 viml_add(modifiers, {"name":"hide"});
8674 }
8675 else if (viml_stridx("lockmarks", k) == 0 && viml_len(k) >= 3) {
8676 // loc\%[kmarks]
8677 viml_add(modifiers, {"name":"lockmarks"});
8678 }
8679 else if (viml_stridx("leftabove", k) == 0 && viml_len(k) >= 5) {
8680 // lefta\%[bove]
8681 viml_add(modifiers, {"name":"leftabove"});
8682 }
8683 else if (viml_stridx("noautocmd", k) == 0 && viml_len(k) >= 3) {
8684 // noa\%[utocmd]
8685 viml_add(modifiers, {"name":"noautocmd"});
8686 }
8687 else if (viml_stridx("noswapfile", k) == 0 && viml_len(k) >= 3) {
8688 // :nos\%[wapfile]
8689 viml_add(modifiers, {"name":"noswapfile"});
8690 }
8691 else if (viml_stridx("rightbelow", k) == 0 && viml_len(k) >= 6) {
8692 // rightb\%[elow]
8693 viml_add(modifiers, {"name":"rightbelow"});
8694 }
8695 else if (viml_stridx("sandbox", k) == 0 && viml_len(k) >= 3) {
8696 // san\%[dbox]
8697 viml_add(modifiers, {"name":"sandbox"});
8698 }
8699 else if (viml_stridx("silent", k) == 0 && viml_len(k) >= 3) {
8700 // sil\%[ent]
8701 if (c == "!") {
8702 this.reader.get();
8703 viml_add(modifiers, {"name":"silent", "bang":1});
8704 }
8705 else {
8706 viml_add(modifiers, {"name":"silent", "bang":0});
8707 }
8708 }
8709 else if (k == "tab") {
8710 // tab
8711 if (d != "") {
8712 viml_add(modifiers, {"name":"tab", "count":viml_str2nr(d, 10)});
8713 }
8714 else {
8715 viml_add(modifiers, {"name":"tab"});
8716 }
8717 }
8718 else if (viml_stridx("topleft", k) == 0 && viml_len(k) >= 2) {
8719 // to\%[pleft]
8720 viml_add(modifiers, {"name":"topleft"});
8721 }
8722 else if (viml_stridx("unsilent", k) == 0 && viml_len(k) >= 3) {
8723 // uns\%[ilent]
8724 viml_add(modifiers, {"name":"unsilent"});
8725 }
8726 else if (viml_stridx("vertical", k) == 0 && viml_len(k) >= 4) {
8727 // vert\%[ical]
8728 viml_add(modifiers, {"name":"vertical"});
8729 }
8730 else if (viml_stridx("verbose", k) == 0 && viml_len(k) >= 4) {
8731 // verb\%[ose]
8732 if (d != "") {
8733 viml_add(modifiers, {"name":"verbose", "count":viml_str2nr(d, 10)});
8734 }
8735 else {
8736 viml_add(modifiers, {"name":"verbose", "count":1});
8737 }
8738 }
8739 else {
8740 this.reader.seek_set(pos);
8741 break;
8742 }
8743 }
8744 this.ea.modifiers = modifiers;
8745}
8746
8747// FIXME:
8748VimLParser.prototype.parse_range = function() {
8749 var tokens = [];
8750 while (TRUE) {
8751 while (TRUE) {
8752 this.reader.skip_white();
8753 var c = this.reader.peekn(1);
8754 if (c == "") {
8755 break;
8756 }
8757 if (c == ".") {
8758 viml_add(tokens, this.reader.getn(1));
8759 }
8760 else if (c == "$") {
8761 viml_add(tokens, this.reader.getn(1));
8762 }
8763 else if (c == "'") {
8764 this.reader.getn(1);
8765 var m = this.reader.getn(1);
8766 if (m == "") {
8767 break;
8768 }
8769 viml_add(tokens, "'" + m);
8770 }
8771 else if (c == "/") {
8772 this.reader.getn(1);
8773 var __tmp = this.parse_pattern(c);
8774 var pattern = __tmp[0];
8775 var _ = __tmp[1];
8776 viml_add(tokens, pattern);
8777 }
8778 else if (c == "?") {
8779 this.reader.getn(1);
8780 var __tmp = this.parse_pattern(c);
8781 var pattern = __tmp[0];
8782 var _ = __tmp[1];
8783 viml_add(tokens, pattern);
8784 }
8785 else if (c == "\\") {
8786 var m = this.reader.p(1);
8787 if (m == "&" || m == "?" || m == "/") {
8788 this.reader.seek_cur(2);
8789 viml_add(tokens, "\\" + m);
8790 }
8791 else {
8792 throw Err("E10: \\\\ should be followed by /, ? or &", this.reader.getpos());
8793 }
8794 }
8795 else if (isdigit(c)) {
8796 viml_add(tokens, this.reader.read_digit());
8797 }
8798 while (TRUE) {
8799 this.reader.skip_white();
8800 if (this.reader.peekn(1) == "") {
8801 break;
8802 }
8803 var n = this.reader.read_integer();
8804 if (n == "") {
8805 break;
8806 }
8807 viml_add(tokens, n);
8808 }
8809 if (this.reader.p(0) != "/" && this.reader.p(0) != "?") {
8810 break;
8811 }
8812 }
8813 if (this.reader.peekn(1) == "%") {
8814 viml_add(tokens, this.reader.getn(1));
8815 }
8816 else if (this.reader.peekn(1) == "*") {
8817 // && &cpoptions !~ '\*'
8818 viml_add(tokens, this.reader.getn(1));
8819 }
8820 if (this.reader.peekn(1) == ";") {
8821 viml_add(tokens, this.reader.getn(1));
8822 continue;
8823 }
8824 else if (this.reader.peekn(1) == ",") {
8825 viml_add(tokens, this.reader.getn(1));
8826 continue;
8827 }
8828 break;
8829 }
8830 this.ea.range = tokens;
8831}
8832
8833// FIXME:
8834VimLParser.prototype.parse_pattern = function(delimiter) {
8835 var pattern = "";
8836 var endc = "";
8837 var inbracket = 0;
8838 while (TRUE) {
8839 var c = this.reader.getn(1);
8840 if (c == "") {
8841 break;
8842 }
8843 if (c == delimiter && inbracket == 0) {
8844 var endc = c;
8845 break;
8846 }
8847 pattern += c;
8848 if (c == "\\") {
8849 var c = this.reader.peekn(1);
8850 if (c == "") {
8851 throw Err("E682: Invalid search pattern or delimiter", this.reader.getpos());
8852 }
8853 this.reader.getn(1);
8854 pattern += c;
8855 }
8856 else if (c == "[") {
8857 inbracket += 1;
8858 }
8859 else if (c == "]") {
8860 inbracket -= 1;
8861 }
8862 }
8863 return [pattern, endc];
8864}
8865
8866VimLParser.prototype.parse_command = function() {
8867 this.reader.skip_white_and_colon();
8868 this.ea.cmdpos = this.reader.getpos();
8869 if (this.reader.peekn(1) == "" || this.reader.peekn(1) == "\"") {
8870 if (!viml_empty(this.ea.modifiers) || !viml_empty(this.ea.range)) {
8871 this.parse_cmd_modifier_range();
8872 }
8873 return;
8874 }
8875 this.ea.cmd = this.find_command();
8876 if (this.ea.cmd === NIL) {
8877 this.reader.setpos(this.ea.cmdpos);
8878 throw Err(viml_printf("E492: Not an editor command: %s", this.reader.peekline()), this.ea.cmdpos);
8879 }
8880 if (this.reader.peekn(1) == "!" && this.ea.cmd.name != "substitute" && this.ea.cmd.name != "smagic" && this.ea.cmd.name != "snomagic") {
8881 this.reader.getn(1);
8882 this.ea.forceit = TRUE;
8883 }
8884 else {
8885 this.ea.forceit = FALSE;
8886 }
8887 if (!viml_eqregh(this.ea.cmd.flags, "\\<BANG\\>") && this.ea.forceit && !viml_eqregh(this.ea.cmd.flags, "\\<USERCMD\\>")) {
8888 throw Err("E477: No ! allowed", this.ea.cmdpos);
8889 }
8890 if (this.ea.cmd.name != "!") {
8891 this.reader.skip_white();
8892 }
8893 this.ea.argpos = this.reader.getpos();
8894 if (viml_eqregh(this.ea.cmd.flags, "\\<ARGOPT\\>")) {
8895 this.parse_argopt();
8896 }
8897 if (this.ea.cmd.name == "write" || this.ea.cmd.name == "update") {
8898 if (this.reader.p(0) == ">") {
8899 if (this.reader.p(1) != ">") {
8900 throw Err("E494: Use w or w>>", this.ea.cmdpos);
8901 }
8902 this.reader.seek_cur(2);
8903 this.reader.skip_white();
8904 this.ea.append = 1;
8905 }
8906 else if (this.reader.peekn(1) == "!" && this.ea.cmd.name == "write") {
8907 this.reader.getn(1);
8908 this.ea.usefilter = TRUE;
8909 }
8910 }
8911 if (this.ea.cmd.name == "read") {
8912 if (this.ea.forceit) {
8913 this.ea.usefilter = TRUE;
8914 this.ea.forceit = FALSE;
8915 }
8916 else if (this.reader.peekn(1) == "!") {
8917 this.reader.getn(1);
8918 this.ea.usefilter = TRUE;
8919 }
8920 }
8921 if (this.ea.cmd.name == "<" || this.ea.cmd.name == ">") {
8922 this.ea.amount = 1;
8923 while (this.reader.peekn(1) == this.ea.cmd.name) {
8924 this.reader.getn(1);
8925 this.ea.amount += 1;
8926 }
8927 this.reader.skip_white();
8928 }
8929 if (viml_eqregh(this.ea.cmd.flags, "\\<EDITCMD\\>") && !this.ea.usefilter) {
8930 this.parse_argcmd();
8931 }
8932 this._parse_command(this.ea.cmd.parser);
8933}
8934
8935// TODO: self[a:parser]
8936VimLParser.prototype._parse_command = function(parser) {
8937 if (parser == "parse_cmd_append") {
8938 this.parse_cmd_append();
8939 }
8940 else if (parser == "parse_cmd_break") {
8941 this.parse_cmd_break();
8942 }
8943 else if (parser == "parse_cmd_call") {
8944 this.parse_cmd_call();
8945 }
8946 else if (parser == "parse_cmd_catch") {
8947 this.parse_cmd_catch();
8948 }
8949 else if (parser == "parse_cmd_common") {
8950 this.parse_cmd_common();
8951 }
8952 else if (parser == "parse_cmd_continue") {
8953 this.parse_cmd_continue();
8954 }
8955 else if (parser == "parse_cmd_delfunction") {
8956 this.parse_cmd_delfunction();
8957 }
8958 else if (parser == "parse_cmd_echo") {
8959 this.parse_cmd_echo();
8960 }
8961 else if (parser == "parse_cmd_echoerr") {
8962 this.parse_cmd_echoerr();
8963 }
8964 else if (parser == "parse_cmd_echohl") {
8965 this.parse_cmd_echohl();
8966 }
8967 else if (parser == "parse_cmd_echomsg") {
8968 this.parse_cmd_echomsg();
8969 }
8970 else if (parser == "parse_cmd_echon") {
8971 this.parse_cmd_echon();
8972 }
8973 else if (parser == "parse_cmd_else") {
8974 this.parse_cmd_else();
8975 }
8976 else if (parser == "parse_cmd_elseif") {
8977 this.parse_cmd_elseif();
8978 }
8979 else if (parser == "parse_cmd_endfor") {
8980 this.parse_cmd_endfor();
8981 }
8982 else if (parser == "parse_cmd_endfunction") {
8983 this.parse_cmd_endfunction();
8984 }
8985 else if (parser == "parse_cmd_endif") {
8986 this.parse_cmd_endif();
8987 }
8988 else if (parser == "parse_cmd_endtry") {
8989 this.parse_cmd_endtry();
8990 }
8991 else if (parser == "parse_cmd_endwhile") {
8992 this.parse_cmd_endwhile();
8993 }
8994 else if (parser == "parse_cmd_execute") {
8995 this.parse_cmd_execute();
8996 }
8997 else if (parser == "parse_cmd_finally") {
8998 this.parse_cmd_finally();
8999 }
9000 else if (parser == "parse_cmd_finish") {
9001 this.parse_cmd_finish();
9002 }
9003 else if (parser == "parse_cmd_for") {
9004 this.parse_cmd_for();
9005 }
9006 else if (parser == "parse_cmd_function") {
9007 this.parse_cmd_function();
9008 }
9009 else if (parser == "parse_cmd_if") {
9010 this.parse_cmd_if();
9011 }
9012 else if (parser == "parse_cmd_insert") {
9013 this.parse_cmd_insert();
9014 }
9015 else if (parser == "parse_cmd_let") {
9016 this.parse_cmd_let();
9017 }
9018 else if (parser == "parse_cmd_const") {
9019 this.parse_cmd_const();
9020 }
9021 else if (parser == "parse_cmd_loadkeymap") {
9022 this.parse_cmd_loadkeymap();
9023 }
9024 else if (parser == "parse_cmd_lockvar") {
9025 this.parse_cmd_lockvar();
9026 }
9027 else if (parser == "parse_cmd_lua") {
9028 this.parse_cmd_lua();
9029 }
9030 else if (parser == "parse_cmd_modifier_range") {
9031 this.parse_cmd_modifier_range();
9032 }
9033 else if (parser == "parse_cmd_mzscheme") {
9034 this.parse_cmd_mzscheme();
9035 }
9036 else if (parser == "parse_cmd_perl") {
9037 this.parse_cmd_perl();
9038 }
9039 else if (parser == "parse_cmd_python") {
9040 this.parse_cmd_python();
9041 }
9042 else if (parser == "parse_cmd_python3") {
9043 this.parse_cmd_python3();
9044 }
9045 else if (parser == "parse_cmd_return") {
9046 this.parse_cmd_return();
9047 }
9048 else if (parser == "parse_cmd_ruby") {
9049 this.parse_cmd_ruby();
9050 }
9051 else if (parser == "parse_cmd_tcl") {
9052 this.parse_cmd_tcl();
9053 }
9054 else if (parser == "parse_cmd_throw") {
9055 this.parse_cmd_throw();
9056 }
9057 else if (parser == "parse_cmd_eval") {
9058 this.parse_cmd_eval();
9059 }
9060 else if (parser == "parse_cmd_try") {
9061 this.parse_cmd_try();
9062 }
9063 else if (parser == "parse_cmd_unlet") {
9064 this.parse_cmd_unlet();
9065 }
9066 else if (parser == "parse_cmd_unlockvar") {
9067 this.parse_cmd_unlockvar();
9068 }
9069 else if (parser == "parse_cmd_usercmd") {
9070 this.parse_cmd_usercmd();
9071 }
9072 else if (parser == "parse_cmd_while") {
9073 this.parse_cmd_while();
9074 }
9075 else if (parser == "parse_wincmd") {
9076 this.parse_wincmd();
9077 }
9078 else if (parser == "parse_cmd_syntax") {
9079 this.parse_cmd_syntax();
9080 }
9081 else {
9082 throw viml_printf("unknown parser: %s", viml_string(parser));
9083 }
9084}
9085
9086VimLParser.prototype.find_command = function() {
9087 var c = this.reader.peekn(1);
9088 var name = "";
9089 if (c == "k") {
9090 this.reader.getn(1);
9091 var name = "k";
9092 }
9093 else if (c == "s" && viml_eqregh(this.reader.peekn(5), "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])")) {
9094 this.reader.getn(1);
9095 var name = "substitute";
9096 }
9097 else if (viml_eqregh(c, "[@*!=><&~#]")) {
9098 this.reader.getn(1);
9099 var name = c;
9100 }
9101 else if (this.reader.peekn(2) == "py") {
9102 var name = this.reader.read_alnum();
9103 }
9104 else {
9105 var pos = this.reader.tell();
9106 var name = this.reader.read_alpha();
9107 if (name != "del" && viml_eqregh(name, "\\v^d%[elete][lp]$")) {
9108 this.reader.seek_set(pos);
9109 var name = this.reader.getn(viml_len(name) - 1);
9110 }
9111 }
9112 if (name == "") {
9113 return NIL;
9114 }
9115 if (viml_has_key(this.find_command_cache, name)) {
9116 return this.find_command_cache[name];
9117 }
9118 var cmd = NIL;
9119 var __c4 = this.builtin_commands;
9120 for (var __i4 = 0; __i4 < __c4.length; ++__i4) {
9121 var x = __c4[__i4];
9122 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9123 delete cmd;
9124 var cmd = x;
9125 break;
9126 }
9127 }
9128 if (this.neovim) {
9129 var __c5 = this.neovim_additional_commands;
9130 for (var __i5 = 0; __i5 < __c5.length; ++__i5) {
9131 var x = __c5[__i5];
9132 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9133 delete cmd;
9134 var cmd = x;
9135 break;
9136 }
9137 }
9138 var __c6 = this.neovim_removed_commands;
9139 for (var __i6 = 0; __i6 < __c6.length; ++__i6) {
9140 var x = __c6[__i6];
9141 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9142 delete cmd;
9143 var cmd = NIL;
9144 break;
9145 }
9146 }
9147 }
9148 // FIXME: user defined command
9149 if ((cmd === NIL || cmd.name == "Print") && viml_eqregh(name, "^[A-Z]")) {
9150 name += this.reader.read_alnum();
9151 delete cmd;
9152 var cmd = {"name":name, "flags":"USERCMD", "parser":"parse_cmd_usercmd"};
9153 }
9154 this.find_command_cache[name] = cmd;
9155 return cmd;
9156}
9157
9158// TODO:
9159VimLParser.prototype.parse_hashbang = function() {
9160 this.reader.getn(-1);
9161}
9162
9163// TODO:
9164// ++opt=val
9165VimLParser.prototype.parse_argopt = function() {
9166 while (this.reader.p(0) == "+" && this.reader.p(1) == "+") {
9167 var s = this.reader.peekn(20);
9168 if (viml_eqregh(s, "^++bin\\>")) {
9169 this.reader.getn(5);
9170 this.ea.force_bin = 1;
9171 }
9172 else if (viml_eqregh(s, "^++nobin\\>")) {
9173 this.reader.getn(7);
9174 this.ea.force_bin = 2;
9175 }
9176 else if (viml_eqregh(s, "^++edit\\>")) {
9177 this.reader.getn(6);
9178 this.ea.read_edit = 1;
9179 }
9180 else if (viml_eqregh(s, "^++ff=\\(dos\\|unix\\|mac\\)\\>")) {
9181 this.reader.getn(5);
9182 this.ea.force_ff = this.reader.read_alpha();
9183 }
9184 else if (viml_eqregh(s, "^++fileformat=\\(dos\\|unix\\|mac\\)\\>")) {
9185 this.reader.getn(13);
9186 this.ea.force_ff = this.reader.read_alpha();
9187 }
9188 else if (viml_eqregh(s, "^++enc=\\S")) {
9189 this.reader.getn(6);
9190 this.ea.force_enc = this.reader.read_nonwhite();
9191 }
9192 else if (viml_eqregh(s, "^++encoding=\\S")) {
9193 this.reader.getn(11);
9194 this.ea.force_enc = this.reader.read_nonwhite();
9195 }
9196 else if (viml_eqregh(s, "^++bad=\\(keep\\|drop\\|.\\)\\>")) {
9197 this.reader.getn(6);
9198 if (viml_eqregh(s, "^++bad=keep")) {
9199 this.ea.bad_char = this.reader.getn(4);
9200 }
9201 else if (viml_eqregh(s, "^++bad=drop")) {
9202 this.ea.bad_char = this.reader.getn(4);
9203 }
9204 else {
9205 this.ea.bad_char = this.reader.getn(1);
9206 }
9207 }
9208 else if (viml_eqregh(s, "^++")) {
9209 throw Err("E474: Invalid Argument", this.reader.getpos());
9210 }
9211 else {
9212 break;
9213 }
9214 this.reader.skip_white();
9215 }
9216}
9217
9218// TODO:
9219// +command
9220VimLParser.prototype.parse_argcmd = function() {
9221 if (this.reader.peekn(1) == "+") {
9222 this.reader.getn(1);
9223 if (this.reader.peekn(1) == " ") {
9224 this.ea.do_ecmd_cmd = "$";
9225 }
9226 else {
9227 this.ea.do_ecmd_cmd = this.read_cmdarg();
9228 }
9229 }
9230}
9231
9232VimLParser.prototype.read_cmdarg = function() {
9233 var r = "";
9234 while (TRUE) {
9235 var c = this.reader.peekn(1);
9236 if (c == "" || iswhite(c)) {
9237 break;
9238 }
9239 this.reader.getn(1);
9240 if (c == "\\") {
9241 var c = this.reader.getn(1);
9242 }
9243 r += c;
9244 }
9245 return r;
9246}
9247
9248VimLParser.prototype.parse_comment = function() {
9249 var npos = this.reader.getpos();
9250 var c = this.reader.get();
9251 if (c != "\"") {
9252 throw Err(viml_printf("unexpected character: %s", c), npos);
9253 }
9254 var node = Node(NODE_COMMENT);
9255 node.pos = npos;
9256 node.str = this.reader.getn(-1);
9257 this.add_node(node);
9258}
9259
9260VimLParser.prototype.parse_trail = function() {
9261 this.reader.skip_white();
9262 var c = this.reader.peek();
9263 if (c == "<EOF>") {
9264 // pass
9265 }
9266 else if (c == "<EOL>") {
9267 this.reader.get();
9268 }
9269 else if (c == "|") {
9270 this.reader.get();
9271 }
9272 else if (c == "\"") {
9273 this.parse_comment();
9274 this.reader.get();
9275 }
9276 else {
9277 throw Err(viml_printf("E488: Trailing characters: %s", c), this.reader.getpos());
9278 }
9279}
9280
9281// modifier or range only command line
9282VimLParser.prototype.parse_cmd_modifier_range = function() {
9283 var node = Node(NODE_EXCMD);
9284 node.pos = this.ea.cmdpos;
9285 node.ea = this.ea;
9286 node.str = this.reader.getstr(this.ea.linepos, this.reader.getpos());
9287 this.add_node(node);
9288}
9289
9290// TODO:
9291VimLParser.prototype.parse_cmd_common = function() {
9292 var end = this.reader.getpos();
9293 if (viml_eqregh(this.ea.cmd.flags, "\\<TRLBAR\\>") && !this.ea.usefilter) {
9294 var end = this.separate_nextcmd();
9295 }
9296 else if (this.ea.cmd.name == "!" || this.ea.cmd.name == "global" || this.ea.cmd.name == "vglobal" || this.ea.usefilter) {
9297 while (TRUE) {
9298 var end = this.reader.getpos();
9299 if (this.reader.getn(1) == "") {
9300 break;
9301 }
9302 }
9303 }
9304 else {
9305 while (TRUE) {
9306 var end = this.reader.getpos();
9307 if (this.reader.getn(1) == "") {
9308 break;
9309 }
9310 }
9311 }
9312 var node = Node(NODE_EXCMD);
9313 node.pos = this.ea.cmdpos;
9314 node.ea = this.ea;
9315 node.str = this.reader.getstr(this.ea.linepos, end);
9316 this.add_node(node);
9317}
9318
9319VimLParser.prototype.separate_nextcmd = function() {
9320 if (this.ea.cmd.name == "vimgrep" || this.ea.cmd.name == "vimgrepadd" || this.ea.cmd.name == "lvimgrep" || this.ea.cmd.name == "lvimgrepadd") {
9321 this.skip_vimgrep_pat();
9322 }
9323 var pc = "";
9324 var end = this.reader.getpos();
9325 var nospend = end;
9326 while (TRUE) {
9327 var end = this.reader.getpos();
9328 if (!iswhite(pc)) {
9329 var nospend = end;
9330 }
9331 var c = this.reader.peek();
9332 if (c == "<EOF>" || c == "<EOL>") {
9333 break;
9334 }
9335 else if (c == "\x16") {
9336 // <C-V>
9337 this.reader.get();
9338 var end = this.reader.getpos();
9339 var nospend = this.reader.getpos();
9340 var c = this.reader.peek();
9341 if (c == "<EOF>" || c == "<EOL>") {
9342 break;
9343 }
9344 this.reader.get();
9345 }
9346 else if (this.reader.peekn(2) == "`=" && viml_eqregh(this.ea.cmd.flags, "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>")) {
9347 this.reader.getn(2);
9348 this.parse_expr();
9349 var c = this.reader.peekn(1);
9350 if (c != "`") {
9351 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9352 }
9353 this.reader.getn(1);
9354 }
9355 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 != "@")) {
9356 var has_cpo_bar = FALSE;
9357 // &cpoptions =~ 'b'
9358 if ((!has_cpo_bar || !viml_eqregh(this.ea.cmd.flags, "\\<USECTRLV\\>")) && pc == "\\") {
9359 this.reader.get();
9360 }
9361 else {
9362 break;
9363 }
9364 }
9365 else {
9366 this.reader.get();
9367 }
9368 var pc = c;
9369 }
9370 if (!viml_eqregh(this.ea.cmd.flags, "\\<NOTRLCOM\\>")) {
9371 var end = nospend;
9372 }
9373 return end;
9374}
9375
9376// FIXME
9377VimLParser.prototype.skip_vimgrep_pat = function() {
9378 if (this.reader.peekn(1) == "") {
9379 // pass
9380 }
9381 else if (isidc(this.reader.peekn(1))) {
9382 // :vimgrep pattern fname
9383 this.reader.read_nonwhite();
9384 }
9385 else {
9386 // :vimgrep /pattern/[g][j] fname
9387 var c = this.reader.getn(1);
9388 var __tmp = this.parse_pattern(c);
9389 var _ = __tmp[0];
9390 var endc = __tmp[1];
9391 if (c != endc) {
9392 return;
9393 }
9394 while (this.reader.p(0) == "g" || this.reader.p(0) == "j") {
9395 this.reader.getn(1);
9396 }
9397 }
9398}
9399
9400VimLParser.prototype.parse_cmd_append = function() {
9401 this.reader.setpos(this.ea.linepos);
9402 var cmdline = this.reader.readline();
9403 var lines = [cmdline];
9404 var m = ".";
9405 while (TRUE) {
9406 if (this.reader.peek() == "<EOF>") {
9407 break;
9408 }
9409 var line = this.reader.getn(-1);
9410 viml_add(lines, line);
9411 if (line == m) {
9412 break;
9413 }
9414 this.reader.get();
9415 }
9416 var node = Node(NODE_EXCMD);
9417 node.pos = this.ea.cmdpos;
9418 node.ea = this.ea;
9419 node.str = viml_join(lines, "\n");
9420 this.add_node(node);
9421}
9422
9423VimLParser.prototype.parse_cmd_insert = function() {
9424 this.parse_cmd_append();
9425}
9426
9427VimLParser.prototype.parse_cmd_loadkeymap = function() {
9428 this.reader.setpos(this.ea.linepos);
9429 var cmdline = this.reader.readline();
9430 var lines = [cmdline];
9431 while (TRUE) {
9432 if (this.reader.peek() == "<EOF>") {
9433 break;
9434 }
9435 var line = this.reader.readline();
9436 viml_add(lines, line);
9437 }
9438 var node = Node(NODE_EXCMD);
9439 node.pos = this.ea.cmdpos;
9440 node.ea = this.ea;
9441 node.str = viml_join(lines, "\n");
9442 this.add_node(node);
9443}
9444
9445VimLParser.prototype.parse_cmd_lua = function() {
9446 var lines = [];
9447 this.reader.skip_white();
9448 if (this.reader.peekn(2) == "<<") {
9449 this.reader.getn(2);
9450 this.reader.skip_white();
9451 var m = this.reader.readline();
9452 if (m == "") {
9453 var m = ".";
9454 }
9455 this.reader.setpos(this.ea.linepos);
9456 var cmdline = this.reader.getn(-1);
9457 var lines = [cmdline];
9458 this.reader.get();
9459 while (TRUE) {
9460 if (this.reader.peek() == "<EOF>") {
9461 break;
9462 }
9463 var line = this.reader.getn(-1);
9464 viml_add(lines, line);
9465 if (line == m) {
9466 break;
9467 }
9468 this.reader.get();
9469 }
9470 }
9471 else {
9472 this.reader.setpos(this.ea.linepos);
9473 var cmdline = this.reader.getn(-1);
9474 var lines = [cmdline];
9475 }
9476 var node = Node(NODE_EXCMD);
9477 node.pos = this.ea.cmdpos;
9478 node.ea = this.ea;
9479 node.str = viml_join(lines, "\n");
9480 this.add_node(node);
9481}
9482
9483VimLParser.prototype.parse_cmd_mzscheme = function() {
9484 this.parse_cmd_lua();
9485}
9486
9487VimLParser.prototype.parse_cmd_perl = function() {
9488 this.parse_cmd_lua();
9489}
9490
9491VimLParser.prototype.parse_cmd_python = function() {
9492 this.parse_cmd_lua();
9493}
9494
9495VimLParser.prototype.parse_cmd_python3 = function() {
9496 this.parse_cmd_lua();
9497}
9498
9499VimLParser.prototype.parse_cmd_ruby = function() {
9500 this.parse_cmd_lua();
9501}
9502
9503VimLParser.prototype.parse_cmd_tcl = function() {
9504 this.parse_cmd_lua();
9505}
9506
9507VimLParser.prototype.parse_cmd_finish = function() {
9508 this.parse_cmd_common();
9509 if (this.context[0].type == NODE_TOPLEVEL) {
9510 this.reader.seek_end(0);
9511 }
9512}
9513
9514// FIXME
9515VimLParser.prototype.parse_cmd_usercmd = function() {
9516 this.parse_cmd_common();
9517}
9518
9519VimLParser.prototype.parse_cmd_function = function() {
9520 var pos = this.reader.tell();
9521 this.reader.skip_white();
9522 // :function
9523 if (this.ends_excmds(this.reader.peek())) {
9524 this.reader.seek_set(pos);
9525 this.parse_cmd_common();
9526 return;
9527 }
9528 // :function /pattern
9529 if (this.reader.peekn(1) == "/") {
9530 this.reader.seek_set(pos);
9531 this.parse_cmd_common();
9532 return;
9533 }
9534 var left = this.parse_lvalue_func();
9535 this.reader.skip_white();
9536 if (left.type == NODE_IDENTIFIER) {
9537 var s = left.value;
9538 var ss = viml_split(s, "\\zs");
9539 if (ss[0] != "<" && ss[0] != "_" && !isupper(ss[0]) && viml_stridx(s, ":") == -1 && viml_stridx(s, "#") == -1) {
9540 throw Err(viml_printf("E128: Function name must start with a capital or contain a colon: %s", s), left.pos);
9541 }
9542 }
9543 // :function {name}
9544 if (this.reader.peekn(1) != "(") {
9545 this.reader.seek_set(pos);
9546 this.parse_cmd_common();
9547 return;
9548 }
9549 // :function[!] {name}([arguments]) [range] [abort] [dict] [closure]
9550 var node = Node(NODE_FUNCTION);
9551 node.pos = this.ea.cmdpos;
9552 node.body = [];
9553 node.ea = this.ea;
9554 node.left = left;
9555 node.rlist = [];
9556 node.default_args = [];
9557 node.attr = {"range":0, "abort":0, "dict":0, "closure":0};
9558 node.endfunction = NIL;
9559 this.reader.getn(1);
9560 var tokenizer = new ExprTokenizer(this.reader);
9561 if (tokenizer.peek().type == TOKEN_PCLOSE) {
9562 tokenizer.get();
9563 }
9564 else {
9565 var named = {};
9566 while (TRUE) {
9567 var varnode = Node(NODE_IDENTIFIER);
9568 var token = tokenizer.get();
9569 if (token.type == TOKEN_IDENTIFIER) {
9570 if (!isargname(token.value) || token.value == "firstline" || token.value == "lastline") {
9571 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
9572 }
9573 else if (viml_has_key(named, token.value)) {
9574 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
9575 }
9576 named[token.value] = 1;
9577 varnode.pos = token.pos;
9578 varnode.value = token.value;
9579 viml_add(node.rlist, varnode);
9580 if (tokenizer.peek().type == TOKEN_EQ) {
9581 tokenizer.get();
9582 viml_add(node.default_args, this.parse_expr());
9583 }
9584 else if (viml_len(node.default_args) > 0) {
9585 throw Err("E989: Non-default argument follows default argument", varnode.pos);
9586 }
9587 // XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
9588 if (iswhite(this.reader.p(0)) && tokenizer.peek().type == TOKEN_COMMA) {
9589 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
9590 }
9591 var token = tokenizer.get();
9592 if (token.type == TOKEN_COMMA) {
9593 // XXX: Vim allows last comma. F(a, b, ) => OK
9594 if (tokenizer.peek().type == TOKEN_PCLOSE) {
9595 tokenizer.get();
9596 break;
9597 }
9598 }
9599 else if (token.type == TOKEN_PCLOSE) {
9600 break;
9601 }
9602 else {
9603 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9604 }
9605 }
9606 else if (token.type == TOKEN_DOTDOTDOT) {
9607 varnode.pos = token.pos;
9608 varnode.value = token.value;
9609 viml_add(node.rlist, varnode);
9610 var token = tokenizer.get();
9611 if (token.type == TOKEN_PCLOSE) {
9612 break;
9613 }
9614 else {
9615 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9616 }
9617 }
9618 else {
9619 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9620 }
9621 }
9622 }
9623 while (TRUE) {
9624 this.reader.skip_white();
9625 var epos = this.reader.getpos();
9626 var key = this.reader.read_alpha();
9627 if (key == "") {
9628 break;
9629 }
9630 else if (key == "range") {
9631 node.attr.range = TRUE;
9632 }
9633 else if (key == "abort") {
9634 node.attr.abort = TRUE;
9635 }
9636 else if (key == "dict") {
9637 node.attr.dict = TRUE;
9638 }
9639 else if (key == "closure") {
9640 node.attr.closure = TRUE;
9641 }
9642 else {
9643 throw Err(viml_printf("unexpected token: %s", key), epos);
9644 }
9645 }
9646 this.add_node(node);
9647 this.push_context(node);
9648}
9649
9650VimLParser.prototype.parse_cmd_endfunction = function() {
9651 this.check_missing_endif("ENDFUNCTION", this.ea.cmdpos);
9652 this.check_missing_endtry("ENDFUNCTION", this.ea.cmdpos);
9653 this.check_missing_endwhile("ENDFUNCTION", this.ea.cmdpos);
9654 this.check_missing_endfor("ENDFUNCTION", this.ea.cmdpos);
9655 if (this.context[0].type != NODE_FUNCTION) {
9656 throw Err("E193: :endfunction not inside a function", this.ea.cmdpos);
9657 }
9658 this.reader.getn(-1);
9659 var node = Node(NODE_ENDFUNCTION);
9660 node.pos = this.ea.cmdpos;
9661 node.ea = this.ea;
9662 this.context[0].endfunction = node;
9663 this.pop_context();
9664}
9665
9666VimLParser.prototype.parse_cmd_delfunction = function() {
9667 var node = Node(NODE_DELFUNCTION);
9668 node.pos = this.ea.cmdpos;
9669 node.ea = this.ea;
9670 node.left = this.parse_lvalue_func();
9671 this.add_node(node);
9672}
9673
9674VimLParser.prototype.parse_cmd_return = function() {
9675 if (this.find_context(NODE_FUNCTION) == -1) {
9676 throw Err("E133: :return not inside a function", this.ea.cmdpos);
9677 }
9678 var node = Node(NODE_RETURN);
9679 node.pos = this.ea.cmdpos;
9680 node.ea = this.ea;
9681 node.left = NIL;
9682 this.reader.skip_white();
9683 var c = this.reader.peek();
9684 if (c == "\"" || !this.ends_excmds(c)) {
9685 node.left = this.parse_expr();
9686 }
9687 this.add_node(node);
9688}
9689
9690VimLParser.prototype.parse_cmd_call = function() {
9691 var node = Node(NODE_EXCALL);
9692 node.pos = this.ea.cmdpos;
9693 node.ea = this.ea;
9694 this.reader.skip_white();
9695 var c = this.reader.peek();
9696 if (this.ends_excmds(c)) {
9697 throw Err("E471: Argument required", this.reader.getpos());
9698 }
9699 node.left = this.parse_expr();
9700 if (node.left.type != NODE_CALL) {
9701 throw Err("Not an function call", node.left.pos);
9702 }
9703 this.add_node(node);
9704}
9705
9706VimLParser.prototype.parse_heredoc = function() {
9707 var node = Node(NODE_HEREDOC);
9708 node.pos = this.ea.cmdpos;
9709 node.op = "";
9710 node.rlist = [];
9711 node.body = [];
9712 while (TRUE) {
9713 this.reader.skip_white();
9714 var key = this.reader.read_word();
9715 if (key == "") {
9716 break;
9717 }
9718 if (!islower(key[0])) {
9719 node.op = key;
9720 break;
9721 }
9722 else {
9723 viml_add(node.rlist, key);
9724 }
9725 }
9726 if (node.op == "") {
9727 throw Err("E172: Missing marker", this.reader.getpos());
9728 }
9729 this.parse_trail();
9730 while (TRUE) {
9731 if (this.reader.peek() == "<EOF>") {
9732 break;
9733 }
9734 var line = this.reader.getn(-1);
9735 if (line == node.op) {
9736 return node;
9737 }
9738 viml_add(node.body, line);
9739 this.reader.get();
9740 }
9741 throw Err(viml_printf("E990: Missing end marker '%s'", node.op), this.reader.getpos());
9742}
9743
9744VimLParser.prototype.parse_cmd_let = function() {
9745 var pos = this.reader.tell();
9746 this.reader.skip_white();
9747 // :let
9748 if (this.ends_excmds(this.reader.peek())) {
9749 this.reader.seek_set(pos);
9750 this.parse_cmd_common();
9751 return;
9752 }
9753 var lhs = this.parse_letlhs();
9754 this.reader.skip_white();
9755 var s1 = this.reader.peekn(1);
9756 var s2 = this.reader.peekn(2);
9757 // TODO check scriptversion?
9758 if (s2 == "..") {
9759 var s2 = this.reader.peekn(3);
9760 }
9761 else if (s2 == "=<") {
9762 var s2 = this.reader.peekn(3);
9763 }
9764 // :let {var-name} ..
9765 if (this.ends_excmds(s1) || s2 != "+=" && s2 != "-=" && s2 != ".=" && s2 != "..=" && s2 != "*=" && s2 != "/=" && s2 != "%=" && s2 != "=<<" && s1 != "=") {
9766 this.reader.seek_set(pos);
9767 this.parse_cmd_common();
9768 return;
9769 }
9770 // :let left op right
9771 var node = Node(NODE_LET);
9772 node.pos = this.ea.cmdpos;
9773 node.ea = this.ea;
9774 node.op = "";
9775 node.left = lhs.left;
9776 node.list = lhs.list;
9777 node.rest = lhs.rest;
9778 node.right = NIL;
9779 if (s2 == "+=" || s2 == "-=" || s2 == ".=" || s2 == "..=" || s2 == "*=" || s2 == "/=" || s2 == "%=") {
9780 this.reader.getn(viml_len(s2));
9781 node.op = s2;
9782 }
9783 else if (s2 == "=<<") {
9784 this.reader.getn(viml_len(s2));
9785 this.reader.skip_white();
9786 node.op = s2;
9787 node.right = this.parse_heredoc();
9788 this.add_node(node);
9789 return;
9790 }
9791 else if (s1 == "=") {
9792 this.reader.getn(1);
9793 node.op = s1;
9794 }
9795 else {
9796 throw "NOT REACHED";
9797 }
9798 node.right = this.parse_expr();
9799 this.add_node(node);
9800}
9801
9802VimLParser.prototype.parse_cmd_const = function() {
9803 var pos = this.reader.tell();
9804 this.reader.skip_white();
9805 // :const
9806 if (this.ends_excmds(this.reader.peek())) {
9807 this.reader.seek_set(pos);
9808 this.parse_cmd_common();
9809 return;
9810 }
9811 var lhs = this.parse_constlhs();
9812 this.reader.skip_white();
9813 var s1 = this.reader.peekn(1);
9814 // :const {var-name}
9815 if (this.ends_excmds(s1) || s1 != "=") {
9816 this.reader.seek_set(pos);
9817 this.parse_cmd_common();
9818 return;
9819 }
9820 // :const left op right
9821 var node = Node(NODE_CONST);
9822 node.pos = this.ea.cmdpos;
9823 node.ea = this.ea;
9824 this.reader.getn(1);
9825 node.op = s1;
9826 node.left = lhs.left;
9827 node.list = lhs.list;
9828 node.rest = lhs.rest;
9829 node.right = this.parse_expr();
9830 this.add_node(node);
9831}
9832
9833VimLParser.prototype.parse_cmd_unlet = function() {
9834 var node = Node(NODE_UNLET);
9835 node.pos = this.ea.cmdpos;
9836 node.ea = this.ea;
9837 node.list = this.parse_lvaluelist();
9838 this.add_node(node);
9839}
9840
9841VimLParser.prototype.parse_cmd_lockvar = function() {
9842 var node = Node(NODE_LOCKVAR);
9843 node.pos = this.ea.cmdpos;
9844 node.ea = this.ea;
9845 node.depth = NIL;
9846 node.list = [];
9847 this.reader.skip_white();
9848 if (isdigit(this.reader.peekn(1))) {
9849 node.depth = viml_str2nr(this.reader.read_digit(), 10);
9850 }
9851 node.list = this.parse_lvaluelist();
9852 this.add_node(node);
9853}
9854
9855VimLParser.prototype.parse_cmd_unlockvar = function() {
9856 var node = Node(NODE_UNLOCKVAR);
9857 node.pos = this.ea.cmdpos;
9858 node.ea = this.ea;
9859 node.depth = NIL;
9860 node.list = [];
9861 this.reader.skip_white();
9862 if (isdigit(this.reader.peekn(1))) {
9863 node.depth = viml_str2nr(this.reader.read_digit(), 10);
9864 }
9865 node.list = this.parse_lvaluelist();
9866 this.add_node(node);
9867}
9868
9869VimLParser.prototype.parse_cmd_if = function() {
9870 var node = Node(NODE_IF);
9871 node.pos = this.ea.cmdpos;
9872 node.body = [];
9873 node.ea = this.ea;
9874 node.cond = this.parse_expr();
9875 node.elseif = [];
9876 node._else = NIL;
9877 node.endif = NIL;
9878 this.add_node(node);
9879 this.push_context(node);
9880}
9881
9882VimLParser.prototype.parse_cmd_elseif = function() {
9883 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9884 throw Err("E582: :elseif without :if", this.ea.cmdpos);
9885 }
9886 if (this.context[0].type != NODE_IF) {
9887 this.pop_context();
9888 }
9889 var node = Node(NODE_ELSEIF);
9890 node.pos = this.ea.cmdpos;
9891 node.body = [];
9892 node.ea = this.ea;
9893 node.cond = this.parse_expr();
9894 viml_add(this.context[0].elseif, node);
9895 this.push_context(node);
9896}
9897
9898VimLParser.prototype.parse_cmd_else = function() {
9899 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9900 throw Err("E581: :else without :if", this.ea.cmdpos);
9901 }
9902 if (this.context[0].type != NODE_IF) {
9903 this.pop_context();
9904 }
9905 var node = Node(NODE_ELSE);
9906 node.pos = this.ea.cmdpos;
9907 node.body = [];
9908 node.ea = this.ea;
9909 this.context[0]._else = node;
9910 this.push_context(node);
9911}
9912
9913VimLParser.prototype.parse_cmd_endif = function() {
9914 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF && this.context[0].type != NODE_ELSE) {
9915 throw Err("E580: :endif without :if", this.ea.cmdpos);
9916 }
9917 if (this.context[0].type != NODE_IF) {
9918 this.pop_context();
9919 }
9920 var node = Node(NODE_ENDIF);
9921 node.pos = this.ea.cmdpos;
9922 node.ea = this.ea;
9923 this.context[0].endif = node;
9924 this.pop_context();
9925}
9926
9927VimLParser.prototype.parse_cmd_while = function() {
9928 var node = Node(NODE_WHILE);
9929 node.pos = this.ea.cmdpos;
9930 node.body = [];
9931 node.ea = this.ea;
9932 node.cond = this.parse_expr();
9933 node.endwhile = NIL;
9934 this.add_node(node);
9935 this.push_context(node);
9936}
9937
9938VimLParser.prototype.parse_cmd_endwhile = function() {
9939 if (this.context[0].type != NODE_WHILE) {
9940 throw Err("E588: :endwhile without :while", this.ea.cmdpos);
9941 }
9942 var node = Node(NODE_ENDWHILE);
9943 node.pos = this.ea.cmdpos;
9944 node.ea = this.ea;
9945 this.context[0].endwhile = node;
9946 this.pop_context();
9947}
9948
9949VimLParser.prototype.parse_cmd_for = function() {
9950 var node = Node(NODE_FOR);
9951 node.pos = this.ea.cmdpos;
9952 node.body = [];
9953 node.ea = this.ea;
9954 node.left = NIL;
9955 node.right = NIL;
9956 node.endfor = NIL;
9957 var lhs = this.parse_letlhs();
9958 node.left = lhs.left;
9959 node.list = lhs.list;
9960 node.rest = lhs.rest;
9961 this.reader.skip_white();
9962 var epos = this.reader.getpos();
9963 if (this.reader.read_alpha() != "in") {
9964 throw Err("Missing \"in\" after :for", epos);
9965 }
9966 node.right = this.parse_expr();
9967 this.add_node(node);
9968 this.push_context(node);
9969}
9970
9971VimLParser.prototype.parse_cmd_endfor = function() {
9972 if (this.context[0].type != NODE_FOR) {
9973 throw Err("E588: :endfor without :for", this.ea.cmdpos);
9974 }
9975 var node = Node(NODE_ENDFOR);
9976 node.pos = this.ea.cmdpos;
9977 node.ea = this.ea;
9978 this.context[0].endfor = node;
9979 this.pop_context();
9980}
9981
9982VimLParser.prototype.parse_cmd_continue = function() {
9983 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9984 throw Err("E586: :continue without :while or :for", this.ea.cmdpos);
9985 }
9986 var node = Node(NODE_CONTINUE);
9987 node.pos = this.ea.cmdpos;
9988 node.ea = this.ea;
9989 this.add_node(node);
9990}
9991
9992VimLParser.prototype.parse_cmd_break = function() {
9993 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9994 throw Err("E587: :break without :while or :for", this.ea.cmdpos);
9995 }
9996 var node = Node(NODE_BREAK);
9997 node.pos = this.ea.cmdpos;
9998 node.ea = this.ea;
9999 this.add_node(node);
10000}
10001
10002VimLParser.prototype.parse_cmd_try = function() {
10003 var node = Node(NODE_TRY);
10004 node.pos = this.ea.cmdpos;
10005 node.body = [];
10006 node.ea = this.ea;
10007 node.catch = [];
10008 node._finally = NIL;
10009 node.endtry = NIL;
10010 this.add_node(node);
10011 this.push_context(node);
10012}
10013
10014VimLParser.prototype.parse_cmd_catch = function() {
10015 if (this.context[0].type == NODE_FINALLY) {
10016 throw Err("E604: :catch after :finally", this.ea.cmdpos);
10017 }
10018 else if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
10019 throw Err("E603: :catch without :try", this.ea.cmdpos);
10020 }
10021 if (this.context[0].type != NODE_TRY) {
10022 this.pop_context();
10023 }
10024 var node = Node(NODE_CATCH);
10025 node.pos = this.ea.cmdpos;
10026 node.body = [];
10027 node.ea = this.ea;
10028 node.pattern = NIL;
10029 this.reader.skip_white();
10030 if (!this.ends_excmds(this.reader.peek())) {
10031 var __tmp = this.parse_pattern(this.reader.get());
10032 node.pattern = __tmp[0];
10033 var _ = __tmp[1];
10034 }
10035 viml_add(this.context[0].catch, node);
10036 this.push_context(node);
10037}
10038
10039VimLParser.prototype.parse_cmd_finally = function() {
10040 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
10041 throw Err("E606: :finally without :try", this.ea.cmdpos);
10042 }
10043 if (this.context[0].type != NODE_TRY) {
10044 this.pop_context();
10045 }
10046 var node = Node(NODE_FINALLY);
10047 node.pos = this.ea.cmdpos;
10048 node.body = [];
10049 node.ea = this.ea;
10050 this.context[0]._finally = node;
10051 this.push_context(node);
10052}
10053
10054VimLParser.prototype.parse_cmd_endtry = function() {
10055 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH && this.context[0].type != NODE_FINALLY) {
10056 throw Err("E602: :endtry without :try", this.ea.cmdpos);
10057 }
10058 if (this.context[0].type != NODE_TRY) {
10059 this.pop_context();
10060 }
10061 var node = Node(NODE_ENDTRY);
10062 node.pos = this.ea.cmdpos;
10063 node.ea = this.ea;
10064 this.context[0].endtry = node;
10065 this.pop_context();
10066}
10067
10068VimLParser.prototype.parse_cmd_throw = function() {
10069 var node = Node(NODE_THROW);
10070 node.pos = this.ea.cmdpos;
10071 node.ea = this.ea;
10072 node.left = this.parse_expr();
10073 this.add_node(node);
10074}
10075
10076VimLParser.prototype.parse_cmd_eval = function() {
10077 var node = Node(NODE_EVAL);
10078 node.pos = this.ea.cmdpos;
10079 node.ea = this.ea;
10080 node.left = this.parse_expr();
10081 this.add_node(node);
10082}
10083
10084VimLParser.prototype.parse_cmd_echo = function() {
10085 var node = Node(NODE_ECHO);
10086 node.pos = this.ea.cmdpos;
10087 node.ea = this.ea;
10088 node.list = this.parse_exprlist();
10089 this.add_node(node);
10090}
10091
10092VimLParser.prototype.parse_cmd_echon = function() {
10093 var node = Node(NODE_ECHON);
10094 node.pos = this.ea.cmdpos;
10095 node.ea = this.ea;
10096 node.list = this.parse_exprlist();
10097 this.add_node(node);
10098}
10099
10100VimLParser.prototype.parse_cmd_echohl = function() {
10101 var node = Node(NODE_ECHOHL);
10102 node.pos = this.ea.cmdpos;
10103 node.ea = this.ea;
10104 node.str = "";
10105 while (!this.ends_excmds(this.reader.peek())) {
10106 node.str += this.reader.get();
10107 }
10108 this.add_node(node);
10109}
10110
10111VimLParser.prototype.parse_cmd_echomsg = function() {
10112 var node = Node(NODE_ECHOMSG);
10113 node.pos = this.ea.cmdpos;
10114 node.ea = this.ea;
10115 node.list = this.parse_exprlist();
10116 this.add_node(node);
10117}
10118
10119VimLParser.prototype.parse_cmd_echoerr = function() {
10120 var node = Node(NODE_ECHOERR);
10121 node.pos = this.ea.cmdpos;
10122 node.ea = this.ea;
10123 node.list = this.parse_exprlist();
10124 this.add_node(node);
10125}
10126
10127VimLParser.prototype.parse_cmd_execute = function() {
10128 var node = Node(NODE_EXECUTE);
10129 node.pos = this.ea.cmdpos;
10130 node.ea = this.ea;
10131 node.list = this.parse_exprlist();
10132 this.add_node(node);
10133}
10134
10135VimLParser.prototype.parse_expr = function() {
10136 return new ExprParser(this.reader).parse();
10137}
10138
10139VimLParser.prototype.parse_exprlist = function() {
10140 var list = [];
10141 while (TRUE) {
10142 this.reader.skip_white();
10143 var c = this.reader.peek();
10144 if (c != "\"" && this.ends_excmds(c)) {
10145 break;
10146 }
10147 var node = this.parse_expr();
10148 viml_add(list, node);
10149 }
10150 return list;
10151}
10152
10153VimLParser.prototype.parse_lvalue_func = function() {
10154 var p = new LvalueParser(this.reader);
10155 var node = p.parse();
10156 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) {
10157 return node;
10158 }
10159 throw Err("Invalid Expression", node.pos);
10160}
10161
10162// FIXME:
10163VimLParser.prototype.parse_lvalue = function() {
10164 var p = new LvalueParser(this.reader);
10165 var node = p.parse();
10166 if (node.type == NODE_IDENTIFIER) {
10167 if (!isvarname(node.value)) {
10168 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
10169 }
10170 }
10171 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) {
10172 return node;
10173 }
10174 throw Err("Invalid Expression", node.pos);
10175}
10176
10177// TODO: merge with s:VimLParser.parse_lvalue()
10178VimLParser.prototype.parse_constlvalue = function() {
10179 var p = new LvalueParser(this.reader);
10180 var node = p.parse();
10181 if (node.type == NODE_IDENTIFIER) {
10182 if (!isvarname(node.value)) {
10183 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
10184 }
10185 }
10186 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME) {
10187 return node;
10188 }
10189 else if (node.type == NODE_SUBSCRIPT || node.type == NODE_SLICE || node.type == NODE_DOT) {
10190 throw Err("E996: Cannot lock a list or dict", node.pos);
10191 }
10192 else if (node.type == NODE_OPTION) {
10193 throw Err("E996: Cannot lock an option", node.pos);
10194 }
10195 else if (node.type == NODE_ENV) {
10196 throw Err("E996: Cannot lock an environment variable", node.pos);
10197 }
10198 else if (node.type == NODE_REG) {
10199 throw Err("E996: Cannot lock a register", node.pos);
10200 }
10201 throw Err("Invalid Expression", node.pos);
10202}
10203
10204VimLParser.prototype.parse_lvaluelist = function() {
10205 var list = [];
10206 var node = this.parse_expr();
10207 viml_add(list, node);
10208 while (TRUE) {
10209 this.reader.skip_white();
10210 if (this.ends_excmds(this.reader.peek())) {
10211 break;
10212 }
10213 var node = this.parse_lvalue();
10214 viml_add(list, node);
10215 }
10216 return list;
10217}
10218
10219// FIXME:
10220VimLParser.prototype.parse_letlhs = function() {
10221 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
10222 var tokenizer = new ExprTokenizer(this.reader);
10223 if (tokenizer.peek().type == TOKEN_SQOPEN) {
10224 tokenizer.get();
10225 lhs.list = [];
10226 while (TRUE) {
10227 var node = this.parse_lvalue();
10228 viml_add(lhs.list, node);
10229 var token = tokenizer.get();
10230 if (token.type == TOKEN_SQCLOSE) {
10231 break;
10232 }
10233 else if (token.type == TOKEN_COMMA) {
10234 continue;
10235 }
10236 else if (token.type == TOKEN_SEMICOLON) {
10237 var node = this.parse_lvalue();
10238 lhs.rest = node;
10239 var token = tokenizer.get();
10240 if (token.type == TOKEN_SQCLOSE) {
10241 break;
10242 }
10243 else {
10244 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10245 }
10246 }
10247 else {
10248 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10249 }
10250 }
10251 }
10252 else {
10253 lhs.left = this.parse_lvalue();
10254 }
10255 return lhs;
10256}
10257
10258// TODO: merge with s:VimLParser.parse_letlhs() ?
10259VimLParser.prototype.parse_constlhs = function() {
10260 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
10261 var tokenizer = new ExprTokenizer(this.reader);
10262 if (tokenizer.peek().type == TOKEN_SQOPEN) {
10263 tokenizer.get();
10264 lhs.list = [];
10265 while (TRUE) {
10266 var node = this.parse_lvalue();
10267 viml_add(lhs.list, node);
10268 var token = tokenizer.get();
10269 if (token.type == TOKEN_SQCLOSE) {
10270 break;
10271 }
10272 else if (token.type == TOKEN_COMMA) {
10273 continue;
10274 }
10275 else if (token.type == TOKEN_SEMICOLON) {
10276 var node = this.parse_lvalue();
10277 lhs.rest = node;
10278 var token = tokenizer.get();
10279 if (token.type == TOKEN_SQCLOSE) {
10280 break;
10281 }
10282 else {
10283 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10284 }
10285 }
10286 else {
10287 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10288 }
10289 }
10290 }
10291 else {
10292 lhs.left = this.parse_constlvalue();
10293 }
10294 return lhs;
10295}
10296
10297VimLParser.prototype.ends_excmds = function(c) {
10298 return c == "" || c == "|" || c == "\"" || c == "<EOF>" || c == "<EOL>";
10299}
10300
10301// FIXME: validate argument
10302VimLParser.prototype.parse_wincmd = function() {
10303 var c = this.reader.getn(1);
10304 if (c == "") {
10305 throw Err("E471: Argument required", this.reader.getpos());
10306 }
10307 else if (c == "g" || c == "\x07") {
10308 // <C-G>
10309 var c2 = this.reader.getn(1);
10310 if (c2 == "" || iswhite(c2)) {
10311 throw Err("E474: Invalid Argument", this.reader.getpos());
10312 }
10313 }
10314 var end = this.reader.getpos();
10315 this.reader.skip_white();
10316 if (!this.ends_excmds(this.reader.peek())) {
10317 throw Err("E474: Invalid Argument", this.reader.getpos());
10318 }
10319 var node = Node(NODE_EXCMD);
10320 node.pos = this.ea.cmdpos;
10321 node.ea = this.ea;
10322 node.str = this.reader.getstr(this.ea.linepos, end);
10323 this.add_node(node);
10324}
10325
10326// FIXME: validate argument
10327VimLParser.prototype.parse_cmd_syntax = function() {
10328 var end = this.reader.getpos();
10329 while (TRUE) {
10330 var end = this.reader.getpos();
10331 var c = this.reader.peek();
10332 if (c == "/" || c == "'" || c == "\"") {
10333 this.reader.getn(1);
10334 this.parse_pattern(c);
10335 }
10336 else if (c == "=") {
10337 this.reader.getn(1);
10338 this.parse_pattern(" ");
10339 }
10340 else if (this.ends_excmds(c)) {
10341 break;
10342 }
10343 this.reader.getn(1);
10344 }
10345 var node = Node(NODE_EXCMD);
10346 node.pos = this.ea.cmdpos;
10347 node.ea = this.ea;
10348 node.str = this.reader.getstr(this.ea.linepos, end);
10349 this.add_node(node);
10350}
10351
10352VimLParser.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"}];
10353VimLParser.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"}];
10354// To find new builtin_commands, run the below script.
10355// $ scripts/update_builtin_commands.sh /path/to/vim/src/ex_cmds.h
10356VimLParser.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"}];
10357// To find new builtin_functions, run the below script.
10358// $ scripts/update_builtin_functions.sh /path/to/vim/src/evalfunc.c
10359VimLParser.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"}];
10360function ExprTokenizer() { this.__init__.apply(this, arguments); }
10361ExprTokenizer.prototype.__init__ = function(reader) {
10362 this.reader = reader;
10363 this.cache = {};
10364}
10365
10366ExprTokenizer.prototype.token = function(type, value, pos) {
10367 return {"type":type, "value":value, "pos":pos};
10368}
10369
10370ExprTokenizer.prototype.peek = function() {
10371 var pos = this.reader.tell();
10372 var r = this.get();
10373 this.reader.seek_set(pos);
10374 return r;
10375}
10376
10377ExprTokenizer.prototype.get = function() {
10378 // FIXME: remove dirty hack
10379 if (viml_has_key(this.cache, this.reader.tell())) {
10380 var x = this.cache[this.reader.tell()];
10381 this.reader.seek_set(x[0]);
10382 return x[1];
10383 }
10384 var pos = this.reader.tell();
10385 this.reader.skip_white();
10386 var r = this.get2();
10387 this.cache[pos] = [this.reader.tell(), r];
10388 return r;
10389}
10390
10391ExprTokenizer.prototype.get2 = function() {
10392 var r = this.reader;
10393 var pos = r.getpos();
10394 var c = r.peek();
10395 if (c == "<EOF>") {
10396 return this.token(TOKEN_EOF, c, pos);
10397 }
10398 else if (c == "<EOL>") {
10399 r.seek_cur(1);
10400 return this.token(TOKEN_EOL, c, pos);
10401 }
10402 else if (iswhite(c)) {
10403 var s = r.read_white();
10404 return this.token(TOKEN_SPACE, s, pos);
10405 }
10406 else if (c == "0" && (r.p(1) == "X" || r.p(1) == "x") && isxdigit(r.p(2))) {
10407 var s = r.getn(3);
10408 s += r.read_xdigit();
10409 return this.token(TOKEN_NUMBER, s, pos);
10410 }
10411 else if (c == "0" && (r.p(1) == "B" || r.p(1) == "b") && (r.p(2) == "0" || r.p(2) == "1")) {
10412 var s = r.getn(3);
10413 s += r.read_bdigit();
10414 return this.token(TOKEN_NUMBER, s, pos);
10415 }
10416 else if (c == "0" && (r.p(1) == "Z" || r.p(1) == "z") && r.p(2) != ".") {
10417 var s = r.getn(2);
10418 s += r.read_blob();
10419 return this.token(TOKEN_BLOB, s, pos);
10420 }
10421 else if (isdigit(c)) {
10422 var s = r.read_digit();
10423 if (r.p(0) == "." && isdigit(r.p(1))) {
10424 s += r.getn(1);
10425 s += r.read_digit();
10426 if ((r.p(0) == "E" || r.p(0) == "e") && (isdigit(r.p(1)) || (r.p(1) == "-" || r.p(1) == "+") && isdigit(r.p(2)))) {
10427 s += r.getn(2);
10428 s += r.read_digit();
10429 }
10430 }
10431 return this.token(TOKEN_NUMBER, s, pos);
10432 }
10433 else if (c == "i" && r.p(1) == "s" && !isidc(r.p(2))) {
10434 if (r.p(2) == "?") {
10435 r.seek_cur(3);
10436 return this.token(TOKEN_ISCI, "is?", pos);
10437 }
10438 else if (r.p(2) == "#") {
10439 r.seek_cur(3);
10440 return this.token(TOKEN_ISCS, "is#", pos);
10441 }
10442 else {
10443 r.seek_cur(2);
10444 return this.token(TOKEN_IS, "is", pos);
10445 }
10446 }
10447 else if (c == "i" && r.p(1) == "s" && r.p(2) == "n" && r.p(3) == "o" && r.p(4) == "t" && !isidc(r.p(5))) {
10448 if (r.p(5) == "?") {
10449 r.seek_cur(6);
10450 return this.token(TOKEN_ISNOTCI, "isnot?", pos);
10451 }
10452 else if (r.p(5) == "#") {
10453 r.seek_cur(6);
10454 return this.token(TOKEN_ISNOTCS, "isnot#", pos);
10455 }
10456 else {
10457 r.seek_cur(5);
10458 return this.token(TOKEN_ISNOT, "isnot", pos);
10459 }
10460 }
10461 else if (isnamec1(c)) {
10462 var s = r.read_name();
10463 return this.token(TOKEN_IDENTIFIER, s, pos);
10464 }
10465 else if (c == "|" && r.p(1) == "|") {
10466 r.seek_cur(2);
10467 return this.token(TOKEN_OROR, "||", pos);
10468 }
10469 else if (c == "&" && r.p(1) == "&") {
10470 r.seek_cur(2);
10471 return this.token(TOKEN_ANDAND, "&&", pos);
10472 }
10473 else if (c == "=" && r.p(1) == "=") {
10474 if (r.p(2) == "?") {
10475 r.seek_cur(3);
10476 return this.token(TOKEN_EQEQCI, "==?", pos);
10477 }
10478 else if (r.p(2) == "#") {
10479 r.seek_cur(3);
10480 return this.token(TOKEN_EQEQCS, "==#", pos);
10481 }
10482 else {
10483 r.seek_cur(2);
10484 return this.token(TOKEN_EQEQ, "==", pos);
10485 }
10486 }
10487 else if (c == "!" && r.p(1) == "=") {
10488 if (r.p(2) == "?") {
10489 r.seek_cur(3);
10490 return this.token(TOKEN_NEQCI, "!=?", pos);
10491 }
10492 else if (r.p(2) == "#") {
10493 r.seek_cur(3);
10494 return this.token(TOKEN_NEQCS, "!=#", pos);
10495 }
10496 else {
10497 r.seek_cur(2);
10498 return this.token(TOKEN_NEQ, "!=", pos);
10499 }
10500 }
10501 else if (c == ">" && r.p(1) == "=") {
10502 if (r.p(2) == "?") {
10503 r.seek_cur(3);
10504 return this.token(TOKEN_GTEQCI, ">=?", pos);
10505 }
10506 else if (r.p(2) == "#") {
10507 r.seek_cur(3);
10508 return this.token(TOKEN_GTEQCS, ">=#", pos);
10509 }
10510 else {
10511 r.seek_cur(2);
10512 return this.token(TOKEN_GTEQ, ">=", pos);
10513 }
10514 }
10515 else if (c == "<" && r.p(1) == "=") {
10516 if (r.p(2) == "?") {
10517 r.seek_cur(3);
10518 return this.token(TOKEN_LTEQCI, "<=?", pos);
10519 }
10520 else if (r.p(2) == "#") {
10521 r.seek_cur(3);
10522 return this.token(TOKEN_LTEQCS, "<=#", pos);
10523 }
10524 else {
10525 r.seek_cur(2);
10526 return this.token(TOKEN_LTEQ, "<=", pos);
10527 }
10528 }
10529 else if (c == "=" && r.p(1) == "~") {
10530 if (r.p(2) == "?") {
10531 r.seek_cur(3);
10532 return this.token(TOKEN_MATCHCI, "=~?", pos);
10533 }
10534 else if (r.p(2) == "#") {
10535 r.seek_cur(3);
10536 return this.token(TOKEN_MATCHCS, "=~#", pos);
10537 }
10538 else {
10539 r.seek_cur(2);
10540 return this.token(TOKEN_MATCH, "=~", pos);
10541 }
10542 }
10543 else if (c == "!" && r.p(1) == "~") {
10544 if (r.p(2) == "?") {
10545 r.seek_cur(3);
10546 return this.token(TOKEN_NOMATCHCI, "!~?", pos);
10547 }
10548 else if (r.p(2) == "#") {
10549 r.seek_cur(3);
10550 return this.token(TOKEN_NOMATCHCS, "!~#", pos);
10551 }
10552 else {
10553 r.seek_cur(2);
10554 return this.token(TOKEN_NOMATCH, "!~", pos);
10555 }
10556 }
10557 else if (c == ">") {
10558 if (r.p(1) == "?") {
10559 r.seek_cur(2);
10560 return this.token(TOKEN_GTCI, ">?", pos);
10561 }
10562 else if (r.p(1) == "#") {
10563 r.seek_cur(2);
10564 return this.token(TOKEN_GTCS, ">#", pos);
10565 }
10566 else {
10567 r.seek_cur(1);
10568 return this.token(TOKEN_GT, ">", pos);
10569 }
10570 }
10571 else if (c == "<") {
10572 if (r.p(1) == "?") {
10573 r.seek_cur(2);
10574 return this.token(TOKEN_LTCI, "<?", pos);
10575 }
10576 else if (r.p(1) == "#") {
10577 r.seek_cur(2);
10578 return this.token(TOKEN_LTCS, "<#", pos);
10579 }
10580 else {
10581 r.seek_cur(1);
10582 return this.token(TOKEN_LT, "<", pos);
10583 }
10584 }
10585 else if (c == "+") {
10586 r.seek_cur(1);
10587 return this.token(TOKEN_PLUS, "+", pos);
10588 }
10589 else if (c == "-") {
10590 if (r.p(1) == ">") {
10591 r.seek_cur(2);
10592 return this.token(TOKEN_ARROW, "->", pos);
10593 }
10594 else {
10595 r.seek_cur(1);
10596 return this.token(TOKEN_MINUS, "-", pos);
10597 }
10598 }
10599 else if (c == ".") {
10600 if (r.p(1) == "." && r.p(2) == ".") {
10601 r.seek_cur(3);
10602 return this.token(TOKEN_DOTDOTDOT, "...", pos);
10603 }
10604 else if (r.p(1) == ".") {
10605 r.seek_cur(2);
10606 return this.token(TOKEN_DOTDOT, "..", pos);
10607 // TODO check scriptversion?
10608 }
10609 else {
10610 r.seek_cur(1);
10611 return this.token(TOKEN_DOT, ".", pos);
10612 // TODO check scriptversion?
10613 }
10614 }
10615 else if (c == "*") {
10616 r.seek_cur(1);
10617 return this.token(TOKEN_STAR, "*", pos);
10618 }
10619 else if (c == "/") {
10620 r.seek_cur(1);
10621 return this.token(TOKEN_SLASH, "/", pos);
10622 }
10623 else if (c == "%") {
10624 r.seek_cur(1);
10625 return this.token(TOKEN_PERCENT, "%", pos);
10626 }
10627 else if (c == "!") {
10628 r.seek_cur(1);
10629 return this.token(TOKEN_NOT, "!", pos);
10630 }
10631 else if (c == "?") {
10632 r.seek_cur(1);
10633 return this.token(TOKEN_QUESTION, "?", pos);
10634 }
10635 else if (c == ":") {
10636 r.seek_cur(1);
10637 return this.token(TOKEN_COLON, ":", pos);
10638 }
10639 else if (c == "#") {
10640 if (r.p(1) == "{") {
10641 r.seek_cur(2);
10642 return this.token(TOKEN_LITCOPEN, "#{", pos);
10643 }
10644 else {
10645 r.seek_cur(1);
10646 return this.token(TOKEN_SHARP, "#", pos);
10647 }
10648 }
10649 else if (c == "(") {
10650 r.seek_cur(1);
10651 return this.token(TOKEN_POPEN, "(", pos);
10652 }
10653 else if (c == ")") {
10654 r.seek_cur(1);
10655 return this.token(TOKEN_PCLOSE, ")", pos);
10656 }
10657 else if (c == "[") {
10658 r.seek_cur(1);
10659 return this.token(TOKEN_SQOPEN, "[", pos);
10660 }
10661 else if (c == "]") {
10662 r.seek_cur(1);
10663 return this.token(TOKEN_SQCLOSE, "]", pos);
10664 }
10665 else if (c == "{") {
10666 r.seek_cur(1);
10667 return this.token(TOKEN_COPEN, "{", pos);
10668 }
10669 else if (c == "}") {
10670 r.seek_cur(1);
10671 return this.token(TOKEN_CCLOSE, "}", pos);
10672 }
10673 else if (c == ",") {
10674 r.seek_cur(1);
10675 return this.token(TOKEN_COMMA, ",", pos);
10676 }
10677 else if (c == "'") {
10678 r.seek_cur(1);
10679 return this.token(TOKEN_SQUOTE, "'", pos);
10680 }
10681 else if (c == "\"") {
10682 r.seek_cur(1);
10683 return this.token(TOKEN_DQUOTE, "\"", pos);
10684 }
10685 else if (c == "$") {
10686 var s = r.getn(1);
10687 s += r.read_word();
10688 return this.token(TOKEN_ENV, s, pos);
10689 }
10690 else if (c == "@") {
10691 // @<EOL> is treated as @"
10692 return this.token(TOKEN_REG, r.getn(2), pos);
10693 }
10694 else if (c == "&") {
10695 var s = "";
10696 if ((r.p(1) == "g" || r.p(1) == "l") && r.p(2) == ":") {
10697 var s = r.getn(3) + r.read_word();
10698 }
10699 else {
10700 var s = r.getn(1) + r.read_word();
10701 }
10702 return this.token(TOKEN_OPTION, s, pos);
10703 }
10704 else if (c == "=") {
10705 r.seek_cur(1);
10706 return this.token(TOKEN_EQ, "=", pos);
10707 }
10708 else if (c == "|") {
10709 r.seek_cur(1);
10710 return this.token(TOKEN_OR, "|", pos);
10711 }
10712 else if (c == ";") {
10713 r.seek_cur(1);
10714 return this.token(TOKEN_SEMICOLON, ";", pos);
10715 }
10716 else if (c == "`") {
10717 r.seek_cur(1);
10718 return this.token(TOKEN_BACKTICK, "`", pos);
10719 }
10720 else {
10721 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10722 }
10723}
10724
10725ExprTokenizer.prototype.get_sstring = function() {
10726 this.reader.skip_white();
10727 var c = this.reader.p(0);
10728 if (c != "'") {
10729 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10730 }
10731 this.reader.seek_cur(1);
10732 var s = "";
10733 while (TRUE) {
10734 var c = this.reader.p(0);
10735 if (c == "<EOF>" || c == "<EOL>") {
10736 throw Err("unexpected EOL", this.reader.getpos());
10737 }
10738 else if (c == "'") {
10739 this.reader.seek_cur(1);
10740 if (this.reader.p(0) == "'") {
10741 this.reader.seek_cur(1);
10742 s += "''";
10743 }
10744 else {
10745 break;
10746 }
10747 }
10748 else {
10749 this.reader.seek_cur(1);
10750 s += c;
10751 }
10752 }
10753 return s;
10754}
10755
10756ExprTokenizer.prototype.get_dstring = function() {
10757 this.reader.skip_white();
10758 var c = this.reader.p(0);
10759 if (c != "\"") {
10760 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10761 }
10762 this.reader.seek_cur(1);
10763 var s = "";
10764 while (TRUE) {
10765 var c = this.reader.p(0);
10766 if (c == "<EOF>" || c == "<EOL>") {
10767 throw Err("unexpectd EOL", this.reader.getpos());
10768 }
10769 else if (c == "\"") {
10770 this.reader.seek_cur(1);
10771 break;
10772 }
10773 else if (c == "\\") {
10774 this.reader.seek_cur(1);
10775 s += c;
10776 var c = this.reader.p(0);
10777 if (c == "<EOF>" || c == "<EOL>") {
10778 throw Err("ExprTokenizer: unexpected EOL", this.reader.getpos());
10779 }
10780 this.reader.seek_cur(1);
10781 s += c;
10782 }
10783 else {
10784 this.reader.seek_cur(1);
10785 s += c;
10786 }
10787 }
10788 return s;
10789}
10790
10791ExprTokenizer.prototype.parse_dict_literal_key = function() {
10792 this.reader.skip_white();
10793 var c = this.reader.peek();
10794 if (!isalnum(c) && c != "_" && c != "-") {
10795 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10796 }
10797 var node = Node(NODE_STRING);
10798 var s = c;
10799 this.reader.seek_cur(1);
10800 node.pos = this.reader.getpos();
10801 while (TRUE) {
10802 var c = this.reader.p(0);
10803 if (c == "<EOF>" || c == "<EOL>") {
10804 throw Err("unexpectd EOL", this.reader.getpos());
10805 }
10806 if (!isalnum(c) && c != "_" && c != "-") {
10807 break;
10808 }
10809 this.reader.seek_cur(1);
10810 s += c;
10811 }
10812 node.value = "'" + s + "'";
10813 return node;
10814}
10815
10816function ExprParser() { this.__init__.apply(this, arguments); }
10817ExprParser.prototype.__init__ = function(reader) {
10818 this.reader = reader;
10819 this.tokenizer = new ExprTokenizer(reader);
10820}
10821
10822ExprParser.prototype.parse = function() {
10823 return this.parse_expr1();
10824}
10825
10826// expr1: expr2 ? expr1 : expr1
10827ExprParser.prototype.parse_expr1 = function() {
10828 var left = this.parse_expr2();
10829 var pos = this.reader.tell();
10830 var token = this.tokenizer.get();
10831 if (token.type == TOKEN_QUESTION) {
10832 var node = Node(NODE_TERNARY);
10833 node.pos = token.pos;
10834 node.cond = left;
10835 node.left = this.parse_expr1();
10836 var token = this.tokenizer.get();
10837 if (token.type != TOKEN_COLON) {
10838 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10839 }
10840 node.right = this.parse_expr1();
10841 var left = node;
10842 }
10843 else {
10844 this.reader.seek_set(pos);
10845 }
10846 return left;
10847}
10848
10849// expr2: expr3 || expr3 ..
10850ExprParser.prototype.parse_expr2 = function() {
10851 var left = this.parse_expr3();
10852 while (TRUE) {
10853 var pos = this.reader.tell();
10854 var token = this.tokenizer.get();
10855 if (token.type == TOKEN_OROR) {
10856 var node = Node(NODE_OR);
10857 node.pos = token.pos;
10858 node.left = left;
10859 node.right = this.parse_expr3();
10860 var left = node;
10861 }
10862 else {
10863 this.reader.seek_set(pos);
10864 break;
10865 }
10866 }
10867 return left;
10868}
10869
10870// expr3: expr4 && expr4
10871ExprParser.prototype.parse_expr3 = function() {
10872 var left = this.parse_expr4();
10873 while (TRUE) {
10874 var pos = this.reader.tell();
10875 var token = this.tokenizer.get();
10876 if (token.type == TOKEN_ANDAND) {
10877 var node = Node(NODE_AND);
10878 node.pos = token.pos;
10879 node.left = left;
10880 node.right = this.parse_expr4();
10881 var left = node;
10882 }
10883 else {
10884 this.reader.seek_set(pos);
10885 break;
10886 }
10887 }
10888 return left;
10889}
10890
10891// expr4: expr5 == expr5
10892// expr5 != expr5
10893// expr5 > expr5
10894// expr5 >= expr5
10895// expr5 < expr5
10896// expr5 <= expr5
10897// expr5 =~ expr5
10898// expr5 !~ expr5
10899//
10900// expr5 ==? expr5
10901// expr5 ==# expr5
10902// etc.
10903//
10904// expr5 is expr5
10905// expr5 isnot expr5
10906ExprParser.prototype.parse_expr4 = function() {
10907 var left = this.parse_expr5();
10908 var pos = this.reader.tell();
10909 var token = this.tokenizer.get();
10910 if (token.type == TOKEN_EQEQ) {
10911 var node = Node(NODE_EQUAL);
10912 node.pos = token.pos;
10913 node.left = left;
10914 node.right = this.parse_expr5();
10915 var left = node;
10916 }
10917 else if (token.type == TOKEN_EQEQCI) {
10918 var node = Node(NODE_EQUALCI);
10919 node.pos = token.pos;
10920 node.left = left;
10921 node.right = this.parse_expr5();
10922 var left = node;
10923 }
10924 else if (token.type == TOKEN_EQEQCS) {
10925 var node = Node(NODE_EQUALCS);
10926 node.pos = token.pos;
10927 node.left = left;
10928 node.right = this.parse_expr5();
10929 var left = node;
10930 }
10931 else if (token.type == TOKEN_NEQ) {
10932 var node = Node(NODE_NEQUAL);
10933 node.pos = token.pos;
10934 node.left = left;
10935 node.right = this.parse_expr5();
10936 var left = node;
10937 }
10938 else if (token.type == TOKEN_NEQCI) {
10939 var node = Node(NODE_NEQUALCI);
10940 node.pos = token.pos;
10941 node.left = left;
10942 node.right = this.parse_expr5();
10943 var left = node;
10944 }
10945 else if (token.type == TOKEN_NEQCS) {
10946 var node = Node(NODE_NEQUALCS);
10947 node.pos = token.pos;
10948 node.left = left;
10949 node.right = this.parse_expr5();
10950 var left = node;
10951 }
10952 else if (token.type == TOKEN_GT) {
10953 var node = Node(NODE_GREATER);
10954 node.pos = token.pos;
10955 node.left = left;
10956 node.right = this.parse_expr5();
10957 var left = node;
10958 }
10959 else if (token.type == TOKEN_GTCI) {
10960 var node = Node(NODE_GREATERCI);
10961 node.pos = token.pos;
10962 node.left = left;
10963 node.right = this.parse_expr5();
10964 var left = node;
10965 }
10966 else if (token.type == TOKEN_GTCS) {
10967 var node = Node(NODE_GREATERCS);
10968 node.pos = token.pos;
10969 node.left = left;
10970 node.right = this.parse_expr5();
10971 var left = node;
10972 }
10973 else if (token.type == TOKEN_GTEQ) {
10974 var node = Node(NODE_GEQUAL);
10975 node.pos = token.pos;
10976 node.left = left;
10977 node.right = this.parse_expr5();
10978 var left = node;
10979 }
10980 else if (token.type == TOKEN_GTEQCI) {
10981 var node = Node(NODE_GEQUALCI);
10982 node.pos = token.pos;
10983 node.left = left;
10984 node.right = this.parse_expr5();
10985 var left = node;
10986 }
10987 else if (token.type == TOKEN_GTEQCS) {
10988 var node = Node(NODE_GEQUALCS);
10989 node.pos = token.pos;
10990 node.left = left;
10991 node.right = this.parse_expr5();
10992 var left = node;
10993 }
10994 else if (token.type == TOKEN_LT) {
10995 var node = Node(NODE_SMALLER);
10996 node.pos = token.pos;
10997 node.left = left;
10998 node.right = this.parse_expr5();
10999 var left = node;
11000 }
11001 else if (token.type == TOKEN_LTCI) {
11002 var node = Node(NODE_SMALLERCI);
11003 node.pos = token.pos;
11004 node.left = left;
11005 node.right = this.parse_expr5();
11006 var left = node;
11007 }
11008 else if (token.type == TOKEN_LTCS) {
11009 var node = Node(NODE_SMALLERCS);
11010 node.pos = token.pos;
11011 node.left = left;
11012 node.right = this.parse_expr5();
11013 var left = node;
11014 }
11015 else if (token.type == TOKEN_LTEQ) {
11016 var node = Node(NODE_SEQUAL);
11017 node.pos = token.pos;
11018 node.left = left;
11019 node.right = this.parse_expr5();
11020 var left = node;
11021 }
11022 else if (token.type == TOKEN_LTEQCI) {
11023 var node = Node(NODE_SEQUALCI);
11024 node.pos = token.pos;
11025 node.left = left;
11026 node.right = this.parse_expr5();
11027 var left = node;
11028 }
11029 else if (token.type == TOKEN_LTEQCS) {
11030 var node = Node(NODE_SEQUALCS);
11031 node.pos = token.pos;
11032 node.left = left;
11033 node.right = this.parse_expr5();
11034 var left = node;
11035 }
11036 else if (token.type == TOKEN_MATCH) {
11037 var node = Node(NODE_MATCH);
11038 node.pos = token.pos;
11039 node.left = left;
11040 node.right = this.parse_expr5();
11041 var left = node;
11042 }
11043 else if (token.type == TOKEN_MATCHCI) {
11044 var node = Node(NODE_MATCHCI);
11045 node.pos = token.pos;
11046 node.left = left;
11047 node.right = this.parse_expr5();
11048 var left = node;
11049 }
11050 else if (token.type == TOKEN_MATCHCS) {
11051 var node = Node(NODE_MATCHCS);
11052 node.pos = token.pos;
11053 node.left = left;
11054 node.right = this.parse_expr5();
11055 var left = node;
11056 }
11057 else if (token.type == TOKEN_NOMATCH) {
11058 var node = Node(NODE_NOMATCH);
11059 node.pos = token.pos;
11060 node.left = left;
11061 node.right = this.parse_expr5();
11062 var left = node;
11063 }
11064 else if (token.type == TOKEN_NOMATCHCI) {
11065 var node = Node(NODE_NOMATCHCI);
11066 node.pos = token.pos;
11067 node.left = left;
11068 node.right = this.parse_expr5();
11069 var left = node;
11070 }
11071 else if (token.type == TOKEN_NOMATCHCS) {
11072 var node = Node(NODE_NOMATCHCS);
11073 node.pos = token.pos;
11074 node.left = left;
11075 node.right = this.parse_expr5();
11076 var left = node;
11077 }
11078 else if (token.type == TOKEN_IS) {
11079 var node = Node(NODE_IS);
11080 node.pos = token.pos;
11081 node.left = left;
11082 node.right = this.parse_expr5();
11083 var left = node;
11084 }
11085 else if (token.type == TOKEN_ISCI) {
11086 var node = Node(NODE_ISCI);
11087 node.pos = token.pos;
11088 node.left = left;
11089 node.right = this.parse_expr5();
11090 var left = node;
11091 }
11092 else if (token.type == TOKEN_ISCS) {
11093 var node = Node(NODE_ISCS);
11094 node.pos = token.pos;
11095 node.left = left;
11096 node.right = this.parse_expr5();
11097 var left = node;
11098 }
11099 else if (token.type == TOKEN_ISNOT) {
11100 var node = Node(NODE_ISNOT);
11101 node.pos = token.pos;
11102 node.left = left;
11103 node.right = this.parse_expr5();
11104 var left = node;
11105 }
11106 else if (token.type == TOKEN_ISNOTCI) {
11107 var node = Node(NODE_ISNOTCI);
11108 node.pos = token.pos;
11109 node.left = left;
11110 node.right = this.parse_expr5();
11111 var left = node;
11112 }
11113 else if (token.type == TOKEN_ISNOTCS) {
11114 var node = Node(NODE_ISNOTCS);
11115 node.pos = token.pos;
11116 node.left = left;
11117 node.right = this.parse_expr5();
11118 var left = node;
11119 }
11120 else {
11121 this.reader.seek_set(pos);
11122 }
11123 return left;
11124}
11125
11126// expr5: expr6 + expr6 ..
11127// expr6 - expr6 ..
11128// expr6 . expr6 ..
11129// expr6 .. expr6 ..
11130ExprParser.prototype.parse_expr5 = function() {
11131 var left = this.parse_expr6();
11132 while (TRUE) {
11133 var pos = this.reader.tell();
11134 var token = this.tokenizer.get();
11135 if (token.type == TOKEN_PLUS) {
11136 var node = Node(NODE_ADD);
11137 node.pos = token.pos;
11138 node.left = left;
11139 node.right = this.parse_expr6();
11140 var left = node;
11141 }
11142 else if (token.type == TOKEN_MINUS) {
11143 var node = Node(NODE_SUBTRACT);
11144 node.pos = token.pos;
11145 node.left = left;
11146 node.right = this.parse_expr6();
11147 var left = node;
11148 }
11149 else if (token.type == TOKEN_DOTDOT) {
11150 // TODO check scriptversion?
11151 var node = Node(NODE_CONCAT);
11152 node.pos = token.pos;
11153 node.left = left;
11154 node.right = this.parse_expr6();
11155 var left = node;
11156 }
11157 else if (token.type == TOKEN_DOT) {
11158 // TODO check scriptversion?
11159 var node = Node(NODE_CONCAT);
11160 node.pos = token.pos;
11161 node.left = left;
11162 node.right = this.parse_expr6();
11163 var left = node;
11164 }
11165 else {
11166 this.reader.seek_set(pos);
11167 break;
11168 }
11169 }
11170 return left;
11171}
11172
11173// expr6: expr7 * expr7 ..
11174// expr7 / expr7 ..
11175// expr7 % expr7 ..
11176ExprParser.prototype.parse_expr6 = function() {
11177 var left = this.parse_expr7();
11178 while (TRUE) {
11179 var pos = this.reader.tell();
11180 var token = this.tokenizer.get();
11181 if (token.type == TOKEN_STAR) {
11182 var node = Node(NODE_MULTIPLY);
11183 node.pos = token.pos;
11184 node.left = left;
11185 node.right = this.parse_expr7();
11186 var left = node;
11187 }
11188 else if (token.type == TOKEN_SLASH) {
11189 var node = Node(NODE_DIVIDE);
11190 node.pos = token.pos;
11191 node.left = left;
11192 node.right = this.parse_expr7();
11193 var left = node;
11194 }
11195 else if (token.type == TOKEN_PERCENT) {
11196 var node = Node(NODE_REMAINDER);
11197 node.pos = token.pos;
11198 node.left = left;
11199 node.right = this.parse_expr7();
11200 var left = node;
11201 }
11202 else {
11203 this.reader.seek_set(pos);
11204 break;
11205 }
11206 }
11207 return left;
11208}
11209
11210// expr7: ! expr7
11211// - expr7
11212// + expr7
11213ExprParser.prototype.parse_expr7 = function() {
11214 var pos = this.reader.tell();
11215 var token = this.tokenizer.get();
11216 if (token.type == TOKEN_NOT) {
11217 var node = Node(NODE_NOT);
11218 node.pos = token.pos;
11219 node.left = this.parse_expr7();
11220 return node;
11221 }
11222 else if (token.type == TOKEN_MINUS) {
11223 var node = Node(NODE_MINUS);
11224 node.pos = token.pos;
11225 node.left = this.parse_expr7();
11226 return node;
11227 }
11228 else if (token.type == TOKEN_PLUS) {
11229 var node = Node(NODE_PLUS);
11230 node.pos = token.pos;
11231 node.left = this.parse_expr7();
11232 return node;
11233 }
11234 else {
11235 this.reader.seek_set(pos);
11236 var node = this.parse_expr8();
11237 return node;
11238 }
11239}
11240
11241// expr8: expr8[expr1]
11242// expr8[expr1 : expr1]
11243// expr8.name
11244// expr8->name(expr1, ...)
11245// expr8->s:user_func(expr1, ...)
11246// expr8->{lambda}(expr1, ...)
11247// expr8(expr1, ...)
11248ExprParser.prototype.parse_expr8 = function() {
11249 var left = this.parse_expr9();
11250 while (TRUE) {
11251 var pos = this.reader.tell();
11252 var c = this.reader.peek();
11253 var token = this.tokenizer.get();
11254 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
11255 var npos = token.pos;
11256 if (this.tokenizer.peek().type == TOKEN_COLON) {
11257 this.tokenizer.get();
11258 var node = Node(NODE_SLICE);
11259 node.pos = npos;
11260 node.left = left;
11261 node.rlist = [NIL, NIL];
11262 var token = this.tokenizer.peek();
11263 if (token.type != TOKEN_SQCLOSE) {
11264 node.rlist[1] = this.parse_expr1();
11265 }
11266 var token = this.tokenizer.get();
11267 if (token.type != TOKEN_SQCLOSE) {
11268 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11269 }
11270 var left = node;
11271 }
11272 else {
11273 var right = this.parse_expr1();
11274 if (this.tokenizer.peek().type == TOKEN_COLON) {
11275 this.tokenizer.get();
11276 var node = Node(NODE_SLICE);
11277 node.pos = npos;
11278 node.left = left;
11279 node.rlist = [right, NIL];
11280 var token = this.tokenizer.peek();
11281 if (token.type != TOKEN_SQCLOSE) {
11282 node.rlist[1] = this.parse_expr1();
11283 }
11284 var token = this.tokenizer.get();
11285 if (token.type != TOKEN_SQCLOSE) {
11286 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11287 }
11288 var left = node;
11289 }
11290 else {
11291 var node = Node(NODE_SUBSCRIPT);
11292 node.pos = npos;
11293 node.left = left;
11294 node.right = right;
11295 var token = this.tokenizer.get();
11296 if (token.type != TOKEN_SQCLOSE) {
11297 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11298 }
11299 var left = node;
11300 }
11301 }
11302 delete node;
11303 }
11304 else if (token.type == TOKEN_ARROW) {
11305 var funcname_or_lambda = this.parse_expr9();
11306 var token = this.tokenizer.get();
11307 if (token.type != TOKEN_POPEN) {
11308 throw Err("E107: Missing parentheses: lambda", token.pos);
11309 }
11310 var right = Node(NODE_CALL);
11311 right.pos = token.pos;
11312 right.left = funcname_or_lambda;
11313 right.rlist = this.parse_rlist();
11314 var node = Node(NODE_METHOD);
11315 node.pos = token.pos;
11316 node.left = left;
11317 node.right = right;
11318 var left = node;
11319 delete node;
11320 }
11321 else if (token.type == TOKEN_POPEN) {
11322 var node = Node(NODE_CALL);
11323 node.pos = token.pos;
11324 node.left = left;
11325 node.rlist = this.parse_rlist();
11326 var left = node;
11327 delete node;
11328 }
11329 else if (!iswhite(c) && token.type == TOKEN_DOT) {
11330 // TODO check scriptversion?
11331 var node = this.parse_dot(token, left);
11332 if (node === NIL) {
11333 this.reader.seek_set(pos);
11334 break;
11335 }
11336 var left = node;
11337 delete node;
11338 }
11339 else {
11340 this.reader.seek_set(pos);
11341 break;
11342 }
11343 }
11344 return left;
11345}
11346
11347ExprParser.prototype.parse_rlist = function() {
11348 var rlist = [];
11349 var token = this.tokenizer.peek();
11350 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
11351 this.tokenizer.get();
11352 }
11353 else {
11354 while (TRUE) {
11355 viml_add(rlist, this.parse_expr1());
11356 var token = this.tokenizer.get();
11357 if (token.type == TOKEN_COMMA) {
11358 // XXX: Vim allows foo(a, b, ). Lint should warn it.
11359 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
11360 this.tokenizer.get();
11361 break;
11362 }
11363 }
11364 else if (token.type == TOKEN_PCLOSE) {
11365 break;
11366 }
11367 else {
11368 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11369 }
11370 }
11371 }
11372 if (viml_len(rlist) > MAX_FUNC_ARGS) {
11373 // TODO: funcname E740: Too many arguments for function: %s
11374 throw Err("E740: Too many arguments for function", token.pos);
11375 }
11376 return rlist;
11377}
11378
11379// expr9: number
11380// "string"
11381// 'string'
11382// [expr1, ...]
11383// {expr1: expr1, ...}
11384// #{literal_key1: expr1, ...}
11385// {args -> expr1}
11386// &option
11387// (expr1)
11388// variable
11389// var{ria}ble
11390// $VAR
11391// @r
11392// function(expr1, ...)
11393// func{ti}on(expr1, ...)
11394ExprParser.prototype.parse_expr9 = function() {
11395 var pos = this.reader.tell();
11396 var token = this.tokenizer.get();
11397 var node = Node(-1);
11398 if (token.type == TOKEN_NUMBER) {
11399 var node = Node(NODE_NUMBER);
11400 node.pos = token.pos;
11401 node.value = token.value;
11402 }
11403 else if (token.type == TOKEN_BLOB) {
11404 var node = Node(NODE_BLOB);
11405 node.pos = token.pos;
11406 node.value = token.value;
11407 }
11408 else if (token.type == TOKEN_DQUOTE) {
11409 this.reader.seek_set(pos);
11410 var node = Node(NODE_STRING);
11411 node.pos = token.pos;
11412 node.value = "\"" + this.tokenizer.get_dstring() + "\"";
11413 }
11414 else if (token.type == TOKEN_SQUOTE) {
11415 this.reader.seek_set(pos);
11416 var node = Node(NODE_STRING);
11417 node.pos = token.pos;
11418 node.value = "'" + this.tokenizer.get_sstring() + "'";
11419 }
11420 else if (token.type == TOKEN_SQOPEN) {
11421 var node = Node(NODE_LIST);
11422 node.pos = token.pos;
11423 node.value = [];
11424 var token = this.tokenizer.peek();
11425 if (token.type == TOKEN_SQCLOSE) {
11426 this.tokenizer.get();
11427 }
11428 else {
11429 while (TRUE) {
11430 viml_add(node.value, this.parse_expr1());
11431 var token = this.tokenizer.peek();
11432 if (token.type == TOKEN_COMMA) {
11433 this.tokenizer.get();
11434 if (this.tokenizer.peek().type == TOKEN_SQCLOSE) {
11435 this.tokenizer.get();
11436 break;
11437 }
11438 }
11439 else if (token.type == TOKEN_SQCLOSE) {
11440 this.tokenizer.get();
11441 break;
11442 }
11443 else {
11444 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11445 }
11446 }
11447 }
11448 }
11449 else if (token.type == TOKEN_COPEN || token.type == TOKEN_LITCOPEN) {
11450 var is_litdict = token.type == TOKEN_LITCOPEN;
11451 var savepos = this.reader.tell();
11452 var nodepos = token.pos;
11453 var token = this.tokenizer.get();
11454 var lambda = token.type == TOKEN_ARROW;
11455 if (!lambda && !(token.type == TOKEN_SQUOTE || token.type == TOKEN_DQUOTE)) {
11456 // if the token type is stirng, we cannot peek next token and we can
11457 // assume it's not lambda.
11458 var token2 = this.tokenizer.peek();
11459 var lambda = token2.type == TOKEN_ARROW || token2.type == TOKEN_COMMA;
11460 }
11461 // fallback to dict or {expr} if true
11462 var fallback = FALSE;
11463 if (lambda) {
11464 // lambda {token,...} {->...} {token->...}
11465 var node = Node(NODE_LAMBDA);
11466 node.pos = nodepos;
11467 node.rlist = [];
11468 var named = {};
11469 while (TRUE) {
11470 if (token.type == TOKEN_ARROW) {
11471 break;
11472 }
11473 else if (token.type == TOKEN_IDENTIFIER) {
11474 if (!isargname(token.value)) {
11475 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
11476 }
11477 else if (viml_has_key(named, token.value)) {
11478 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
11479 }
11480 named[token.value] = 1;
11481 var varnode = Node(NODE_IDENTIFIER);
11482 varnode.pos = token.pos;
11483 varnode.value = token.value;
11484 // XXX: Vim doesn't skip white space before comma. {a ,b -> ...} => E475
11485 if (iswhite(this.reader.p(0)) && this.tokenizer.peek().type == TOKEN_COMMA) {
11486 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
11487 }
11488 var token = this.tokenizer.get();
11489 viml_add(node.rlist, varnode);
11490 if (token.type == TOKEN_COMMA) {
11491 // XXX: Vim allows last comma. {a, b, -> ...} => OK
11492 var token = this.tokenizer.peek();
11493 if (token.type == TOKEN_ARROW) {
11494 this.tokenizer.get();
11495 break;
11496 }
11497 }
11498 else if (token.type == TOKEN_ARROW) {
11499 break;
11500 }
11501 else {
11502 throw Err(viml_printf("unexpected token: %s, type: %d", token.value, token.type), token.pos);
11503 }
11504 }
11505 else if (token.type == TOKEN_DOTDOTDOT) {
11506 var varnode = Node(NODE_IDENTIFIER);
11507 varnode.pos = token.pos;
11508 varnode.value = token.value;
11509 viml_add(node.rlist, varnode);
11510 var token = this.tokenizer.peek();
11511 if (token.type == TOKEN_ARROW) {
11512 this.tokenizer.get();
11513 break;
11514 }
11515 else {
11516 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11517 }
11518 }
11519 else {
11520 var fallback = TRUE;
11521 break;
11522 }
11523 var token = this.tokenizer.get();
11524 }
11525 if (!fallback) {
11526 node.left = this.parse_expr1();
11527 var token = this.tokenizer.get();
11528 if (token.type != TOKEN_CCLOSE) {
11529 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11530 }
11531 return node;
11532 }
11533 }
11534 // dict
11535 var node = Node(NODE_DICT);
11536 node.pos = nodepos;
11537 node.value = [];
11538 this.reader.seek_set(savepos);
11539 var token = this.tokenizer.peek();
11540 if (token.type == TOKEN_CCLOSE) {
11541 this.tokenizer.get();
11542 return node;
11543 }
11544 while (1) {
11545 var key = is_litdict ? this.tokenizer.parse_dict_literal_key() : this.parse_expr1();
11546 var token = this.tokenizer.get();
11547 if (token.type == TOKEN_CCLOSE) {
11548 if (!viml_empty(node.value)) {
11549 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11550 }
11551 this.reader.seek_set(pos);
11552 var node = this.parse_identifier();
11553 break;
11554 }
11555 if (token.type != TOKEN_COLON) {
11556 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11557 }
11558 var val = this.parse_expr1();
11559 viml_add(node.value, [key, val]);
11560 var token = this.tokenizer.get();
11561 if (token.type == TOKEN_COMMA) {
11562 if (this.tokenizer.peek().type == TOKEN_CCLOSE) {
11563 this.tokenizer.get();
11564 break;
11565 }
11566 }
11567 else if (token.type == TOKEN_CCLOSE) {
11568 break;
11569 }
11570 else {
11571 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11572 }
11573 }
11574 return node;
11575 }
11576 else if (token.type == TOKEN_POPEN) {
11577 var node = this.parse_expr1();
11578 var token = this.tokenizer.get();
11579 if (token.type != TOKEN_PCLOSE) {
11580 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11581 }
11582 }
11583 else if (token.type == TOKEN_OPTION) {
11584 var node = Node(NODE_OPTION);
11585 node.pos = token.pos;
11586 node.value = token.value;
11587 }
11588 else if (token.type == TOKEN_IDENTIFIER) {
11589 this.reader.seek_set(pos);
11590 var node = this.parse_identifier();
11591 }
11592 else if (FALSE && (token.type == TOKEN_COLON || token.type == TOKEN_SHARP)) {
11593 // XXX: no parse error but invalid expression
11594 this.reader.seek_set(pos);
11595 var node = this.parse_identifier();
11596 }
11597 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
11598 this.reader.seek_set(pos);
11599 var node = this.parse_identifier();
11600 }
11601 else if (token.type == TOKEN_IS || token.type == TOKEN_ISCS || token.type == TOKEN_ISNOT || token.type == TOKEN_ISNOTCS) {
11602 this.reader.seek_set(pos);
11603 var node = this.parse_identifier();
11604 }
11605 else if (token.type == TOKEN_ENV) {
11606 var node = Node(NODE_ENV);
11607 node.pos = token.pos;
11608 node.value = token.value;
11609 }
11610 else if (token.type == TOKEN_REG) {
11611 var node = Node(NODE_REG);
11612 node.pos = token.pos;
11613 node.value = token.value;
11614 }
11615 else {
11616 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11617 }
11618 return node;
11619}
11620
11621// SUBSCRIPT or CONCAT
11622// dict "." [0-9A-Za-z_]+ => (subscript dict key)
11623// str "." expr6 => (concat str expr6)
11624ExprParser.prototype.parse_dot = function(token, left) {
11625 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) {
11626 return NIL;
11627 }
11628 if (!iswordc(this.reader.p(0))) {
11629 return NIL;
11630 }
11631 var pos = this.reader.getpos();
11632 var name = this.reader.read_word();
11633 if (isnamec(this.reader.p(0))) {
11634 // XXX: foo is str => ok, foo is obj => invalid expression
11635 // foo.s:bar or foo.bar#baz
11636 return NIL;
11637 }
11638 var node = Node(NODE_DOT);
11639 node.pos = token.pos;
11640 node.left = left;
11641 node.right = Node(NODE_IDENTIFIER);
11642 node.right.pos = pos;
11643 node.right.value = name;
11644 return node;
11645}
11646
11647// CONCAT
11648// str ".." expr6 => (concat str expr6)
11649ExprParser.prototype.parse_concat = function(token, left) {
11650 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) {
11651 return NIL;
11652 }
11653 if (!iswordc(this.reader.p(0))) {
11654 return NIL;
11655 }
11656 var pos = this.reader.getpos();
11657 var name = this.reader.read_word();
11658 if (isnamec(this.reader.p(0))) {
11659 // XXX: foo is str => ok, foo is obj => invalid expression
11660 // foo.s:bar or foo.bar#baz
11661 return NIL;
11662 }
11663 var node = Node(NODE_CONCAT);
11664 node.pos = token.pos;
11665 node.left = left;
11666 node.right = Node(NODE_IDENTIFIER);
11667 node.right.pos = pos;
11668 node.right.value = name;
11669 return node;
11670}
11671
11672ExprParser.prototype.parse_identifier = function() {
11673 this.reader.skip_white();
11674 var npos = this.reader.getpos();
11675 var curly_parts = this.parse_curly_parts();
11676 if (viml_len(curly_parts) == 1 && curly_parts[0].type == NODE_CURLYNAMEPART) {
11677 var node = Node(NODE_IDENTIFIER);
11678 node.pos = npos;
11679 node.value = curly_parts[0].value;
11680 return node;
11681 }
11682 else {
11683 var node = Node(NODE_CURLYNAME);
11684 node.pos = npos;
11685 node.value = curly_parts;
11686 return node;
11687 }
11688}
11689
11690ExprParser.prototype.parse_curly_parts = function() {
11691 var curly_parts = [];
11692 var c = this.reader.peek();
11693 var pos = this.reader.getpos();
11694 if (c == "<" && viml_equalci(this.reader.peekn(5), "<SID>")) {
11695 var name = this.reader.getn(5);
11696 var node = Node(NODE_CURLYNAMEPART);
11697 node.curly = FALSE;
11698 // Keep backword compatibility for the curly attribute
11699 node.pos = pos;
11700 node.value = name;
11701 viml_add(curly_parts, node);
11702 }
11703 while (TRUE) {
11704 var c = this.reader.peek();
11705 if (isnamec(c)) {
11706 var pos = this.reader.getpos();
11707 var name = this.reader.read_name();
11708 var node = Node(NODE_CURLYNAMEPART);
11709 node.curly = FALSE;
11710 // Keep backword compatibility for the curly attribute
11711 node.pos = pos;
11712 node.value = name;
11713 viml_add(curly_parts, node);
11714 }
11715 else if (c == "{") {
11716 this.reader.get();
11717 var pos = this.reader.getpos();
11718 var node = Node(NODE_CURLYNAMEEXPR);
11719 node.curly = TRUE;
11720 // Keep backword compatibility for the curly attribute
11721 node.pos = pos;
11722 node.value = this.parse_expr1();
11723 viml_add(curly_parts, node);
11724 this.reader.skip_white();
11725 var c = this.reader.p(0);
11726 if (c != "}") {
11727 throw Err(viml_printf("unexpected token: %s", c), this.reader.getpos());
11728 }
11729 this.reader.seek_cur(1);
11730 }
11731 else {
11732 break;
11733 }
11734 }
11735 return curly_parts;
11736}
11737
11738function LvalueParser() { ExprParser.apply(this, arguments); this.__init__.apply(this, arguments); }
11739LvalueParser.prototype = Object.create(ExprParser.prototype);
11740LvalueParser.prototype.parse = function() {
11741 return this.parse_lv8();
11742}
11743
11744// expr8: expr8[expr1]
11745// expr8[expr1 : expr1]
11746// expr8.name
11747LvalueParser.prototype.parse_lv8 = function() {
11748 var left = this.parse_lv9();
11749 while (TRUE) {
11750 var pos = this.reader.tell();
11751 var c = this.reader.peek();
11752 var token = this.tokenizer.get();
11753 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
11754 var npos = token.pos;
11755 var node = Node(-1);
11756 if (this.tokenizer.peek().type == TOKEN_COLON) {
11757 this.tokenizer.get();
11758 var node = Node(NODE_SLICE);
11759 node.pos = npos;
11760 node.left = left;
11761 node.rlist = [NIL, NIL];
11762 var token = this.tokenizer.peek();
11763 if (token.type != TOKEN_SQCLOSE) {
11764 node.rlist[1] = this.parse_expr1();
11765 }
11766 var token = this.tokenizer.get();
11767 if (token.type != TOKEN_SQCLOSE) {
11768 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11769 }
11770 }
11771 else {
11772 var right = this.parse_expr1();
11773 if (this.tokenizer.peek().type == TOKEN_COLON) {
11774 this.tokenizer.get();
11775 var node = Node(NODE_SLICE);
11776 node.pos = npos;
11777 node.left = left;
11778 node.rlist = [right, NIL];
11779 var token = this.tokenizer.peek();
11780 if (token.type != TOKEN_SQCLOSE) {
11781 node.rlist[1] = this.parse_expr1();
11782 }
11783 var token = this.tokenizer.get();
11784 if (token.type != TOKEN_SQCLOSE) {
11785 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11786 }
11787 }
11788 else {
11789 var node = Node(NODE_SUBSCRIPT);
11790 node.pos = npos;
11791 node.left = left;
11792 node.right = right;
11793 var token = this.tokenizer.get();
11794 if (token.type != TOKEN_SQCLOSE) {
11795 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11796 }
11797 }
11798 }
11799 var left = node;
11800 delete node;
11801 }
11802 else if (!iswhite(c) && token.type == TOKEN_DOT) {
11803 var node = this.parse_dot(token, left);
11804 if (node === NIL) {
11805 this.reader.seek_set(pos);
11806 break;
11807 }
11808 var left = node;
11809 delete node;
11810 }
11811 else {
11812 this.reader.seek_set(pos);
11813 break;
11814 }
11815 }
11816 return left;
11817}
11818
11819// expr9: &option
11820// variable
11821// var{ria}ble
11822// $VAR
11823// @r
11824LvalueParser.prototype.parse_lv9 = function() {
11825 var pos = this.reader.tell();
11826 var token = this.tokenizer.get();
11827 var node = Node(-1);
11828 if (token.type == TOKEN_COPEN) {
11829 this.reader.seek_set(pos);
11830 var node = this.parse_identifier();
11831 }
11832 else if (token.type == TOKEN_OPTION) {
11833 var node = Node(NODE_OPTION);
11834 node.pos = token.pos;
11835 node.value = token.value;
11836 }
11837 else if (token.type == TOKEN_IDENTIFIER) {
11838 this.reader.seek_set(pos);
11839 var node = this.parse_identifier();
11840 }
11841 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
11842 this.reader.seek_set(pos);
11843 var node = this.parse_identifier();
11844 }
11845 else if (token.type == TOKEN_ENV) {
11846 var node = Node(NODE_ENV);
11847 node.pos = token.pos;
11848 node.value = token.value;
11849 }
11850 else if (token.type == TOKEN_REG) {
11851 var node = Node(NODE_REG);
11852 node.pos = token.pos;
11853 node.pos = token.pos;
11854 node.value = token.value;
11855 }
11856 else {
11857 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11858 }
11859 return node;
11860}
11861
11862function StringReader() { this.__init__.apply(this, arguments); }
11863StringReader.prototype.__init__ = function(lines) {
11864 this.buf = [];
11865 this.pos = [];
11866 var lnum = 0;
11867 var offset = 0;
11868 while (lnum < viml_len(lines)) {
11869 var col = 0;
11870 var __c7 = viml_split(lines[lnum], "\\zs");
11871 for (var __i7 = 0; __i7 < __c7.length; ++__i7) {
11872 var c = __c7[__i7];
11873 viml_add(this.buf, c);
11874 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11875 col += viml_len(c);
11876 offset += viml_len(c);
11877 }
11878 while (lnum + 1 < viml_len(lines) && viml_eqregh(lines[lnum + 1], "^\\s*\\\\")) {
11879 var skip = TRUE;
11880 var col = 0;
11881 var __c8 = viml_split(lines[lnum + 1], "\\zs");
11882 for (var __i8 = 0; __i8 < __c8.length; ++__i8) {
11883 var c = __c8[__i8];
11884 if (skip) {
11885 if (c == "\\") {
11886 var skip = FALSE;
11887 }
11888 }
11889 else {
11890 viml_add(this.buf, c);
11891 viml_add(this.pos, [lnum + 2, col + 1, offset]);
11892 }
11893 col += viml_len(c);
11894 offset += viml_len(c);
11895 }
11896 lnum += 1;
11897 offset += 1;
11898 }
11899 viml_add(this.buf, "<EOL>");
11900 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11901 lnum += 1;
11902 offset += 1;
11903 }
11904 // for <EOF>
11905 viml_add(this.pos, [lnum + 1, 0, offset]);
11906 this.i = 0;
11907}
11908
11909StringReader.prototype.eof = function() {
11910 return this.i >= viml_len(this.buf);
11911}
11912
11913StringReader.prototype.tell = function() {
11914 return this.i;
11915}
11916
11917StringReader.prototype.seek_set = function(i) {
11918 this.i = i;
11919}
11920
11921StringReader.prototype.seek_cur = function(i) {
11922 this.i = this.i + i;
11923}
11924
11925StringReader.prototype.seek_end = function(i) {
11926 this.i = viml_len(this.buf) + i;
11927}
11928
11929StringReader.prototype.p = function(i) {
11930 if (this.i >= viml_len(this.buf)) {
11931 return "<EOF>";
11932 }
11933 return this.buf[this.i + i];
11934}
11935
11936StringReader.prototype.peek = function() {
11937 if (this.i >= viml_len(this.buf)) {
11938 return "<EOF>";
11939 }
11940 return this.buf[this.i];
11941}
11942
11943StringReader.prototype.get = function() {
11944 if (this.i >= viml_len(this.buf)) {
11945 return "<EOF>";
11946 }
11947 this.i += 1;
11948 return this.buf[this.i - 1];
11949}
11950
11951StringReader.prototype.peekn = function(n) {
11952 var pos = this.tell();
11953 var r = this.getn(n);
11954 this.seek_set(pos);
11955 return r;
11956}
11957
11958StringReader.prototype.getn = function(n) {
11959 var r = "";
11960 var j = 0;
11961 while (this.i < viml_len(this.buf) && (n < 0 || j < n)) {
11962 var c = this.buf[this.i];
11963 if (c == "<EOL>") {
11964 break;
11965 }
11966 r += c;
11967 this.i += 1;
11968 j += 1;
11969 }
11970 return r;
11971}
11972
11973StringReader.prototype.peekline = function() {
11974 return this.peekn(-1);
11975}
11976
11977StringReader.prototype.readline = function() {
11978 var r = this.getn(-1);
11979 this.get();
11980 return r;
11981}
11982
11983StringReader.prototype.getstr = function(begin, end) {
11984 var r = "";
11985 var __c9 = viml_range(begin.i, end.i - 1);
11986 for (var __i9 = 0; __i9 < __c9.length; ++__i9) {
11987 var i = __c9[__i9];
11988 if (i >= viml_len(this.buf)) {
11989 break;
11990 }
11991 var c = this.buf[i];
11992 if (c == "<EOL>") {
11993 var c = "\n";
11994 }
11995 r += c;
11996 }
11997 return r;
11998}
11999
12000StringReader.prototype.getpos = function() {
12001 var __tmp = this.pos[this.i];
12002 var lnum = __tmp[0];
12003 var col = __tmp[1];
12004 var offset = __tmp[2];
12005 return {"i":this.i, "lnum":lnum, "col":col, "offset":offset};
12006}
12007
12008StringReader.prototype.setpos = function(pos) {
12009 this.i = pos.i;
12010}
12011
12012StringReader.prototype.read_alpha = function() {
12013 var r = "";
12014 while (isalpha(this.peekn(1))) {
12015 r += this.getn(1);
12016 }
12017 return r;
12018}
12019
12020StringReader.prototype.read_alnum = function() {
12021 var r = "";
12022 while (isalnum(this.peekn(1))) {
12023 r += this.getn(1);
12024 }
12025 return r;
12026}
12027
12028StringReader.prototype.read_digit = function() {
12029 var r = "";
12030 while (isdigit(this.peekn(1))) {
12031 r += this.getn(1);
12032 }
12033 return r;
12034}
12035
12036StringReader.prototype.read_odigit = function() {
12037 var r = "";
12038 while (isodigit(this.peekn(1))) {
12039 r += this.getn(1);
12040 }
12041 return r;
12042}
12043
12044StringReader.prototype.read_blob = function() {
12045 var r = "";
12046 while (1) {
12047 var s = this.peekn(2);
12048 if (viml_eqregh(s, "^[0-9A-Fa-f][0-9A-Fa-f]$")) {
12049 r += this.getn(2);
12050 }
12051 else if (viml_eqregh(s, "^\\.[0-9A-Fa-f]$")) {
12052 r += this.getn(1);
12053 }
12054 else if (viml_eqregh(s, "^[0-9A-Fa-f][^0-9A-Fa-f]$")) {
12055 throw Err("E973: Blob literal should have an even number of hex characters:" + s, this.getpos());
12056 }
12057 else {
12058 break;
12059 }
12060 }
12061 return r;
12062}
12063
12064StringReader.prototype.read_xdigit = function() {
12065 var r = "";
12066 while (isxdigit(this.peekn(1))) {
12067 r += this.getn(1);
12068 }
12069 return r;
12070}
12071
12072StringReader.prototype.read_bdigit = function() {
12073 var r = "";
12074 while (this.peekn(1) == "0" || this.peekn(1) == "1") {
12075 r += this.getn(1);
12076 }
12077 return r;
12078}
12079
12080StringReader.prototype.read_integer = function() {
12081 var r = "";
12082 var c = this.peekn(1);
12083 if (c == "-" || c == "+") {
12084 var r = this.getn(1);
12085 }
12086 return r + this.read_digit();
12087}
12088
12089StringReader.prototype.read_word = function() {
12090 var r = "";
12091 while (iswordc(this.peekn(1))) {
12092 r += this.getn(1);
12093 }
12094 return r;
12095}
12096
12097StringReader.prototype.read_white = function() {
12098 var r = "";
12099 while (iswhite(this.peekn(1))) {
12100 r += this.getn(1);
12101 }
12102 return r;
12103}
12104
12105StringReader.prototype.read_nonwhite = function() {
12106 var r = "";
12107 var ch = this.peekn(1);
12108 while (!iswhite(ch) && ch != "") {
12109 r += this.getn(1);
12110 var ch = this.peekn(1);
12111 }
12112 return r;
12113}
12114
12115StringReader.prototype.read_name = function() {
12116 var r = "";
12117 while (isnamec(this.peekn(1))) {
12118 r += this.getn(1);
12119 }
12120 return r;
12121}
12122
12123StringReader.prototype.skip_white = function() {
12124 while (iswhite(this.peekn(1))) {
12125 this.seek_cur(1);
12126 }
12127}
12128
12129StringReader.prototype.skip_white_and_colon = function() {
12130 while (TRUE) {
12131 var c = this.peekn(1);
12132 if (!iswhite(c) && c != ":") {
12133 break;
12134 }
12135 this.seek_cur(1);
12136 }
12137}
12138
12139function Compiler() { this.__init__.apply(this, arguments); }
12140Compiler.prototype.__init__ = function() {
12141 this.indent = [""];
12142 this.lines = [];
12143}
12144
12145Compiler.prototype.out = function() {
12146 var a000 = Array.prototype.slice.call(arguments, 0);
12147 if (viml_len(a000) == 1) {
12148 if (a000[0][0] == ")") {
12149 this.lines[this.lines.length - 1] += a000[0];
12150 }
12151 else {
12152 viml_add(this.lines, this.indent[0] + a000[0]);
12153 }
12154 }
12155 else {
12156 viml_add(this.lines, this.indent[0] + viml_printf.apply(null, a000));
12157 }
12158}
12159
12160Compiler.prototype.incindent = function(s) {
12161 viml_insert(this.indent, this.indent[0] + s);
12162}
12163
12164Compiler.prototype.decindent = function() {
12165 viml_remove(this.indent, 0);
12166}
12167
12168Compiler.prototype.compile = function(node) {
12169 if (node.type == NODE_TOPLEVEL) {
12170 return this.compile_toplevel(node);
12171 }
12172 else if (node.type == NODE_COMMENT) {
12173 this.compile_comment(node);
12174 return NIL;
12175 }
12176 else if (node.type == NODE_EXCMD) {
12177 this.compile_excmd(node);
12178 return NIL;
12179 }
12180 else if (node.type == NODE_FUNCTION) {
12181 this.compile_function(node);
12182 return NIL;
12183 }
12184 else if (node.type == NODE_DELFUNCTION) {
12185 this.compile_delfunction(node);
12186 return NIL;
12187 }
12188 else if (node.type == NODE_RETURN) {
12189 this.compile_return(node);
12190 return NIL;
12191 }
12192 else if (node.type == NODE_EXCALL) {
12193 this.compile_excall(node);
12194 return NIL;
12195 }
12196 else if (node.type == NODE_EVAL) {
12197 this.compile_eval(node);
12198 return NIL;
12199 }
12200 else if (node.type == NODE_LET) {
12201 this.compile_let(node);
12202 return NIL;
12203 }
12204 else if (node.type == NODE_CONST) {
12205 this.compile_const(node);
12206 return NIL;
12207 }
12208 else if (node.type == NODE_UNLET) {
12209 this.compile_unlet(node);
12210 return NIL;
12211 }
12212 else if (node.type == NODE_LOCKVAR) {
12213 this.compile_lockvar(node);
12214 return NIL;
12215 }
12216 else if (node.type == NODE_UNLOCKVAR) {
12217 this.compile_unlockvar(node);
12218 return NIL;
12219 }
12220 else if (node.type == NODE_IF) {
12221 this.compile_if(node);
12222 return NIL;
12223 }
12224 else if (node.type == NODE_WHILE) {
12225 this.compile_while(node);
12226 return NIL;
12227 }
12228 else if (node.type == NODE_FOR) {
12229 this.compile_for(node);
12230 return NIL;
12231 }
12232 else if (node.type == NODE_CONTINUE) {
12233 this.compile_continue(node);
12234 return NIL;
12235 }
12236 else if (node.type == NODE_BREAK) {
12237 this.compile_break(node);
12238 return NIL;
12239 }
12240 else if (node.type == NODE_TRY) {
12241 this.compile_try(node);
12242 return NIL;
12243 }
12244 else if (node.type == NODE_THROW) {
12245 this.compile_throw(node);
12246 return NIL;
12247 }
12248 else if (node.type == NODE_ECHO) {
12249 this.compile_echo(node);
12250 return NIL;
12251 }
12252 else if (node.type == NODE_ECHON) {
12253 this.compile_echon(node);
12254 return NIL;
12255 }
12256 else if (node.type == NODE_ECHOHL) {
12257 this.compile_echohl(node);
12258 return NIL;
12259 }
12260 else if (node.type == NODE_ECHOMSG) {
12261 this.compile_echomsg(node);
12262 return NIL;
12263 }
12264 else if (node.type == NODE_ECHOERR) {
12265 this.compile_echoerr(node);
12266 return NIL;
12267 }
12268 else if (node.type == NODE_EXECUTE) {
12269 this.compile_execute(node);
12270 return NIL;
12271 }
12272 else if (node.type == NODE_TERNARY) {
12273 return this.compile_ternary(node);
12274 }
12275 else if (node.type == NODE_OR) {
12276 return this.compile_or(node);
12277 }
12278 else if (node.type == NODE_AND) {
12279 return this.compile_and(node);
12280 }
12281 else if (node.type == NODE_EQUAL) {
12282 return this.compile_equal(node);
12283 }
12284 else if (node.type == NODE_EQUALCI) {
12285 return this.compile_equalci(node);
12286 }
12287 else if (node.type == NODE_EQUALCS) {
12288 return this.compile_equalcs(node);
12289 }
12290 else if (node.type == NODE_NEQUAL) {
12291 return this.compile_nequal(node);
12292 }
12293 else if (node.type == NODE_NEQUALCI) {
12294 return this.compile_nequalci(node);
12295 }
12296 else if (node.type == NODE_NEQUALCS) {
12297 return this.compile_nequalcs(node);
12298 }
12299 else if (node.type == NODE_GREATER) {
12300 return this.compile_greater(node);
12301 }
12302 else if (node.type == NODE_GREATERCI) {
12303 return this.compile_greaterci(node);
12304 }
12305 else if (node.type == NODE_GREATERCS) {
12306 return this.compile_greatercs(node);
12307 }
12308 else if (node.type == NODE_GEQUAL) {
12309 return this.compile_gequal(node);
12310 }
12311 else if (node.type == NODE_GEQUALCI) {
12312 return this.compile_gequalci(node);
12313 }
12314 else if (node.type == NODE_GEQUALCS) {
12315 return this.compile_gequalcs(node);
12316 }
12317 else if (node.type == NODE_SMALLER) {
12318 return this.compile_smaller(node);
12319 }
12320 else if (node.type == NODE_SMALLERCI) {
12321 return this.compile_smallerci(node);
12322 }
12323 else if (node.type == NODE_SMALLERCS) {
12324 return this.compile_smallercs(node);
12325 }
12326 else if (node.type == NODE_SEQUAL) {
12327 return this.compile_sequal(node);
12328 }
12329 else if (node.type == NODE_SEQUALCI) {
12330 return this.compile_sequalci(node);
12331 }
12332 else if (node.type == NODE_SEQUALCS) {
12333 return this.compile_sequalcs(node);
12334 }
12335 else if (node.type == NODE_MATCH) {
12336 return this.compile_match(node);
12337 }
12338 else if (node.type == NODE_MATCHCI) {
12339 return this.compile_matchci(node);
12340 }
12341 else if (node.type == NODE_MATCHCS) {
12342 return this.compile_matchcs(node);
12343 }
12344 else if (node.type == NODE_NOMATCH) {
12345 return this.compile_nomatch(node);
12346 }
12347 else if (node.type == NODE_NOMATCHCI) {
12348 return this.compile_nomatchci(node);
12349 }
12350 else if (node.type == NODE_NOMATCHCS) {
12351 return this.compile_nomatchcs(node);
12352 }
12353 else if (node.type == NODE_IS) {
12354 return this.compile_is(node);
12355 }
12356 else if (node.type == NODE_ISCI) {
12357 return this.compile_isci(node);
12358 }
12359 else if (node.type == NODE_ISCS) {
12360 return this.compile_iscs(node);
12361 }
12362 else if (node.type == NODE_ISNOT) {
12363 return this.compile_isnot(node);
12364 }
12365 else if (node.type == NODE_ISNOTCI) {
12366 return this.compile_isnotci(node);
12367 }
12368 else if (node.type == NODE_ISNOTCS) {
12369 return this.compile_isnotcs(node);
12370 }
12371 else if (node.type == NODE_ADD) {
12372 return this.compile_add(node);
12373 }
12374 else if (node.type == NODE_SUBTRACT) {
12375 return this.compile_subtract(node);
12376 }
12377 else if (node.type == NODE_CONCAT) {
12378 return this.compile_concat(node);
12379 }
12380 else if (node.type == NODE_MULTIPLY) {
12381 return this.compile_multiply(node);
12382 }
12383 else if (node.type == NODE_DIVIDE) {
12384 return this.compile_divide(node);
12385 }
12386 else if (node.type == NODE_REMAINDER) {
12387 return this.compile_remainder(node);
12388 }
12389 else if (node.type == NODE_NOT) {
12390 return this.compile_not(node);
12391 }
12392 else if (node.type == NODE_PLUS) {
12393 return this.compile_plus(node);
12394 }
12395 else if (node.type == NODE_MINUS) {
12396 return this.compile_minus(node);
12397 }
12398 else if (node.type == NODE_SUBSCRIPT) {
12399 return this.compile_subscript(node);
12400 }
12401 else if (node.type == NODE_SLICE) {
12402 return this.compile_slice(node);
12403 }
12404 else if (node.type == NODE_DOT) {
12405 return this.compile_dot(node);
12406 }
12407 else if (node.type == NODE_METHOD) {
12408 return this.compile_method(node);
12409 }
12410 else if (node.type == NODE_CALL) {
12411 return this.compile_call(node);
12412 }
12413 else if (node.type == NODE_NUMBER) {
12414 return this.compile_number(node);
12415 }
12416 else if (node.type == NODE_BLOB) {
12417 return this.compile_blob(node);
12418 }
12419 else if (node.type == NODE_STRING) {
12420 return this.compile_string(node);
12421 }
12422 else if (node.type == NODE_LIST) {
12423 return this.compile_list(node);
12424 }
12425 else if (node.type == NODE_DICT) {
12426 return this.compile_dict(node);
12427 }
12428 else if (node.type == NODE_OPTION) {
12429 return this.compile_option(node);
12430 }
12431 else if (node.type == NODE_IDENTIFIER) {
12432 return this.compile_identifier(node);
12433 }
12434 else if (node.type == NODE_CURLYNAME) {
12435 return this.compile_curlyname(node);
12436 }
12437 else if (node.type == NODE_ENV) {
12438 return this.compile_env(node);
12439 }
12440 else if (node.type == NODE_REG) {
12441 return this.compile_reg(node);
12442 }
12443 else if (node.type == NODE_CURLYNAMEPART) {
12444 return this.compile_curlynamepart(node);
12445 }
12446 else if (node.type == NODE_CURLYNAMEEXPR) {
12447 return this.compile_curlynameexpr(node);
12448 }
12449 else if (node.type == NODE_LAMBDA) {
12450 return this.compile_lambda(node);
12451 }
12452 else if (node.type == NODE_HEREDOC) {
12453 return this.compile_heredoc(node);
12454 }
12455 else {
12456 throw viml_printf("Compiler: unknown node: %s", viml_string(node));
12457 }
12458 return NIL;
12459}
12460
12461Compiler.prototype.compile_body = function(body) {
12462 var __c10 = body;
12463 for (var __i10 = 0; __i10 < __c10.length; ++__i10) {
12464 var node = __c10[__i10];
12465 this.compile(node);
12466 }
12467}
12468
12469Compiler.prototype.compile_toplevel = function(node) {
12470 this.compile_body(node.body);
12471 return this.lines;
12472}
12473
12474Compiler.prototype.compile_comment = function(node) {
12475 this.out(";%s", node.str);
12476}
12477
12478Compiler.prototype.compile_excmd = function(node) {
12479 this.out("(excmd \"%s\")", viml_escape(node.str, "\\\""));
12480}
12481
12482Compiler.prototype.compile_function = function(node) {
12483 var left = this.compile(node.left);
12484 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12485 var default_args = node.default_args.map((function(vval) { return this.compile(vval); }).bind(this));
12486 if (!viml_empty(rlist)) {
12487 var remaining = FALSE;
12488 if (rlist[rlist.length - 1] == "...") {
12489 viml_remove(rlist, -1);
12490 var remaining = TRUE;
12491 }
12492 var __c11 = viml_range(viml_len(rlist));
12493 for (var __i11 = 0; __i11 < __c11.length; ++__i11) {
12494 var i = __c11[__i11];
12495 if (i < viml_len(rlist) - viml_len(default_args)) {
12496 left += viml_printf(" %s", rlist[i]);
12497 }
12498 else {
12499 left += viml_printf(" (%s %s)", rlist[i], default_args[i + viml_len(default_args) - viml_len(rlist)]);
12500 }
12501 }
12502 if (remaining) {
12503 left += " . ...";
12504 }
12505 }
12506 this.out("(function (%s)", left);
12507 this.incindent(" ");
12508 this.compile_body(node.body);
12509 this.out(")");
12510 this.decindent();
12511}
12512
12513Compiler.prototype.compile_delfunction = function(node) {
12514 this.out("(delfunction %s)", this.compile(node.left));
12515}
12516
12517Compiler.prototype.compile_return = function(node) {
12518 if (node.left === NIL) {
12519 this.out("(return)");
12520 }
12521 else {
12522 this.out("(return %s)", this.compile(node.left));
12523 }
12524}
12525
12526Compiler.prototype.compile_excall = function(node) {
12527 this.out("(call %s)", this.compile(node.left));
12528}
12529
12530Compiler.prototype.compile_eval = function(node) {
12531 this.out("(eval %s)", this.compile(node.left));
12532}
12533
12534Compiler.prototype.compile_let = function(node) {
12535 var left = "";
12536 if (node.left !== NIL) {
12537 var left = this.compile(node.left);
12538 }
12539 else {
12540 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12541 if (node.rest !== NIL) {
12542 left += " . " + this.compile(node.rest);
12543 }
12544 var left = "(" + left + ")";
12545 }
12546 var right = this.compile(node.right);
12547 this.out("(let %s %s %s)", node.op, left, right);
12548}
12549
12550// TODO: merge with s:Compiler.compile_let() ?
12551Compiler.prototype.compile_const = function(node) {
12552 var left = "";
12553 if (node.left !== NIL) {
12554 var left = this.compile(node.left);
12555 }
12556 else {
12557 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12558 if (node.rest !== NIL) {
12559 left += " . " + this.compile(node.rest);
12560 }
12561 var left = "(" + left + ")";
12562 }
12563 var right = this.compile(node.right);
12564 this.out("(const %s %s %s)", node.op, left, right);
12565}
12566
12567Compiler.prototype.compile_unlet = function(node) {
12568 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12569 this.out("(unlet %s)", viml_join(list, " "));
12570}
12571
12572Compiler.prototype.compile_lockvar = function(node) {
12573 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12574 if (node.depth === NIL) {
12575 this.out("(lockvar %s)", viml_join(list, " "));
12576 }
12577 else {
12578 this.out("(lockvar %s %s)", node.depth, viml_join(list, " "));
12579 }
12580}
12581
12582Compiler.prototype.compile_unlockvar = function(node) {
12583 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12584 if (node.depth === NIL) {
12585 this.out("(unlockvar %s)", viml_join(list, " "));
12586 }
12587 else {
12588 this.out("(unlockvar %s %s)", node.depth, viml_join(list, " "));
12589 }
12590}
12591
12592Compiler.prototype.compile_if = function(node) {
12593 this.out("(if %s", this.compile(node.cond));
12594 this.incindent(" ");
12595 this.compile_body(node.body);
12596 this.decindent();
12597 var __c12 = node.elseif;
12598 for (var __i12 = 0; __i12 < __c12.length; ++__i12) {
12599 var enode = __c12[__i12];
12600 this.out(" elseif %s", this.compile(enode.cond));
12601 this.incindent(" ");
12602 this.compile_body(enode.body);
12603 this.decindent();
12604 }
12605 if (node._else !== NIL) {
12606 this.out(" else");
12607 this.incindent(" ");
12608 this.compile_body(node._else.body);
12609 this.decindent();
12610 }
12611 this.incindent(" ");
12612 this.out(")");
12613 this.decindent();
12614}
12615
12616Compiler.prototype.compile_while = function(node) {
12617 this.out("(while %s", this.compile(node.cond));
12618 this.incindent(" ");
12619 this.compile_body(node.body);
12620 this.out(")");
12621 this.decindent();
12622}
12623
12624Compiler.prototype.compile_for = function(node) {
12625 var left = "";
12626 if (node.left !== NIL) {
12627 var left = this.compile(node.left);
12628 }
12629 else {
12630 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12631 if (node.rest !== NIL) {
12632 left += " . " + this.compile(node.rest);
12633 }
12634 var left = "(" + left + ")";
12635 }
12636 var right = this.compile(node.right);
12637 this.out("(for %s %s", left, right);
12638 this.incindent(" ");
12639 this.compile_body(node.body);
12640 this.out(")");
12641 this.decindent();
12642}
12643
12644Compiler.prototype.compile_continue = function(node) {
12645 this.out("(continue)");
12646}
12647
12648Compiler.prototype.compile_break = function(node) {
12649 this.out("(break)");
12650}
12651
12652Compiler.prototype.compile_try = function(node) {
12653 this.out("(try");
12654 this.incindent(" ");
12655 this.compile_body(node.body);
12656 var __c13 = node.catch;
12657 for (var __i13 = 0; __i13 < __c13.length; ++__i13) {
12658 var cnode = __c13[__i13];
12659 if (cnode.pattern !== NIL) {
12660 this.decindent();
12661 this.out(" catch /%s/", cnode.pattern);
12662 this.incindent(" ");
12663 this.compile_body(cnode.body);
12664 }
12665 else {
12666 this.decindent();
12667 this.out(" catch");
12668 this.incindent(" ");
12669 this.compile_body(cnode.body);
12670 }
12671 }
12672 if (node._finally !== NIL) {
12673 this.decindent();
12674 this.out(" finally");
12675 this.incindent(" ");
12676 this.compile_body(node._finally.body);
12677 }
12678 this.out(")");
12679 this.decindent();
12680}
12681
12682Compiler.prototype.compile_throw = function(node) {
12683 this.out("(throw %s)", this.compile(node.left));
12684}
12685
12686Compiler.prototype.compile_echo = function(node) {
12687 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12688 this.out("(echo %s)", viml_join(list, " "));
12689}
12690
12691Compiler.prototype.compile_echon = function(node) {
12692 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12693 this.out("(echon %s)", viml_join(list, " "));
12694}
12695
12696Compiler.prototype.compile_echohl = function(node) {
12697 this.out("(echohl \"%s\")", viml_escape(node.str, "\\\""));
12698}
12699
12700Compiler.prototype.compile_echomsg = function(node) {
12701 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12702 this.out("(echomsg %s)", viml_join(list, " "));
12703}
12704
12705Compiler.prototype.compile_echoerr = function(node) {
12706 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12707 this.out("(echoerr %s)", viml_join(list, " "));
12708}
12709
12710Compiler.prototype.compile_execute = function(node) {
12711 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12712 this.out("(execute %s)", viml_join(list, " "));
12713}
12714
12715Compiler.prototype.compile_ternary = function(node) {
12716 return viml_printf("(?: %s %s %s)", this.compile(node.cond), this.compile(node.left), this.compile(node.right));
12717}
12718
12719Compiler.prototype.compile_or = function(node) {
12720 return viml_printf("(|| %s %s)", this.compile(node.left), this.compile(node.right));
12721}
12722
12723Compiler.prototype.compile_and = function(node) {
12724 return viml_printf("(&& %s %s)", this.compile(node.left), this.compile(node.right));
12725}
12726
12727Compiler.prototype.compile_equal = function(node) {
12728 return viml_printf("(== %s %s)", this.compile(node.left), this.compile(node.right));
12729}
12730
12731Compiler.prototype.compile_equalci = function(node) {
12732 return viml_printf("(==? %s %s)", this.compile(node.left), this.compile(node.right));
12733}
12734
12735Compiler.prototype.compile_equalcs = function(node) {
12736 return viml_printf("(==# %s %s)", this.compile(node.left), this.compile(node.right));
12737}
12738
12739Compiler.prototype.compile_nequal = function(node) {
12740 return viml_printf("(!= %s %s)", this.compile(node.left), this.compile(node.right));
12741}
12742
12743Compiler.prototype.compile_nequalci = function(node) {
12744 return viml_printf("(!=? %s %s)", this.compile(node.left), this.compile(node.right));
12745}
12746
12747Compiler.prototype.compile_nequalcs = function(node) {
12748 return viml_printf("(!=# %s %s)", this.compile(node.left), this.compile(node.right));
12749}
12750
12751Compiler.prototype.compile_greater = function(node) {
12752 return viml_printf("(> %s %s)", this.compile(node.left), this.compile(node.right));
12753}
12754
12755Compiler.prototype.compile_greaterci = function(node) {
12756 return viml_printf("(>? %s %s)", this.compile(node.left), this.compile(node.right));
12757}
12758
12759Compiler.prototype.compile_greatercs = function(node) {
12760 return viml_printf("(># %s %s)", this.compile(node.left), this.compile(node.right));
12761}
12762
12763Compiler.prototype.compile_gequal = function(node) {
12764 return viml_printf("(>= %s %s)", this.compile(node.left), this.compile(node.right));
12765}
12766
12767Compiler.prototype.compile_gequalci = function(node) {
12768 return viml_printf("(>=? %s %s)", this.compile(node.left), this.compile(node.right));
12769}
12770
12771Compiler.prototype.compile_gequalcs = function(node) {
12772 return viml_printf("(>=# %s %s)", this.compile(node.left), this.compile(node.right));
12773}
12774
12775Compiler.prototype.compile_smaller = function(node) {
12776 return viml_printf("(< %s %s)", this.compile(node.left), this.compile(node.right));
12777}
12778
12779Compiler.prototype.compile_smallerci = function(node) {
12780 return viml_printf("(<? %s %s)", this.compile(node.left), this.compile(node.right));
12781}
12782
12783Compiler.prototype.compile_smallercs = function(node) {
12784 return viml_printf("(<# %s %s)", this.compile(node.left), this.compile(node.right));
12785}
12786
12787Compiler.prototype.compile_sequal = function(node) {
12788 return viml_printf("(<= %s %s)", this.compile(node.left), this.compile(node.right));
12789}
12790
12791Compiler.prototype.compile_sequalci = function(node) {
12792 return viml_printf("(<=? %s %s)", this.compile(node.left), this.compile(node.right));
12793}
12794
12795Compiler.prototype.compile_sequalcs = function(node) {
12796 return viml_printf("(<=# %s %s)", this.compile(node.left), this.compile(node.right));
12797}
12798
12799Compiler.prototype.compile_match = function(node) {
12800 return viml_printf("(=~ %s %s)", this.compile(node.left), this.compile(node.right));
12801}
12802
12803Compiler.prototype.compile_matchci = function(node) {
12804 return viml_printf("(=~? %s %s)", this.compile(node.left), this.compile(node.right));
12805}
12806
12807Compiler.prototype.compile_matchcs = function(node) {
12808 return viml_printf("(=~# %s %s)", this.compile(node.left), this.compile(node.right));
12809}
12810
12811Compiler.prototype.compile_nomatch = function(node) {
12812 return viml_printf("(!~ %s %s)", this.compile(node.left), this.compile(node.right));
12813}
12814
12815Compiler.prototype.compile_nomatchci = function(node) {
12816 return viml_printf("(!~? %s %s)", this.compile(node.left), this.compile(node.right));
12817}
12818
12819Compiler.prototype.compile_nomatchcs = function(node) {
12820 return viml_printf("(!~# %s %s)", this.compile(node.left), this.compile(node.right));
12821}
12822
12823Compiler.prototype.compile_is = function(node) {
12824 return viml_printf("(is %s %s)", this.compile(node.left), this.compile(node.right));
12825}
12826
12827Compiler.prototype.compile_isci = function(node) {
12828 return viml_printf("(is? %s %s)", this.compile(node.left), this.compile(node.right));
12829}
12830
12831Compiler.prototype.compile_iscs = function(node) {
12832 return viml_printf("(is# %s %s)", this.compile(node.left), this.compile(node.right));
12833}
12834
12835Compiler.prototype.compile_isnot = function(node) {
12836 return viml_printf("(isnot %s %s)", this.compile(node.left), this.compile(node.right));
12837}
12838
12839Compiler.prototype.compile_isnotci = function(node) {
12840 return viml_printf("(isnot? %s %s)", this.compile(node.left), this.compile(node.right));
12841}
12842
12843Compiler.prototype.compile_isnotcs = function(node) {
12844 return viml_printf("(isnot# %s %s)", this.compile(node.left), this.compile(node.right));
12845}
12846
12847Compiler.prototype.compile_add = function(node) {
12848 return viml_printf("(+ %s %s)", this.compile(node.left), this.compile(node.right));
12849}
12850
12851Compiler.prototype.compile_subtract = function(node) {
12852 return viml_printf("(- %s %s)", this.compile(node.left), this.compile(node.right));
12853}
12854
12855Compiler.prototype.compile_concat = function(node) {
12856 return viml_printf("(concat %s %s)", this.compile(node.left), this.compile(node.right));
12857}
12858
12859Compiler.prototype.compile_multiply = function(node) {
12860 return viml_printf("(* %s %s)", this.compile(node.left), this.compile(node.right));
12861}
12862
12863Compiler.prototype.compile_divide = function(node) {
12864 return viml_printf("(/ %s %s)", this.compile(node.left), this.compile(node.right));
12865}
12866
12867Compiler.prototype.compile_remainder = function(node) {
12868 return viml_printf("(%% %s %s)", this.compile(node.left), this.compile(node.right));
12869}
12870
12871Compiler.prototype.compile_not = function(node) {
12872 return viml_printf("(! %s)", this.compile(node.left));
12873}
12874
12875Compiler.prototype.compile_plus = function(node) {
12876 return viml_printf("(+ %s)", this.compile(node.left));
12877}
12878
12879Compiler.prototype.compile_minus = function(node) {
12880 return viml_printf("(- %s)", this.compile(node.left));
12881}
12882
12883Compiler.prototype.compile_subscript = function(node) {
12884 return viml_printf("(subscript %s %s)", this.compile(node.left), this.compile(node.right));
12885}
12886
12887Compiler.prototype.compile_slice = function(node) {
12888 var r0 = node.rlist[0] === NIL ? "nil" : this.compile(node.rlist[0]);
12889 var r1 = node.rlist[1] === NIL ? "nil" : this.compile(node.rlist[1]);
12890 return viml_printf("(slice %s %s %s)", this.compile(node.left), r0, r1);
12891}
12892
12893Compiler.prototype.compile_dot = function(node) {
12894 return viml_printf("(dot %s %s)", this.compile(node.left), this.compile(node.right));
12895}
12896
12897Compiler.prototype.compile_method = function(node) {
12898 return viml_printf("(method %s %s)", this.compile(node.left), this.compile(node.right));
12899}
12900
12901Compiler.prototype.compile_call = function(node) {
12902 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12903 if (viml_empty(rlist)) {
12904 return viml_printf("(%s)", this.compile(node.left));
12905 }
12906 else {
12907 return viml_printf("(%s %s)", this.compile(node.left), viml_join(rlist, " "));
12908 }
12909}
12910
12911Compiler.prototype.compile_number = function(node) {
12912 return node.value;
12913}
12914
12915Compiler.prototype.compile_blob = function(node) {
12916 return node.value;
12917}
12918
12919Compiler.prototype.compile_string = function(node) {
12920 return node.value;
12921}
12922
12923Compiler.prototype.compile_list = function(node) {
12924 var value = node.value.map((function(vval) { return this.compile(vval); }).bind(this));
12925 if (viml_empty(value)) {
12926 return "(list)";
12927 }
12928 else {
12929 return viml_printf("(list %s)", viml_join(value, " "));
12930 }
12931}
12932
12933Compiler.prototype.compile_dict = function(node) {
12934 var value = node.value.map((function(vval) { return "(" + this.compile(vval[0]) + " " + this.compile(vval[1]) + ")"; }).bind(this));
12935 if (viml_empty(value)) {
12936 return "(dict)";
12937 }
12938 else {
12939 return viml_printf("(dict %s)", viml_join(value, " "));
12940 }
12941}
12942
12943Compiler.prototype.compile_option = function(node) {
12944 return node.value;
12945}
12946
12947Compiler.prototype.compile_identifier = function(node) {
12948 return node.value;
12949}
12950
12951Compiler.prototype.compile_curlyname = function(node) {
12952 return viml_join(node.value.map((function(vval) { return this.compile(vval); }).bind(this)), "");
12953}
12954
12955Compiler.prototype.compile_env = function(node) {
12956 return node.value;
12957}
12958
12959Compiler.prototype.compile_reg = function(node) {
12960 return node.value;
12961}
12962
12963Compiler.prototype.compile_curlynamepart = function(node) {
12964 return node.value;
12965}
12966
12967Compiler.prototype.compile_curlynameexpr = function(node) {
12968 return "{" + this.compile(node.value) + "}";
12969}
12970
12971Compiler.prototype.escape_string = function(str) {
12972 var m = {"\n":"\\n", "\t":"\\t", "\r":"\\r"};
12973 var out = "\"";
12974 var __c14 = viml_range(viml_len(str));
12975 for (var __i14 = 0; __i14 < __c14.length; ++__i14) {
12976 var i = __c14[__i14];
12977 var c = str[i];
12978 if (viml_has_key(m, c)) {
12979 out += m[c];
12980 }
12981 else {
12982 out += c;
12983 }
12984 }
12985 out += "\"";
12986 return out;
12987}
12988
12989Compiler.prototype.compile_lambda = function(node) {
12990 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12991 return viml_printf("(lambda (%s) %s)", viml_join(rlist, " "), this.compile(node.left));
12992}
12993
12994Compiler.prototype.compile_heredoc = function(node) {
12995 if (viml_empty(node.rlist)) {
12996 var rlist = "(list)";
12997 }
12998 else {
12999 var rlist = "(list " + viml_join(node.rlist.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
13000 }
13001 if (viml_empty(node.body)) {
13002 var body = "(list)";
13003 }
13004 else {
13005 var body = "(list " + viml_join(node.body.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
13006 }
13007 var op = this.escape_string(node.op);
13008 return viml_printf("(heredoc %s %s %s)", rlist, op, body);
13009}
13010
13011// TODO: under construction
13012function RegexpParser() { this.__init__.apply(this, arguments); }
13013RegexpParser.prototype.RE_VERY_NOMAGIC = 1;
13014RegexpParser.prototype.RE_NOMAGIC = 2;
13015RegexpParser.prototype.RE_MAGIC = 3;
13016RegexpParser.prototype.RE_VERY_MAGIC = 4;
13017RegexpParser.prototype.__init__ = function(reader, cmd, delim) {
13018 this.reader = reader;
13019 this.cmd = cmd;
13020 this.delim = delim;
13021 this.reg_magic = this.RE_MAGIC;
13022}
13023
13024RegexpParser.prototype.isend = function(c) {
13025 return c == "<EOF>" || c == "<EOL>" || c == this.delim;
13026}
13027
13028RegexpParser.prototype.parse_regexp = function() {
13029 var prevtoken = "";
13030 var ntoken = "";
13031 var ret = [];
13032 if (this.reader.peekn(4) == "\\%#=") {
13033 var epos = this.reader.getpos();
13034 var token = this.reader.getn(5);
13035 if (token != "\\%#=0" && token != "\\%#=1" && token != "\\%#=2") {
13036 throw Err("E864: \\%#= can only be followed by 0, 1, or 2", epos);
13037 }
13038 viml_add(ret, token);
13039 }
13040 while (!this.isend(this.reader.peek())) {
13041 var prevtoken = ntoken;
13042 var __tmp = this.get_token();
13043 var token = __tmp[0];
13044 var ntoken = __tmp[1];
13045 if (ntoken == "\\m") {
13046 this.reg_magic = this.RE_MAGIC;
13047 }
13048 else if (ntoken == "\\M") {
13049 this.reg_magic = this.RE_NOMAGIC;
13050 }
13051 else if (ntoken == "\\v") {
13052 this.reg_magic = this.RE_VERY_MAGIC;
13053 }
13054 else if (ntoken == "\\V") {
13055 this.reg_magic = this.RE_VERY_NOMAGIC;
13056 }
13057 else if (ntoken == "\\*") {
13058 // '*' is not magic as the very first character.
13059 if (prevtoken == "" || prevtoken == "\\^" || prevtoken == "\\&" || prevtoken == "\\|" || prevtoken == "\\(") {
13060 var ntoken = "*";
13061 }
13062 }
13063 else if (ntoken == "\\^") {
13064 // '^' is only magic as the very first character.
13065 if (this.reg_magic != this.RE_VERY_MAGIC && prevtoken != "" && prevtoken != "\\&" && prevtoken != "\\|" && prevtoken != "\\n" && prevtoken != "\\(" && prevtoken != "\\%(") {
13066 var ntoken = "^";
13067 }
13068 }
13069 else if (ntoken == "\\$") {
13070 // '$' is only magic as the very last character
13071 var pos = this.reader.tell();
13072 if (this.reg_magic != this.RE_VERY_MAGIC) {
13073 while (!this.isend(this.reader.peek())) {
13074 var __tmp = this.get_token();
13075 var t = __tmp[0];
13076 var n = __tmp[1];
13077 // XXX: Vim doesn't check \v and \V?
13078 if (n == "\\c" || n == "\\C" || n == "\\m" || n == "\\M" || n == "\\Z") {
13079 continue;
13080 }
13081 if (n != "\\|" && n != "\\&" && n != "\\n" && n != "\\)") {
13082 var ntoken = "$";
13083 }
13084 break;
13085 }
13086 }
13087 this.reader.seek_set(pos);
13088 }
13089 else if (ntoken == "\\?") {
13090 // '?' is literal in '?' command.
13091 if (this.cmd == "?") {
13092 var ntoken = "?";
13093 }
13094 }
13095 viml_add(ret, ntoken);
13096 }
13097 return ret;
13098}
13099
13100// @return [actual_token, normalized_token]
13101RegexpParser.prototype.get_token = function() {
13102 if (this.reg_magic == this.RE_VERY_MAGIC) {
13103 return this.get_token_very_magic();
13104 }
13105 else if (this.reg_magic == this.RE_MAGIC) {
13106 return this.get_token_magic();
13107 }
13108 else if (this.reg_magic == this.RE_NOMAGIC) {
13109 return this.get_token_nomagic();
13110 }
13111 else if (this.reg_magic == this.RE_VERY_NOMAGIC) {
13112 return this.get_token_very_nomagic();
13113 }
13114}
13115
13116RegexpParser.prototype.get_token_very_magic = function() {
13117 if (this.isend(this.reader.peek())) {
13118 return ["<END>", "<END>"];
13119 }
13120 var c = this.reader.get();
13121 if (c == "\\") {
13122 return this.get_token_backslash_common();
13123 }
13124 else if (c == "*") {
13125 return ["*", "\\*"];
13126 }
13127 else if (c == "+") {
13128 return ["+", "\\+"];
13129 }
13130 else if (c == "=") {
13131 return ["=", "\\="];
13132 }
13133 else if (c == "?") {
13134 return ["?", "\\?"];
13135 }
13136 else if (c == "{") {
13137 return this.get_token_brace("{");
13138 }
13139 else if (c == "@") {
13140 return this.get_token_at("@");
13141 }
13142 else if (c == "^") {
13143 return ["^", "\\^"];
13144 }
13145 else if (c == "$") {
13146 return ["$", "\\$"];
13147 }
13148 else if (c == ".") {
13149 return [".", "\\."];
13150 }
13151 else if (c == "<") {
13152 return ["<", "\\<"];
13153 }
13154 else if (c == ">") {
13155 return [">", "\\>"];
13156 }
13157 else if (c == "%") {
13158 return this.get_token_percent("%");
13159 }
13160 else if (c == "[") {
13161 return this.get_token_sq("[");
13162 }
13163 else if (c == "~") {
13164 return ["~", "\\~"];
13165 }
13166 else if (c == "|") {
13167 return ["|", "\\|"];
13168 }
13169 else if (c == "&") {
13170 return ["&", "\\&"];
13171 }
13172 else if (c == "(") {
13173 return ["(", "\\("];
13174 }
13175 else if (c == ")") {
13176 return [")", "\\)"];
13177 }
13178 return [c, c];
13179}
13180
13181RegexpParser.prototype.get_token_magic = function() {
13182 if (this.isend(this.reader.peek())) {
13183 return ["<END>", "<END>"];
13184 }
13185 var c = this.reader.get();
13186 if (c == "\\") {
13187 var pos = this.reader.tell();
13188 var c = this.reader.get();
13189 if (c == "+") {
13190 return ["\\+", "\\+"];
13191 }
13192 else if (c == "=") {
13193 return ["\\=", "\\="];
13194 }
13195 else if (c == "?") {
13196 return ["\\?", "\\?"];
13197 }
13198 else if (c == "{") {
13199 return this.get_token_brace("\\{");
13200 }
13201 else if (c == "@") {
13202 return this.get_token_at("\\@");
13203 }
13204 else if (c == "<") {
13205 return ["\\<", "\\<"];
13206 }
13207 else if (c == ">") {
13208 return ["\\>", "\\>"];
13209 }
13210 else if (c == "%") {
13211 return this.get_token_percent("\\%");
13212 }
13213 else if (c == "|") {
13214 return ["\\|", "\\|"];
13215 }
13216 else if (c == "&") {
13217 return ["\\&", "\\&"];
13218 }
13219 else if (c == "(") {
13220 return ["\\(", "\\("];
13221 }
13222 else if (c == ")") {
13223 return ["\\)", "\\)"];
13224 }
13225 this.reader.seek_set(pos);
13226 return this.get_token_backslash_common();
13227 }
13228 else if (c == "*") {
13229 return ["*", "\\*"];
13230 }
13231 else if (c == "^") {
13232 return ["^", "\\^"];
13233 }
13234 else if (c == "$") {
13235 return ["$", "\\$"];
13236 }
13237 else if (c == ".") {
13238 return [".", "\\."];
13239 }
13240 else if (c == "[") {
13241 return this.get_token_sq("[");
13242 }
13243 else if (c == "~") {
13244 return ["~", "\\~"];
13245 }
13246 return [c, c];
13247}
13248
13249RegexpParser.prototype.get_token_nomagic = function() {
13250 if (this.isend(this.reader.peek())) {
13251 return ["<END>", "<END>"];
13252 }
13253 var c = this.reader.get();
13254 if (c == "\\") {
13255 var pos = this.reader.tell();
13256 var c = this.reader.get();
13257 if (c == "*") {
13258 return ["\\*", "\\*"];
13259 }
13260 else if (c == "+") {
13261 return ["\\+", "\\+"];
13262 }
13263 else if (c == "=") {
13264 return ["\\=", "\\="];
13265 }
13266 else if (c == "?") {
13267 return ["\\?", "\\?"];
13268 }
13269 else if (c == "{") {
13270 return this.get_token_brace("\\{");
13271 }
13272 else if (c == "@") {
13273 return this.get_token_at("\\@");
13274 }
13275 else if (c == ".") {
13276 return ["\\.", "\\."];
13277 }
13278 else if (c == "<") {
13279 return ["\\<", "\\<"];
13280 }
13281 else if (c == ">") {
13282 return ["\\>", "\\>"];
13283 }
13284 else if (c == "%") {
13285 return this.get_token_percent("\\%");
13286 }
13287 else if (c == "~") {
13288 return ["\\~", "\\^"];
13289 }
13290 else if (c == "[") {
13291 return this.get_token_sq("\\[");
13292 }
13293 else if (c == "|") {
13294 return ["\\|", "\\|"];
13295 }
13296 else if (c == "&") {
13297 return ["\\&", "\\&"];
13298 }
13299 else if (c == "(") {
13300 return ["\\(", "\\("];
13301 }
13302 else if (c == ")") {
13303 return ["\\)", "\\)"];
13304 }
13305 this.reader.seek_set(pos);
13306 return this.get_token_backslash_common();
13307 }
13308 else if (c == "^") {
13309 return ["^", "\\^"];
13310 }
13311 else if (c == "$") {
13312 return ["$", "\\$"];
13313 }
13314 return [c, c];
13315}
13316
13317RegexpParser.prototype.get_token_very_nomagic = function() {
13318 if (this.isend(this.reader.peek())) {
13319 return ["<END>", "<END>"];
13320 }
13321 var c = this.reader.get();
13322 if (c == "\\") {
13323 var pos = this.reader.tell();
13324 var c = this.reader.get();
13325 if (c == "*") {
13326 return ["\\*", "\\*"];
13327 }
13328 else if (c == "+") {
13329 return ["\\+", "\\+"];
13330 }
13331 else if (c == "=") {
13332 return ["\\=", "\\="];
13333 }
13334 else if (c == "?") {
13335 return ["\\?", "\\?"];
13336 }
13337 else if (c == "{") {
13338 return this.get_token_brace("\\{");
13339 }
13340 else if (c == "@") {
13341 return this.get_token_at("\\@");
13342 }
13343 else if (c == "^") {
13344 return ["\\^", "\\^"];
13345 }
13346 else if (c == "$") {
13347 return ["\\$", "\\$"];
13348 }
13349 else if (c == "<") {
13350 return ["\\<", "\\<"];
13351 }
13352 else if (c == ">") {
13353 return ["\\>", "\\>"];
13354 }
13355 else if (c == "%") {
13356 return this.get_token_percent("\\%");
13357 }
13358 else if (c == "~") {
13359 return ["\\~", "\\~"];
13360 }
13361 else if (c == "[") {
13362 return this.get_token_sq("\\[");
13363 }
13364 else if (c == "|") {
13365 return ["\\|", "\\|"];
13366 }
13367 else if (c == "&") {
13368 return ["\\&", "\\&"];
13369 }
13370 else if (c == "(") {
13371 return ["\\(", "\\("];
13372 }
13373 else if (c == ")") {
13374 return ["\\)", "\\)"];
13375 }
13376 this.reader.seek_set(pos);
13377 return this.get_token_backslash_common();
13378 }
13379 return [c, c];
13380}
13381
13382RegexpParser.prototype.get_token_backslash_common = function() {
13383 var cclass = "iIkKfFpPsSdDxXoOwWhHaAlLuU";
13384 var c = this.reader.get();
13385 if (c == "\\") {
13386 return ["\\\\", "\\\\"];
13387 }
13388 else if (viml_stridx(cclass, c) != -1) {
13389 return ["\\" + c, "\\" + c];
13390 }
13391 else if (c == "_") {
13392 var epos = this.reader.getpos();
13393 var c = this.reader.get();
13394 if (viml_stridx(cclass, c) != -1) {
13395 return ["\\_" + c, "\\_ . c"];
13396 }
13397 else if (c == "^") {
13398 return ["\\_^", "\\_^"];
13399 }
13400 else if (c == "$") {
13401 return ["\\_$", "\\_$"];
13402 }
13403 else if (c == ".") {
13404 return ["\\_.", "\\_."];
13405 }
13406 else if (c == "[") {
13407 return this.get_token_sq("\\_[");
13408 }
13409 throw Err("E63: invalid use of \\_", epos);
13410 }
13411 else if (viml_stridx("etrb", c) != -1) {
13412 return ["\\" + c, "\\" + c];
13413 }
13414 else if (viml_stridx("123456789", c) != -1) {
13415 return ["\\" + c, "\\" + c];
13416 }
13417 else if (c == "z") {
13418 var epos = this.reader.getpos();
13419 var c = this.reader.get();
13420 if (viml_stridx("123456789", c) != -1) {
13421 return ["\\z" + c, "\\z" + c];
13422 }
13423 else if (c == "s") {
13424 return ["\\zs", "\\zs"];
13425 }
13426 else if (c == "e") {
13427 return ["\\ze", "\\ze"];
13428 }
13429 else if (c == "(") {
13430 return ["\\z(", "\\z("];
13431 }
13432 throw Err("E68: Invalid character after \\z", epos);
13433 }
13434 else if (viml_stridx("cCmMvVZ", c) != -1) {
13435 return ["\\" + c, "\\" + c];
13436 }
13437 else if (c == "%") {
13438 var epos = this.reader.getpos();
13439 var c = this.reader.get();
13440 if (c == "d") {
13441 var r = this.getdecchrs();
13442 if (r != "") {
13443 return ["\\%d" + r, "\\%d" + r];
13444 }
13445 }
13446 else if (c == "o") {
13447 var r = this.getoctchrs();
13448 if (r != "") {
13449 return ["\\%o" + r, "\\%o" + r];
13450 }
13451 }
13452 else if (c == "x") {
13453 var r = this.gethexchrs(2);
13454 if (r != "") {
13455 return ["\\%x" + r, "\\%x" + r];
13456 }
13457 }
13458 else if (c == "u") {
13459 var r = this.gethexchrs(4);
13460 if (r != "") {
13461 return ["\\%u" + r, "\\%u" + r];
13462 }
13463 }
13464 else if (c == "U") {
13465 var r = this.gethexchrs(8);
13466 if (r != "") {
13467 return ["\\%U" + r, "\\%U" + r];
13468 }
13469 }
13470 throw Err("E678: Invalid character after \\%[dxouU]", epos);
13471 }
13472 return ["\\" + c, c];
13473}
13474
13475// \{}
13476RegexpParser.prototype.get_token_brace = function(pre) {
13477 var r = "";
13478 var minus = "";
13479 var comma = "";
13480 var n = "";
13481 var m = "";
13482 if (this.reader.p(0) == "-") {
13483 var minus = this.reader.get();
13484 r += minus;
13485 }
13486 if (isdigit(this.reader.p(0))) {
13487 var n = this.reader.read_digit();
13488 r += n;
13489 }
13490 if (this.reader.p(0) == ",") {
13491 var comma = this.rader.get();
13492 r += comma;
13493 }
13494 if (isdigit(this.reader.p(0))) {
13495 var m = this.reader.read_digit();
13496 r += m;
13497 }
13498 if (this.reader.p(0) == "\\") {
13499 r += this.reader.get();
13500 }
13501 if (this.reader.p(0) != "}") {
13502 throw Err("E554: Syntax error in \\{...}", this.reader.getpos());
13503 }
13504 this.reader.get();
13505 return [pre + r, "\\{" + minus + n + comma + m + "}"];
13506}
13507
13508// \[]
13509RegexpParser.prototype.get_token_sq = function(pre) {
13510 var start = this.reader.tell();
13511 var r = "";
13512 // Complement of range
13513 if (this.reader.p(0) == "^") {
13514 r += this.reader.get();
13515 }
13516 // At the start ']' and '-' mean the literal character.
13517 if (this.reader.p(0) == "]" || this.reader.p(0) == "-") {
13518 r += this.reader.get();
13519 }
13520 while (TRUE) {
13521 var startc = 0;
13522 var c = this.reader.p(0);
13523 if (this.isend(c)) {
13524 // If there is no matching ']', we assume the '[' is a normal character.
13525 this.reader.seek_set(start);
13526 return [pre, "["];
13527 }
13528 else if (c == "]") {
13529 this.reader.seek_cur(1);
13530 return [pre + r + "]", "\\[" + r + "]"];
13531 }
13532 else if (c == "[") {
13533 var e = this.get_token_sq_char_class();
13534 if (e == "") {
13535 var e = this.get_token_sq_equi_class();
13536 if (e == "") {
13537 var e = this.get_token_sq_coll_element();
13538 if (e == "") {
13539 var __tmp = this.get_token_sq_c();
13540 var e = __tmp[0];
13541 var startc = __tmp[1];
13542 }
13543 }
13544 }
13545 r += e;
13546 }
13547 else {
13548 var __tmp = this.get_token_sq_c();
13549 var e = __tmp[0];
13550 var startc = __tmp[1];
13551 r += e;
13552 }
13553 if (startc != 0 && this.reader.p(0) == "-" && !this.isend(this.reader.p(1)) && !(this.reader.p(1) == "\\" && this.reader.p(2) == "n")) {
13554 this.reader.seek_cur(1);
13555 r += "-";
13556 var c = this.reader.p(0);
13557 if (c == "[") {
13558 var e = this.get_token_sq_coll_element();
13559 if (e != "") {
13560 var endc = viml_char2nr(e[2]);
13561 }
13562 else {
13563 var __tmp = this.get_token_sq_c();
13564 var e = __tmp[0];
13565 var endc = __tmp[1];
13566 }
13567 r += e;
13568 }
13569 else {
13570 var __tmp = this.get_token_sq_c();
13571 var e = __tmp[0];
13572 var endc = __tmp[1];
13573 r += e;
13574 }
13575 if (startc > endc || endc > startc + 256) {
13576 throw Err("E16: Invalid range", this.reader.getpos());
13577 }
13578 }
13579 }
13580}
13581
13582// [c]
13583RegexpParser.prototype.get_token_sq_c = function() {
13584 var c = this.reader.p(0);
13585 if (c == "\\") {
13586 this.reader.seek_cur(1);
13587 var c = this.reader.p(0);
13588 if (c == "n") {
13589 this.reader.seek_cur(1);
13590 return ["\\n", 0];
13591 }
13592 else if (c == "r") {
13593 this.reader.seek_cur(1);
13594 return ["\\r", 13];
13595 }
13596 else if (c == "t") {
13597 this.reader.seek_cur(1);
13598 return ["\\t", 9];
13599 }
13600 else if (c == "e") {
13601 this.reader.seek_cur(1);
13602 return ["\\e", 27];
13603 }
13604 else if (c == "b") {
13605 this.reader.seek_cur(1);
13606 return ["\\b", 8];
13607 }
13608 else if (viml_stridx("]^-\\", c) != -1) {
13609 this.reader.seek_cur(1);
13610 return ["\\" + c, viml_char2nr(c)];
13611 }
13612 else if (viml_stridx("doxuU", c) != -1) {
13613 var __tmp = this.get_token_sq_coll_char();
13614 var c = __tmp[0];
13615 var n = __tmp[1];
13616 return [c, n];
13617 }
13618 else {
13619 return ["\\", viml_char2nr("\\")];
13620 }
13621 }
13622 else if (c == "-") {
13623 this.reader.seek_cur(1);
13624 return ["-", viml_char2nr("-")];
13625 }
13626 else {
13627 this.reader.seek_cur(1);
13628 return [c, viml_char2nr(c)];
13629 }
13630}
13631
13632// [\d123]
13633RegexpParser.prototype.get_token_sq_coll_char = function() {
13634 var pos = this.reader.tell();
13635 var c = this.reader.get();
13636 if (c == "d") {
13637 var r = this.getdecchrs();
13638 var n = viml_str2nr(r, 10);
13639 }
13640 else if (c == "o") {
13641 var r = this.getoctchrs();
13642 var n = viml_str2nr(r, 8);
13643 }
13644 else if (c == "x") {
13645 var r = this.gethexchrs(2);
13646 var n = viml_str2nr(r, 16);
13647 }
13648 else if (c == "u") {
13649 var r = this.gethexchrs(4);
13650 var n = viml_str2nr(r, 16);
13651 }
13652 else if (c == "U") {
13653 var r = this.gethexchrs(8);
13654 var n = viml_str2nr(r, 16);
13655 }
13656 else {
13657 var r = "";
13658 }
13659 if (r == "") {
13660 this.reader.seek_set(pos);
13661 return "\\";
13662 }
13663 return ["\\" + c + r, n];
13664}
13665
13666// [[.a.]]
13667RegexpParser.prototype.get_token_sq_coll_element = function() {
13668 if (this.reader.p(0) == "[" && this.reader.p(1) == "." && !this.isend(this.reader.p(2)) && this.reader.p(3) == "." && this.reader.p(4) == "]") {
13669 return this.reader.getn(5);
13670 }
13671 return "";
13672}
13673
13674// [[=a=]]
13675RegexpParser.prototype.get_token_sq_equi_class = function() {
13676 if (this.reader.p(0) == "[" && this.reader.p(1) == "=" && !this.isend(this.reader.p(2)) && this.reader.p(3) == "=" && this.reader.p(4) == "]") {
13677 return this.reader.getn(5);
13678 }
13679 return "";
13680}
13681
13682// [[:alpha:]]
13683RegexpParser.prototype.get_token_sq_char_class = function() {
13684 var class_names = ["alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "xdigit", "tab", "return", "backspace", "escape"];
13685 var pos = this.reader.tell();
13686 if (this.reader.p(0) == "[" && this.reader.p(1) == ":") {
13687 this.reader.seek_cur(2);
13688 var r = this.reader.read_alpha();
13689 if (this.reader.p(0) == ":" && this.reader.p(1) == "]") {
13690 this.reader.seek_cur(2);
13691 var __c15 = class_names;
13692 for (var __i15 = 0; __i15 < __c15.length; ++__i15) {
13693 var name = __c15[__i15];
13694 if (r == name) {
13695 return "[:" + name + ":]";
13696 }
13697 }
13698 }
13699 }
13700 this.reader.seek_set(pos);
13701 return "";
13702}
13703
13704// \@...
13705RegexpParser.prototype.get_token_at = function(pre) {
13706 var epos = this.reader.getpos();
13707 var c = this.reader.get();
13708 if (c == ">") {
13709 return [pre + ">", "\\@>"];
13710 }
13711 else if (c == "=") {
13712 return [pre + "=", "\\@="];
13713 }
13714 else if (c == "!") {
13715 return [pre + "!", "\\@!"];
13716 }
13717 else if (c == "<") {
13718 var c = this.reader.get();
13719 if (c == "=") {
13720 return [pre + "<=", "\\@<="];
13721 }
13722 else if (c == "!") {
13723 return [pre + "<!", "\\@<!"];
13724 }
13725 }
13726 throw Err("E64: @ follows nothing", epos);
13727}
13728
13729// \%...
13730RegexpParser.prototype.get_token_percent = function(pre) {
13731 var c = this.reader.get();
13732 if (c == "^") {
13733 return [pre + "^", "\\%^"];
13734 }
13735 else if (c == "$") {
13736 return [pre + "$", "\\%$"];
13737 }
13738 else if (c == "V") {
13739 return [pre + "V", "\\%V"];
13740 }
13741 else if (c == "#") {
13742 return [pre + "#", "\\%#"];
13743 }
13744 else if (c == "[") {
13745 return this.get_token_percent_sq(pre + "[");
13746 }
13747 else if (c == "(") {
13748 return [pre + "(", "\\%("];
13749 }
13750 else {
13751 return this.get_token_mlcv(pre);
13752 }
13753}
13754
13755// \%[]
13756RegexpParser.prototype.get_token_percent_sq = function(pre) {
13757 var r = "";
13758 while (TRUE) {
13759 var c = this.reader.peek();
13760 if (this.isend(c)) {
13761 throw Err("E69: Missing ] after \\%[", this.reader.getpos());
13762 }
13763 else if (c == "]") {
13764 if (r == "") {
13765 throw Err("E70: Empty \\%[", this.reader.getpos());
13766 }
13767 this.reader.seek_cur(1);
13768 break;
13769 }
13770 this.reader.seek_cur(1);
13771 r += c;
13772 }
13773 return [pre + r + "]", "\\%[" + r + "]"];
13774}
13775
13776// \%'m \%l \%c \%v
13777RegexpParser.prototype.get_token_mlvc = function(pre) {
13778 var r = "";
13779 var cmp = "";
13780 if (this.reader.p(0) == "<" || this.reader.p(0) == ">") {
13781 var cmp = this.reader.get();
13782 r += cmp;
13783 }
13784 if (this.reader.p(0) == "'") {
13785 r += this.reader.get();
13786 var c = this.reader.p(0);
13787 if (this.isend(c)) {
13788 // FIXME: Should be error? Vim allow this.
13789 var c = "";
13790 }
13791 else {
13792 var c = this.reader.get();
13793 }
13794 return [pre + r + c, "\\%" + cmp + "'" + c];
13795 }
13796 else if (isdigit(this.reader.p(0))) {
13797 var d = this.reader.read_digit();
13798 r += d;
13799 var c = this.reader.p(0);
13800 if (c == "l") {
13801 this.reader.get();
13802 return [pre + r + "l", "\\%" + cmp + d + "l"];
13803 }
13804 else if (c == "c") {
13805 this.reader.get();
13806 return [pre + r + "c", "\\%" + cmp + d + "c"];
13807 }
13808 else if (c == "v") {
13809 this.reader.get();
13810 return [pre + r + "v", "\\%" + cmp + d + "v"];
13811 }
13812 }
13813 throw Err("E71: Invalid character after %", this.reader.getpos());
13814}
13815
13816RegexpParser.prototype.getdecchrs = function() {
13817 return this.reader.read_digit();
13818}
13819
13820RegexpParser.prototype.getoctchrs = function() {
13821 return this.reader.read_odigit();
13822}
13823
13824RegexpParser.prototype.gethexchrs = function(n) {
13825 var r = "";
13826 var __c16 = viml_range(n);
13827 for (var __i16 = 0; __i16 < __c16.length; ++__i16) {
13828 var i = __c16[__i16];
13829 var c = this.reader.peek();
13830 if (!isxdigit(c)) {
13831 break;
13832 }
13833 r += this.reader.get();
13834 }
13835 return r;
13836}
13837
13838if (__webpack_require__.c[__webpack_require__.s] === module) {
13839 main();
13840}
13841else {
13842 module.exports = {
13843 VimLParser: VimLParser,
13844 StringReader: StringReader,
13845 Compiler: Compiler
13846 };
13847}
13848
13849/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(54)(module)))
13850
13851/***/ }),
13852/* 54 */
13853/***/ (function(module, exports) {
13854
13855module.exports = function(module) {
13856 if (!module.webpackPolyfill) {
13857 module.deprecate = function() {};
13858 module.paths = [];
13859 // module.parent = undefined by default
13860 if (!module.children) module.children = [];
13861 Object.defineProperty(module, "loaded", {
13862 enumerable: true,
13863 get: function() {
13864 return module.l;
13865 }
13866 });
13867 Object.defineProperty(module, "id", {
13868 enumerable: true,
13869 get: function() {
13870 return module.i;
13871 }
13872 });
13873 module.webpackPolyfill = 1;
13874 }
13875 return module;
13876};
13877
13878
13879/***/ }),
13880/* 55 */
13881/***/ (function(module, exports, __webpack_require__) {
13882
13883"use strict";
13884
13885Object.defineProperty(exports, "__esModule", { value: true });
13886exports.errorLinePattern = /[^:]+:\s*(.+?):\s*line\s*([0-9]+)\s*col\s*([0-9]+)/;
13887exports.commentPattern = /^[ \t]*("|')/;
13888exports.keywordPattern = /[\w#&$<>.:]/;
13889exports.builtinFunctionPattern = /^((<SID>|\b(v|g|b|s|l|a):)?[\w#&]+)[ \t]*\([^)]*\)/;
13890exports.wordPrePattern = /^.*?(((<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+)|(<SID>|<SID|<SI|<S|<|\b(v|g|b|s|l|a):))$/;
13891exports.wordNextPattern = /^((SID>|ID>|D>|>|<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+|(:[\w#&$.]+)).*?(\r\n|\r|\n)?$/;
13892exports.colorschemePattern = /\bcolorscheme[ \t]+\w*$/;
13893exports.mapCommandPattern = /^([ \t]*(\[ \t]*)?)\w*map[ \t]+/;
13894exports.highlightLinkPattern = /^[ \t]*(hi|highlight)[ \t]+link([ \t]+[^ \t]+)*[ \t]*$/;
13895exports.highlightPattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]*$/;
13896exports.highlightValuePattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]+([^ \t=]+)=[^ \t=]*$/;
13897exports.autocmdPattern = /^[ \t]*(au|autocmd)!?[ \t]+([^ \t,]+,)*[^ \t,]*$/;
13898exports.builtinVariablePattern = [
13899 /\bv:\w*$/,
13900];
13901exports.optionPattern = [
13902 /(^|[ \t]+)&\w*$/,
13903 /(^|[ \t]+)set(l|local|g|global)?[ \t]+\w+$/,
13904];
13905exports.notFunctionPattern = [
13906 /^[ \t]*\\$/,
13907 /^[ \t]*\w+$/,
13908 /^[ \t]*"/,
13909 /(let|set|colorscheme)[ \t][^ \t]*$/,
13910 /[^([,\\ \t\w#>]\w*$/,
13911 /^[ \t]*(hi|highlight)([ \t]+link)?([ \t]+[^ \t]+)*[ \t]*$/,
13912 exports.autocmdPattern,
13913];
13914exports.commandPattern = [
13915 /(^|[ \t]):\w+$/,
13916 /^[ \t]*\w+$/,
13917 /:?silent!?[ \t]\w+/,
13918];
13919exports.featurePattern = [
13920 /\bhas\([ \t]*["']\w*/,
13921];
13922exports.expandPattern = [
13923 /\bexpand\(['"]<\w*$/,
13924 /\bexpand\([ \t]*['"]\w*$/,
13925];
13926exports.notIdentifierPattern = [
13927 exports.commentPattern,
13928 /("|'):\w*$/,
13929 /^[ \t]*\\$/,
13930 /^[ \t]*call[ \t]+[^ \t()]*$/,
13931 /('|"|#|&|\$|<)\w*$/,
13932];
13933
13934
13935/***/ }),
13936/* 56 */,
13937/* 57 */,
13938/* 58 */,
13939/* 59 */,
13940/* 60 */,
13941/* 61 */
13942/***/ (function(module, exports, __webpack_require__) {
13943
13944"use strict";
13945
13946const taskManager = __webpack_require__(62);
13947const async_1 = __webpack_require__(99);
13948const stream_1 = __webpack_require__(134);
13949const sync_1 = __webpack_require__(135);
13950const settings_1 = __webpack_require__(137);
13951const utils = __webpack_require__(63);
13952async function FastGlob(source, options) {
13953 assertPatternsInput(source);
13954 const works = getWorks(source, async_1.default, options);
13955 const result = await Promise.all(works);
13956 return utils.array.flatten(result);
13957}
13958// https://github.com/typescript-eslint/typescript-eslint/issues/60
13959// eslint-disable-next-line no-redeclare
13960(function (FastGlob) {
13961 function sync(source, options) {
13962 assertPatternsInput(source);
13963 const works = getWorks(source, sync_1.default, options);
13964 return utils.array.flatten(works);
13965 }
13966 FastGlob.sync = sync;
13967 function stream(source, options) {
13968 assertPatternsInput(source);
13969 const works = getWorks(source, stream_1.default, options);
13970 /**
13971 * The stream returned by the provider cannot work with an asynchronous iterator.
13972 * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
13973 * This affects performance (+25%). I don't see best solution right now.
13974 */
13975 return utils.stream.merge(works);
13976 }
13977 FastGlob.stream = stream;
13978 function generateTasks(source, options) {
13979 assertPatternsInput(source);
13980 const patterns = [].concat(source);
13981 const settings = new settings_1.default(options);
13982 return taskManager.generate(patterns, settings);
13983 }
13984 FastGlob.generateTasks = generateTasks;
13985 function isDynamicPattern(source, options) {
13986 assertPatternsInput(source);
13987 const settings = new settings_1.default(options);
13988 return utils.pattern.isDynamicPattern(source, settings);
13989 }
13990 FastGlob.isDynamicPattern = isDynamicPattern;
13991 function escapePath(source) {
13992 assertPatternsInput(source);
13993 return utils.path.escape(source);
13994 }
13995 FastGlob.escapePath = escapePath;
13996})(FastGlob || (FastGlob = {}));
13997function getWorks(source, _Provider, options) {
13998 const patterns = [].concat(source);
13999 const settings = new settings_1.default(options);
14000 const tasks = taskManager.generate(patterns, settings);
14001 const provider = new _Provider(settings);
14002 return tasks.map(provider.read, provider);
14003}
14004function assertPatternsInput(input) {
14005 const source = [].concat(input);
14006 const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
14007 if (!isValidSource) {
14008 throw new TypeError('Patterns must be a string (non empty) or an array of strings');
14009 }
14010}
14011module.exports = FastGlob;
14012
14013
14014/***/ }),
14015/* 62 */
14016/***/ (function(module, exports, __webpack_require__) {
14017
14018"use strict";
14019
14020Object.defineProperty(exports, "__esModule", { value: true });
14021const utils = __webpack_require__(63);
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/* 63 */
14087/***/ (function(module, exports, __webpack_require__) {
14088
14089"use strict";
14090
14091Object.defineProperty(exports, "__esModule", { value: true });
14092const array = __webpack_require__(64);
14093exports.array = array;
14094const errno = __webpack_require__(65);
14095exports.errno = errno;
14096const fs = __webpack_require__(66);
14097exports.fs = fs;
14098const path = __webpack_require__(67);
14099exports.path = path;
14100const pattern = __webpack_require__(68);
14101exports.pattern = pattern;
14102const stream = __webpack_require__(95);
14103exports.stream = stream;
14104const string = __webpack_require__(98);
14105exports.string = string;
14106
14107
14108/***/ }),
14109/* 64 */
14110/***/ (function(module, exports, __webpack_require__) {
14111
14112"use strict";
14113
14114Object.defineProperty(exports, "__esModule", { value: true });
14115function flatten(items) {
14116 return items.reduce((collection, item) => [].concat(collection, item), []);
14117}
14118exports.flatten = flatten;
14119function splitWhen(items, predicate) {
14120 const result = [[]];
14121 let groupIndex = 0;
14122 for (const item of items) {
14123 if (predicate(item)) {
14124 groupIndex++;
14125 result[groupIndex] = [];
14126 }
14127 else {
14128 result[groupIndex].push(item);
14129 }
14130 }
14131 return result;
14132}
14133exports.splitWhen = splitWhen;
14134
14135
14136/***/ }),
14137/* 65 */
14138/***/ (function(module, exports, __webpack_require__) {
14139
14140"use strict";
14141
14142Object.defineProperty(exports, "__esModule", { value: true });
14143function isEnoentCodeError(error) {
14144 return error.code === 'ENOENT';
14145}
14146exports.isEnoentCodeError = isEnoentCodeError;
14147
14148
14149/***/ }),
14150/* 66 */
14151/***/ (function(module, exports, __webpack_require__) {
14152
14153"use strict";
14154
14155Object.defineProperty(exports, "__esModule", { value: true });
14156class DirentFromStats {
14157 constructor(name, stats) {
14158 this.name = name;
14159 this.isBlockDevice = stats.isBlockDevice.bind(stats);
14160 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
14161 this.isDirectory = stats.isDirectory.bind(stats);
14162 this.isFIFO = stats.isFIFO.bind(stats);
14163 this.isFile = stats.isFile.bind(stats);
14164 this.isSocket = stats.isSocket.bind(stats);
14165 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
14166 }
14167}
14168function createDirentFromStats(name, stats) {
14169 return new DirentFromStats(name, stats);
14170}
14171exports.createDirentFromStats = createDirentFromStats;
14172
14173
14174/***/ }),
14175/* 67 */
14176/***/ (function(module, exports, __webpack_require__) {
14177
14178"use strict";
14179
14180Object.defineProperty(exports, "__esModule", { value: true });
14181const path = __webpack_require__(13);
14182const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
14183const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
14184/**
14185 * Designed to work only with simple paths: `dir\\file`.
14186 */
14187function unixify(filepath) {
14188 return filepath.replace(/\\/g, '/');
14189}
14190exports.unixify = unixify;
14191function makeAbsolute(cwd, filepath) {
14192 return path.resolve(cwd, filepath);
14193}
14194exports.makeAbsolute = makeAbsolute;
14195function escape(pattern) {
14196 return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
14197}
14198exports.escape = escape;
14199function removeLeadingDotSegment(entry) {
14200 // We do not use `startsWith` because this is 10x slower than current implementation for some cases.
14201 // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
14202 if (entry.charAt(0) === '.') {
14203 const secondCharactery = entry.charAt(1);
14204 if (secondCharactery === '/' || secondCharactery === '\\') {
14205 return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
14206 }
14207 }
14208 return entry;
14209}
14210exports.removeLeadingDotSegment = removeLeadingDotSegment;
14211
14212
14213/***/ }),
14214/* 68 */
14215/***/ (function(module, exports, __webpack_require__) {
14216
14217"use strict";
14218
14219Object.defineProperty(exports, "__esModule", { value: true });
14220const path = __webpack_require__(13);
14221const globParent = __webpack_require__(69);
14222const micromatch = __webpack_require__(72);
14223const picomatch = __webpack_require__(89);
14224const GLOBSTAR = '**';
14225const ESCAPE_SYMBOL = '\\';
14226const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
14227const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/;
14228const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/;
14229const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/;
14230const BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/;
14231function isStaticPattern(pattern, options = {}) {
14232 return !isDynamicPattern(pattern, options);
14233}
14234exports.isStaticPattern = isStaticPattern;
14235function isDynamicPattern(pattern, options = {}) {
14236 /**
14237 * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
14238 * filepath directly (without read directory).
14239 */
14240 if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
14241 return true;
14242 }
14243 if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
14244 return true;
14245 }
14246 if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
14247 return true;
14248 }
14249 if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) {
14250 return true;
14251 }
14252 return false;
14253}
14254exports.isDynamicPattern = isDynamicPattern;
14255function convertToPositivePattern(pattern) {
14256 return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
14257}
14258exports.convertToPositivePattern = convertToPositivePattern;
14259function convertToNegativePattern(pattern) {
14260 return '!' + pattern;
14261}
14262exports.convertToNegativePattern = convertToNegativePattern;
14263function isNegativePattern(pattern) {
14264 return pattern.startsWith('!') && pattern[1] !== '(';
14265}
14266exports.isNegativePattern = isNegativePattern;
14267function isPositivePattern(pattern) {
14268 return !isNegativePattern(pattern);
14269}
14270exports.isPositivePattern = isPositivePattern;
14271function getNegativePatterns(patterns) {
14272 return patterns.filter(isNegativePattern);
14273}
14274exports.getNegativePatterns = getNegativePatterns;
14275function getPositivePatterns(patterns) {
14276 return patterns.filter(isPositivePattern);
14277}
14278exports.getPositivePatterns = getPositivePatterns;
14279function getBaseDirectory(pattern) {
14280 return globParent(pattern, { flipBackslashes: false });
14281}
14282exports.getBaseDirectory = getBaseDirectory;
14283function hasGlobStar(pattern) {
14284 return pattern.includes(GLOBSTAR);
14285}
14286exports.hasGlobStar = hasGlobStar;
14287function endsWithSlashGlobStar(pattern) {
14288 return pattern.endsWith('/' + GLOBSTAR);
14289}
14290exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
14291function isAffectDepthOfReadingPattern(pattern) {
14292 const basename = path.basename(pattern);
14293 return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
14294}
14295exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
14296function expandPatternsWithBraceExpansion(patterns) {
14297 return patterns.reduce((collection, pattern) => {
14298 return collection.concat(expandBraceExpansion(pattern));
14299 }, []);
14300}
14301exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
14302function expandBraceExpansion(pattern) {
14303 return micromatch.braces(pattern, {
14304 expand: true,
14305 nodupes: true
14306 });
14307}
14308exports.expandBraceExpansion = expandBraceExpansion;
14309function getPatternParts(pattern, options) {
14310 const info = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
14311 // See micromatch/picomatch#58 for more details
14312 if (info.parts.length === 0) {
14313 return [pattern];
14314 }
14315 return info.parts;
14316}
14317exports.getPatternParts = getPatternParts;
14318function makeRe(pattern, options) {
14319 return micromatch.makeRe(pattern, options);
14320}
14321exports.makeRe = makeRe;
14322function convertPatternsToRe(patterns, options) {
14323 return patterns.map((pattern) => makeRe(pattern, options));
14324}
14325exports.convertPatternsToRe = convertPatternsToRe;
14326function matchAny(entry, patternsRe) {
14327 return patternsRe.some((patternRe) => patternRe.test(entry));
14328}
14329exports.matchAny = matchAny;
14330
14331
14332/***/ }),
14333/* 69 */
14334/***/ (function(module, exports, __webpack_require__) {
14335
14336"use strict";
14337
14338
14339var isGlob = __webpack_require__(70);
14340var pathPosixDirname = __webpack_require__(13).posix.dirname;
14341var isWin32 = __webpack_require__(14).platform() === 'win32';
14342
14343var slash = '/';
14344var backslash = /\\/g;
14345var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
14346var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
14347var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
14348
14349/**
14350 * @param {string} str
14351 * @param {Object} opts
14352 * @param {boolean} [opts.flipBackslashes=true]
14353 */
14354module.exports = function globParent(str, opts) {
14355 var options = Object.assign({ flipBackslashes: true }, opts);
14356
14357 // flip windows path separators
14358 if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
14359 str = str.replace(backslash, slash);
14360 }
14361
14362 // special case for strings ending in enclosure containing path separator
14363 if (enclosure.test(str)) {
14364 str += slash;
14365 }
14366
14367 // preserves full path in case of trailing path separator
14368 str += 'a';
14369
14370 // remove path parts that are globby
14371 do {
14372 str = pathPosixDirname(str);
14373 } while (isGlob(str) || globby.test(str));
14374
14375 // remove escape chars and return result
14376 return str.replace(escaped, '$1');
14377};
14378
14379
14380/***/ }),
14381/* 70 */
14382/***/ (function(module, exports, __webpack_require__) {
14383
14384/*!
14385 * is-glob <https://github.com/jonschlinkert/is-glob>
14386 *
14387 * Copyright (c) 2014-2017, Jon Schlinkert.
14388 * Released under the MIT License.
14389 */
14390
14391var isExtglob = __webpack_require__(71);
14392var chars = { '{': '}', '(': ')', '[': ']'};
14393var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
14394var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
14395
14396module.exports = function isGlob(str, options) {
14397 if (typeof str !== 'string' || str === '') {
14398 return false;
14399 }
14400
14401 if (isExtglob(str)) {
14402 return true;
14403 }
14404
14405 var regex = strictRegex;
14406 var match;
14407
14408 // optionally relax regex
14409 if (options && options.strict === false) {
14410 regex = relaxedRegex;
14411 }
14412
14413 while ((match = regex.exec(str))) {
14414 if (match[2]) return true;
14415 var idx = match.index + match[0].length;
14416
14417 // if an open bracket/brace/paren is escaped,
14418 // set the index to the next closing character
14419 var open = match[1];
14420 var close = open ? chars[open] : null;
14421 if (open && close) {
14422 var n = str.indexOf(close, idx);
14423 if (n !== -1) {
14424 idx = n + 1;
14425 }
14426 }
14427
14428 str = str.slice(idx);
14429 }
14430 return false;
14431};
14432
14433
14434/***/ }),
14435/* 71 */
14436/***/ (function(module, exports) {
14437
14438/*!
14439 * is-extglob <https://github.com/jonschlinkert/is-extglob>
14440 *
14441 * Copyright (c) 2014-2016, Jon Schlinkert.
14442 * Licensed under the MIT License.
14443 */
14444
14445module.exports = function isExtglob(str) {
14446 if (typeof str !== 'string' || str === '') {
14447 return false;
14448 }
14449
14450 var match;
14451 while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
14452 if (match[2]) return true;
14453 str = str.slice(match.index + match[0].length);
14454 }
14455
14456 return false;
14457};
14458
14459
14460/***/ }),
14461/* 72 */
14462/***/ (function(module, exports, __webpack_require__) {
14463
14464"use strict";
14465
14466
14467const util = __webpack_require__(49);
14468const braces = __webpack_require__(73);
14469const picomatch = __webpack_require__(83);
14470const utils = __webpack_require__(86);
14471const isEmptyString = val => typeof val === 'string' && (val === '' || val === './');
14472
14473/**
14474 * Returns an array of strings that match one or more glob patterns.
14475 *
14476 * ```js
14477 * const mm = require('micromatch');
14478 * // mm(list, patterns[, options]);
14479 *
14480 * console.log(mm(['a.js', 'a.txt'], ['*.js']));
14481 * //=> [ 'a.js' ]
14482 * ```
14483 * @param {String|Array<string>} list List of strings to match.
14484 * @param {String|Array<string>} patterns One or more glob patterns to use for matching.
14485 * @param {Object} options See available [options](#options)
14486 * @return {Array} Returns an array of matches
14487 * @summary false
14488 * @api public
14489 */
14490
14491const micromatch = (list, patterns, options) => {
14492 patterns = [].concat(patterns);
14493 list = [].concat(list);
14494
14495 let omit = new Set();
14496 let keep = new Set();
14497 let items = new Set();
14498 let negatives = 0;
14499
14500 let onResult = state => {
14501 items.add(state.output);
14502 if (options && options.onResult) {
14503 options.onResult(state);
14504 }
14505 };
14506
14507 for (let i = 0; i < patterns.length; i++) {
14508 let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
14509 let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
14510 if (negated) negatives++;
14511
14512 for (let item of list) {
14513 let matched = isMatch(item, true);
14514
14515 let match = negated ? !matched.isMatch : matched.isMatch;
14516 if (!match) continue;
14517
14518 if (negated) {
14519 omit.add(matched.output);
14520 } else {
14521 omit.delete(matched.output);
14522 keep.add(matched.output);
14523 }
14524 }
14525 }
14526
14527 let result = negatives === patterns.length ? [...items] : [...keep];
14528 let matches = result.filter(item => !omit.has(item));
14529
14530 if (options && matches.length === 0) {
14531 if (options.failglob === true) {
14532 throw new Error(`No matches found for "${patterns.join(', ')}"`);
14533 }
14534
14535 if (options.nonull === true || options.nullglob === true) {
14536 return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns;
14537 }
14538 }
14539
14540 return matches;
14541};
14542
14543/**
14544 * Backwards compatibility
14545 */
14546
14547micromatch.match = micromatch;
14548
14549/**
14550 * Returns a matcher function from the given glob `pattern` and `options`.
14551 * The returned function takes a string to match as its only argument and returns
14552 * true if the string is a match.
14553 *
14554 * ```js
14555 * const mm = require('micromatch');
14556 * // mm.matcher(pattern[, options]);
14557 *
14558 * const isMatch = mm.matcher('*.!(*a)');
14559 * console.log(isMatch('a.a')); //=> false
14560 * console.log(isMatch('a.b')); //=> true
14561 * ```
14562 * @param {String} `pattern` Glob pattern
14563 * @param {Object} `options`
14564 * @return {Function} Returns a matcher function.
14565 * @api public
14566 */
14567
14568micromatch.matcher = (pattern, options) => picomatch(pattern, options);
14569
14570/**
14571 * Returns true if **any** of the given glob `patterns` match the specified `string`.
14572 *
14573 * ```js
14574 * const mm = require('micromatch');
14575 * // mm.isMatch(string, patterns[, options]);
14576 *
14577 * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
14578 * console.log(mm.isMatch('a.a', 'b.*')); //=> false
14579 * ```
14580 * @param {String} str The string to test.
14581 * @param {String|Array} patterns One or more glob patterns to use for matching.
14582 * @param {Object} [options] See available [options](#options).
14583 * @return {Boolean} Returns true if any patterns match `str`
14584 * @api public
14585 */
14586
14587micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
14588
14589/**
14590 * Backwards compatibility
14591 */
14592
14593micromatch.any = micromatch.isMatch;
14594
14595/**
14596 * Returns a list of strings that _**do not match any**_ of the given `patterns`.
14597 *
14598 * ```js
14599 * const mm = require('micromatch');
14600 * // mm.not(list, patterns[, options]);
14601 *
14602 * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
14603 * //=> ['b.b', 'c.c']
14604 * ```
14605 * @param {Array} `list` Array of strings to match.
14606 * @param {String|Array} `patterns` One or more glob pattern to use for matching.
14607 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14608 * @return {Array} Returns an array of strings that **do not match** the given patterns.
14609 * @api public
14610 */
14611
14612micromatch.not = (list, patterns, options = {}) => {
14613 patterns = [].concat(patterns).map(String);
14614 let result = new Set();
14615 let items = [];
14616
14617 let onResult = state => {
14618 if (options.onResult) options.onResult(state);
14619 items.push(state.output);
14620 };
14621
14622 let matches = micromatch(list, patterns, { ...options, onResult });
14623
14624 for (let item of items) {
14625 if (!matches.includes(item)) {
14626 result.add(item);
14627 }
14628 }
14629 return [...result];
14630};
14631
14632/**
14633 * Returns true if the given `string` contains the given pattern. Similar
14634 * to [.isMatch](#isMatch) but the pattern can match any part of the string.
14635 *
14636 * ```js
14637 * var mm = require('micromatch');
14638 * // mm.contains(string, pattern[, options]);
14639 *
14640 * console.log(mm.contains('aa/bb/cc', '*b'));
14641 * //=> true
14642 * console.log(mm.contains('aa/bb/cc', '*d'));
14643 * //=> false
14644 * ```
14645 * @param {String} `str` The string to match.
14646 * @param {String|Array} `patterns` Glob pattern to use for matching.
14647 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14648 * @return {Boolean} Returns true if the patter matches any part of `str`.
14649 * @api public
14650 */
14651
14652micromatch.contains = (str, pattern, options) => {
14653 if (typeof str !== 'string') {
14654 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
14655 }
14656
14657 if (Array.isArray(pattern)) {
14658 return pattern.some(p => micromatch.contains(str, p, options));
14659 }
14660
14661 if (typeof pattern === 'string') {
14662 if (isEmptyString(str) || isEmptyString(pattern)) {
14663 return false;
14664 }
14665
14666 if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {
14667 return true;
14668 }
14669 }
14670
14671 return micromatch.isMatch(str, pattern, { ...options, contains: true });
14672};
14673
14674/**
14675 * Filter the keys of the given object with the given `glob` pattern
14676 * and `options`. Does not attempt to match nested keys. If you need this feature,
14677 * use [glob-object][] instead.
14678 *
14679 * ```js
14680 * const mm = require('micromatch');
14681 * // mm.matchKeys(object, patterns[, options]);
14682 *
14683 * const obj = { aa: 'a', ab: 'b', ac: 'c' };
14684 * console.log(mm.matchKeys(obj, '*b'));
14685 * //=> { ab: 'b' }
14686 * ```
14687 * @param {Object} `object` The object with keys to filter.
14688 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14689 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14690 * @return {Object} Returns an object with only keys that match the given patterns.
14691 * @api public
14692 */
14693
14694micromatch.matchKeys = (obj, patterns, options) => {
14695 if (!utils.isObject(obj)) {
14696 throw new TypeError('Expected the first argument to be an object');
14697 }
14698 let keys = micromatch(Object.keys(obj), patterns, options);
14699 let res = {};
14700 for (let key of keys) res[key] = obj[key];
14701 return res;
14702};
14703
14704/**
14705 * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
14706 *
14707 * ```js
14708 * const mm = require('micromatch');
14709 * // mm.some(list, patterns[, options]);
14710 *
14711 * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
14712 * // true
14713 * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
14714 * // false
14715 * ```
14716 * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
14717 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14718 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14719 * @return {Boolean} Returns true if any patterns match `str`
14720 * @api public
14721 */
14722
14723micromatch.some = (list, patterns, options) => {
14724 let items = [].concat(list);
14725
14726 for (let pattern of [].concat(patterns)) {
14727 let isMatch = picomatch(String(pattern), options);
14728 if (items.some(item => isMatch(item))) {
14729 return true;
14730 }
14731 }
14732 return false;
14733};
14734
14735/**
14736 * Returns true if every string in the given `list` matches
14737 * any of the given glob `patterns`.
14738 *
14739 * ```js
14740 * const mm = require('micromatch');
14741 * // mm.every(list, patterns[, options]);
14742 *
14743 * console.log(mm.every('foo.js', ['foo.js']));
14744 * // true
14745 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
14746 * // true
14747 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
14748 * // false
14749 * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
14750 * // false
14751 * ```
14752 * @param {String|Array} `list` The string or array of strings to test.
14753 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14754 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14755 * @return {Boolean} Returns true if any patterns match `str`
14756 * @api public
14757 */
14758
14759micromatch.every = (list, patterns, options) => {
14760 let items = [].concat(list);
14761
14762 for (let pattern of [].concat(patterns)) {
14763 let isMatch = picomatch(String(pattern), options);
14764 if (!items.every(item => isMatch(item))) {
14765 return false;
14766 }
14767 }
14768 return true;
14769};
14770
14771/**
14772 * Returns true if **all** of the given `patterns` match
14773 * the specified string.
14774 *
14775 * ```js
14776 * const mm = require('micromatch');
14777 * // mm.all(string, patterns[, options]);
14778 *
14779 * console.log(mm.all('foo.js', ['foo.js']));
14780 * // true
14781 *
14782 * console.log(mm.all('foo.js', ['*.js', '!foo.js']));
14783 * // false
14784 *
14785 * console.log(mm.all('foo.js', ['*.js', 'foo.js']));
14786 * // true
14787 *
14788 * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
14789 * // true
14790 * ```
14791 * @param {String|Array} `str` The string to test.
14792 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14793 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14794 * @return {Boolean} Returns true if any patterns match `str`
14795 * @api public
14796 */
14797
14798micromatch.all = (str, patterns, options) => {
14799 if (typeof str !== 'string') {
14800 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
14801 }
14802
14803 return [].concat(patterns).every(p => picomatch(p, options)(str));
14804};
14805
14806/**
14807 * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
14808 *
14809 * ```js
14810 * const mm = require('micromatch');
14811 * // mm.capture(pattern, string[, options]);
14812 *
14813 * console.log(mm.capture('test/*.js', 'test/foo.js'));
14814 * //=> ['foo']
14815 * console.log(mm.capture('test/*.js', 'foo/bar.css'));
14816 * //=> null
14817 * ```
14818 * @param {String} `glob` Glob pattern to use for matching.
14819 * @param {String} `input` String to match
14820 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14821 * @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
14822 * @api public
14823 */
14824
14825micromatch.capture = (glob, input, options) => {
14826 let posix = utils.isWindows(options);
14827 let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
14828 let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
14829
14830 if (match) {
14831 return match.slice(1).map(v => v === void 0 ? '' : v);
14832 }
14833};
14834
14835/**
14836 * Create a regular expression from the given glob `pattern`.
14837 *
14838 * ```js
14839 * const mm = require('micromatch');
14840 * // mm.makeRe(pattern[, options]);
14841 *
14842 * console.log(mm.makeRe('*.js'));
14843 * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
14844 * ```
14845 * @param {String} `pattern` A glob pattern to convert to regex.
14846 * @param {Object} `options`
14847 * @return {RegExp} Returns a regex created from the given pattern.
14848 * @api public
14849 */
14850
14851micromatch.makeRe = (...args) => picomatch.makeRe(...args);
14852
14853/**
14854 * Scan a glob pattern to separate the pattern into segments. Used
14855 * by the [split](#split) method.
14856 *
14857 * ```js
14858 * const mm = require('micromatch');
14859 * const state = mm.scan(pattern[, options]);
14860 * ```
14861 * @param {String} `pattern`
14862 * @param {Object} `options`
14863 * @return {Object} Returns an object with
14864 * @api public
14865 */
14866
14867micromatch.scan = (...args) => picomatch.scan(...args);
14868
14869/**
14870 * Parse a glob pattern to create the source string for a regular
14871 * expression.
14872 *
14873 * ```js
14874 * const mm = require('micromatch');
14875 * const state = mm(pattern[, options]);
14876 * ```
14877 * @param {String} `glob`
14878 * @param {Object} `options`
14879 * @return {Object} Returns an object with useful properties and output to be used as regex source string.
14880 * @api public
14881 */
14882
14883micromatch.parse = (patterns, options) => {
14884 let res = [];
14885 for (let pattern of [].concat(patterns || [])) {
14886 for (let str of braces(String(pattern), options)) {
14887 res.push(picomatch.parse(str, options));
14888 }
14889 }
14890 return res;
14891};
14892
14893/**
14894 * Process the given brace `pattern`.
14895 *
14896 * ```js
14897 * const { braces } = require('micromatch');
14898 * console.log(braces('foo/{a,b,c}/bar'));
14899 * //=> [ 'foo/(a|b|c)/bar' ]
14900 *
14901 * console.log(braces('foo/{a,b,c}/bar', { expand: true }));
14902 * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
14903 * ```
14904 * @param {String} `pattern` String with brace pattern to process.
14905 * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
14906 * @return {Array}
14907 * @api public
14908 */
14909
14910micromatch.braces = (pattern, options) => {
14911 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
14912 if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
14913 return [pattern];
14914 }
14915 return braces(pattern, options);
14916};
14917
14918/**
14919 * Expand braces
14920 */
14921
14922micromatch.braceExpand = (pattern, options) => {
14923 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
14924 return micromatch.braces(pattern, { ...options, expand: true });
14925};
14926
14927/**
14928 * Expose micromatch
14929 */
14930
14931module.exports = micromatch;
14932
14933
14934/***/ }),
14935/* 73 */
14936/***/ (function(module, exports, __webpack_require__) {
14937
14938"use strict";
14939
14940
14941const stringify = __webpack_require__(74);
14942const compile = __webpack_require__(76);
14943const expand = __webpack_require__(80);
14944const parse = __webpack_require__(81);
14945
14946/**
14947 * Expand the given pattern or create a regex-compatible string.
14948 *
14949 * ```js
14950 * const braces = require('braces');
14951 * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
14952 * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
14953 * ```
14954 * @param {String} `str`
14955 * @param {Object} `options`
14956 * @return {String}
14957 * @api public
14958 */
14959
14960const braces = (input, options = {}) => {
14961 let output = [];
14962
14963 if (Array.isArray(input)) {
14964 for (let pattern of input) {
14965 let result = braces.create(pattern, options);
14966 if (Array.isArray(result)) {
14967 output.push(...result);
14968 } else {
14969 output.push(result);
14970 }
14971 }
14972 } else {
14973 output = [].concat(braces.create(input, options));
14974 }
14975
14976 if (options && options.expand === true && options.nodupes === true) {
14977 output = [...new Set(output)];
14978 }
14979 return output;
14980};
14981
14982/**
14983 * Parse the given `str` with the given `options`.
14984 *
14985 * ```js
14986 * // braces.parse(pattern, [, options]);
14987 * const ast = braces.parse('a/{b,c}/d');
14988 * console.log(ast);
14989 * ```
14990 * @param {String} pattern Brace pattern to parse
14991 * @param {Object} options
14992 * @return {Object} Returns an AST
14993 * @api public
14994 */
14995
14996braces.parse = (input, options = {}) => parse(input, options);
14997
14998/**
14999 * Creates a braces string from an AST, or an AST node.
15000 *
15001 * ```js
15002 * const braces = require('braces');
15003 * let ast = braces.parse('foo/{a,b}/bar');
15004 * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
15005 * ```
15006 * @param {String} `input` Brace pattern or AST.
15007 * @param {Object} `options`
15008 * @return {Array} Returns an array of expanded values.
15009 * @api public
15010 */
15011
15012braces.stringify = (input, options = {}) => {
15013 if (typeof input === 'string') {
15014 return stringify(braces.parse(input, options), options);
15015 }
15016 return stringify(input, options);
15017};
15018
15019/**
15020 * Compiles a brace pattern into a regex-compatible, optimized string.
15021 * This method is called by the main [braces](#braces) function by default.
15022 *
15023 * ```js
15024 * const braces = require('braces');
15025 * console.log(braces.compile('a/{b,c}/d'));
15026 * //=> ['a/(b|c)/d']
15027 * ```
15028 * @param {String} `input` Brace pattern or AST.
15029 * @param {Object} `options`
15030 * @return {Array} Returns an array of expanded values.
15031 * @api public
15032 */
15033
15034braces.compile = (input, options = {}) => {
15035 if (typeof input === 'string') {
15036 input = braces.parse(input, options);
15037 }
15038 return compile(input, options);
15039};
15040
15041/**
15042 * Expands a brace pattern into an array. This method is called by the
15043 * main [braces](#braces) function when `options.expand` is true. Before
15044 * using this method it's recommended that you read the [performance notes](#performance))
15045 * and advantages of using [.compile](#compile) instead.
15046 *
15047 * ```js
15048 * const braces = require('braces');
15049 * console.log(braces.expand('a/{b,c}/d'));
15050 * //=> ['a/b/d', 'a/c/d'];
15051 * ```
15052 * @param {String} `pattern` Brace pattern
15053 * @param {Object} `options`
15054 * @return {Array} Returns an array of expanded values.
15055 * @api public
15056 */
15057
15058braces.expand = (input, options = {}) => {
15059 if (typeof input === 'string') {
15060 input = braces.parse(input, options);
15061 }
15062
15063 let result = expand(input, options);
15064
15065 // filter out empty strings if specified
15066 if (options.noempty === true) {
15067 result = result.filter(Boolean);
15068 }
15069
15070 // filter out duplicates if specified
15071 if (options.nodupes === true) {
15072 result = [...new Set(result)];
15073 }
15074
15075 return result;
15076};
15077
15078/**
15079 * Processes a brace pattern and returns either an expanded array
15080 * (if `options.expand` is true), a highly optimized regex-compatible string.
15081 * This method is called by the main [braces](#braces) function.
15082 *
15083 * ```js
15084 * const braces = require('braces');
15085 * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
15086 * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
15087 * ```
15088 * @param {String} `pattern` Brace pattern
15089 * @param {Object} `options`
15090 * @return {Array} Returns an array of expanded values.
15091 * @api public
15092 */
15093
15094braces.create = (input, options = {}) => {
15095 if (input === '' || input.length < 3) {
15096 return [input];
15097 }
15098
15099 return options.expand !== true
15100 ? braces.compile(input, options)
15101 : braces.expand(input, options);
15102};
15103
15104/**
15105 * Expose "braces"
15106 */
15107
15108module.exports = braces;
15109
15110
15111/***/ }),
15112/* 74 */
15113/***/ (function(module, exports, __webpack_require__) {
15114
15115"use strict";
15116
15117
15118const utils = __webpack_require__(75);
15119
15120module.exports = (ast, options = {}) => {
15121 let stringify = (node, parent = {}) => {
15122 let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
15123 let invalidNode = node.invalid === true && options.escapeInvalid === true;
15124 let output = '';
15125
15126 if (node.value) {
15127 if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
15128 return '\\' + node.value;
15129 }
15130 return node.value;
15131 }
15132
15133 if (node.value) {
15134 return node.value;
15135 }
15136
15137 if (node.nodes) {
15138 for (let child of node.nodes) {
15139 output += stringify(child);
15140 }
15141 }
15142 return output;
15143 };
15144
15145 return stringify(ast);
15146};
15147
15148
15149
15150/***/ }),
15151/* 75 */
15152/***/ (function(module, exports, __webpack_require__) {
15153
15154"use strict";
15155
15156
15157exports.isInteger = num => {
15158 if (typeof num === 'number') {
15159 return Number.isInteger(num);
15160 }
15161 if (typeof num === 'string' && num.trim() !== '') {
15162 return Number.isInteger(Number(num));
15163 }
15164 return false;
15165};
15166
15167/**
15168 * Find a node of the given type
15169 */
15170
15171exports.find = (node, type) => node.nodes.find(node => node.type === type);
15172
15173/**
15174 * Find a node of the given type
15175 */
15176
15177exports.exceedsLimit = (min, max, step = 1, limit) => {
15178 if (limit === false) return false;
15179 if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
15180 return ((Number(max) - Number(min)) / Number(step)) >= limit;
15181};
15182
15183/**
15184 * Escape the given node with '\\' before node.value
15185 */
15186
15187exports.escapeNode = (block, n = 0, type) => {
15188 let node = block.nodes[n];
15189 if (!node) return;
15190
15191 if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
15192 if (node.escaped !== true) {
15193 node.value = '\\' + node.value;
15194 node.escaped = true;
15195 }
15196 }
15197};
15198
15199/**
15200 * Returns true if the given brace node should be enclosed in literal braces
15201 */
15202
15203exports.encloseBrace = node => {
15204 if (node.type !== 'brace') return false;
15205 if ((node.commas >> 0 + node.ranges >> 0) === 0) {
15206 node.invalid = true;
15207 return true;
15208 }
15209 return false;
15210};
15211
15212/**
15213 * Returns true if a brace node is invalid.
15214 */
15215
15216exports.isInvalidBrace = block => {
15217 if (block.type !== 'brace') return false;
15218 if (block.invalid === true || block.dollar) return true;
15219 if ((block.commas >> 0 + block.ranges >> 0) === 0) {
15220 block.invalid = true;
15221 return true;
15222 }
15223 if (block.open !== true || block.close !== true) {
15224 block.invalid = true;
15225 return true;
15226 }
15227 return false;
15228};
15229
15230/**
15231 * Returns true if a node is an open or close node
15232 */
15233
15234exports.isOpenOrClose = node => {
15235 if (node.type === 'open' || node.type === 'close') {
15236 return true;
15237 }
15238 return node.open === true || node.close === true;
15239};
15240
15241/**
15242 * Reduce an array of text nodes.
15243 */
15244
15245exports.reduce = nodes => nodes.reduce((acc, node) => {
15246 if (node.type === 'text') acc.push(node.value);
15247 if (node.type === 'range') node.type = 'text';
15248 return acc;
15249}, []);
15250
15251/**
15252 * Flatten an array
15253 */
15254
15255exports.flatten = (...args) => {
15256 const result = [];
15257 const flat = arr => {
15258 for (let i = 0; i < arr.length; i++) {
15259 let ele = arr[i];
15260 Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
15261 }
15262 return result;
15263 };
15264 flat(args);
15265 return result;
15266};
15267
15268
15269/***/ }),
15270/* 76 */
15271/***/ (function(module, exports, __webpack_require__) {
15272
15273"use strict";
15274
15275
15276const fill = __webpack_require__(77);
15277const utils = __webpack_require__(75);
15278
15279const compile = (ast, options = {}) => {
15280 let walk = (node, parent = {}) => {
15281 let invalidBlock = utils.isInvalidBrace(parent);
15282 let invalidNode = node.invalid === true && options.escapeInvalid === true;
15283 let invalid = invalidBlock === true || invalidNode === true;
15284 let prefix = options.escapeInvalid === true ? '\\' : '';
15285 let output = '';
15286
15287 if (node.isOpen === true) {
15288 return prefix + node.value;
15289 }
15290 if (node.isClose === true) {
15291 return prefix + node.value;
15292 }
15293
15294 if (node.type === 'open') {
15295 return invalid ? (prefix + node.value) : '(';
15296 }
15297
15298 if (node.type === 'close') {
15299 return invalid ? (prefix + node.value) : ')';
15300 }
15301
15302 if (node.type === 'comma') {
15303 return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
15304 }
15305
15306 if (node.value) {
15307 return node.value;
15308 }
15309
15310 if (node.nodes && node.ranges > 0) {
15311 let args = utils.reduce(node.nodes);
15312 let range = fill(...args, { ...options, wrap: false, toRegex: true });
15313
15314 if (range.length !== 0) {
15315 return args.length > 1 && range.length > 1 ? `(${range})` : range;
15316 }
15317 }
15318
15319 if (node.nodes) {
15320 for (let child of node.nodes) {
15321 output += walk(child, node);
15322 }
15323 }
15324 return output;
15325 };
15326
15327 return walk(ast);
15328};
15329
15330module.exports = compile;
15331
15332
15333/***/ }),
15334/* 77 */
15335/***/ (function(module, exports, __webpack_require__) {
15336
15337"use strict";
15338/*!
15339 * fill-range <https://github.com/jonschlinkert/fill-range>
15340 *
15341 * Copyright (c) 2014-present, Jon Schlinkert.
15342 * Licensed under the MIT License.
15343 */
15344
15345
15346
15347const util = __webpack_require__(49);
15348const toRegexRange = __webpack_require__(78);
15349
15350const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
15351
15352const transform = toNumber => {
15353 return value => toNumber === true ? Number(value) : String(value);
15354};
15355
15356const isValidValue = value => {
15357 return typeof value === 'number' || (typeof value === 'string' && value !== '');
15358};
15359
15360const isNumber = num => Number.isInteger(+num);
15361
15362const zeros = input => {
15363 let value = `${input}`;
15364 let index = -1;
15365 if (value[0] === '-') value = value.slice(1);
15366 if (value === '0') return false;
15367 while (value[++index] === '0');
15368 return index > 0;
15369};
15370
15371const stringify = (start, end, options) => {
15372 if (typeof start === 'string' || typeof end === 'string') {
15373 return true;
15374 }
15375 return options.stringify === true;
15376};
15377
15378const pad = (input, maxLength, toNumber) => {
15379 if (maxLength > 0) {
15380 let dash = input[0] === '-' ? '-' : '';
15381 if (dash) input = input.slice(1);
15382 input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
15383 }
15384 if (toNumber === false) {
15385 return String(input);
15386 }
15387 return input;
15388};
15389
15390const toMaxLen = (input, maxLength) => {
15391 let negative = input[0] === '-' ? '-' : '';
15392 if (negative) {
15393 input = input.slice(1);
15394 maxLength--;
15395 }
15396 while (input.length < maxLength) input = '0' + input;
15397 return negative ? ('-' + input) : input;
15398};
15399
15400const toSequence = (parts, options) => {
15401 parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
15402 parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
15403
15404 let prefix = options.capture ? '' : '?:';
15405 let positives = '';
15406 let negatives = '';
15407 let result;
15408
15409 if (parts.positives.length) {
15410 positives = parts.positives.join('|');
15411 }
15412
15413 if (parts.negatives.length) {
15414 negatives = `-(${prefix}${parts.negatives.join('|')})`;
15415 }
15416
15417 if (positives && negatives) {
15418 result = `${positives}|${negatives}`;
15419 } else {
15420 result = positives || negatives;
15421 }
15422
15423 if (options.wrap) {
15424 return `(${prefix}${result})`;
15425 }
15426
15427 return result;
15428};
15429
15430const toRange = (a, b, isNumbers, options) => {
15431 if (isNumbers) {
15432 return toRegexRange(a, b, { wrap: false, ...options });
15433 }
15434
15435 let start = String.fromCharCode(a);
15436 if (a === b) return start;
15437
15438 let stop = String.fromCharCode(b);
15439 return `[${start}-${stop}]`;
15440};
15441
15442const toRegex = (start, end, options) => {
15443 if (Array.isArray(start)) {
15444 let wrap = options.wrap === true;
15445 let prefix = options.capture ? '' : '?:';
15446 return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
15447 }
15448 return toRegexRange(start, end, options);
15449};
15450
15451const rangeError = (...args) => {
15452 return new RangeError('Invalid range arguments: ' + util.inspect(...args));
15453};
15454
15455const invalidRange = (start, end, options) => {
15456 if (options.strictRanges === true) throw rangeError([start, end]);
15457 return [];
15458};
15459
15460const invalidStep = (step, options) => {
15461 if (options.strictRanges === true) {
15462 throw new TypeError(`Expected step "${step}" to be a number`);
15463 }
15464 return [];
15465};
15466
15467const fillNumbers = (start, end, step = 1, options = {}) => {
15468 let a = Number(start);
15469 let b = Number(end);
15470
15471 if (!Number.isInteger(a) || !Number.isInteger(b)) {
15472 if (options.strictRanges === true) throw rangeError([start, end]);
15473 return [];
15474 }
15475
15476 // fix negative zero
15477 if (a === 0) a = 0;
15478 if (b === 0) b = 0;
15479
15480 let descending = a > b;
15481 let startString = String(start);
15482 let endString = String(end);
15483 let stepString = String(step);
15484 step = Math.max(Math.abs(step), 1);
15485
15486 let padded = zeros(startString) || zeros(endString) || zeros(stepString);
15487 let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
15488 let toNumber = padded === false && stringify(start, end, options) === false;
15489 let format = options.transform || transform(toNumber);
15490
15491 if (options.toRegex && step === 1) {
15492 return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
15493 }
15494
15495 let parts = { negatives: [], positives: [] };
15496 let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
15497 let range = [];
15498 let index = 0;
15499
15500 while (descending ? a >= b : a <= b) {
15501 if (options.toRegex === true && step > 1) {
15502 push(a);
15503 } else {
15504 range.push(pad(format(a, index), maxLen, toNumber));
15505 }
15506 a = descending ? a - step : a + step;
15507 index++;
15508 }
15509
15510 if (options.toRegex === true) {
15511 return step > 1
15512 ? toSequence(parts, options)
15513 : toRegex(range, null, { wrap: false, ...options });
15514 }
15515
15516 return range;
15517};
15518
15519const fillLetters = (start, end, step = 1, options = {}) => {
15520 if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
15521 return invalidRange(start, end, options);
15522 }
15523
15524
15525 let format = options.transform || (val => String.fromCharCode(val));
15526 let a = `${start}`.charCodeAt(0);
15527 let b = `${end}`.charCodeAt(0);
15528
15529 let descending = a > b;
15530 let min = Math.min(a, b);
15531 let max = Math.max(a, b);
15532
15533 if (options.toRegex && step === 1) {
15534 return toRange(min, max, false, options);
15535 }
15536
15537 let range = [];
15538 let index = 0;
15539
15540 while (descending ? a >= b : a <= b) {
15541 range.push(format(a, index));
15542 a = descending ? a - step : a + step;
15543 index++;
15544 }
15545
15546 if (options.toRegex === true) {
15547 return toRegex(range, null, { wrap: false, options });
15548 }
15549
15550 return range;
15551};
15552
15553const fill = (start, end, step, options = {}) => {
15554 if (end == null && isValidValue(start)) {
15555 return [start];
15556 }
15557
15558 if (!isValidValue(start) || !isValidValue(end)) {
15559 return invalidRange(start, end, options);
15560 }
15561
15562 if (typeof step === 'function') {
15563 return fill(start, end, 1, { transform: step });
15564 }
15565
15566 if (isObject(step)) {
15567 return fill(start, end, 0, step);
15568 }
15569
15570 let opts = { ...options };
15571 if (opts.capture === true) opts.wrap = true;
15572 step = step || opts.step || 1;
15573
15574 if (!isNumber(step)) {
15575 if (step != null && !isObject(step)) return invalidStep(step, opts);
15576 return fill(start, end, 1, step);
15577 }
15578
15579 if (isNumber(start) && isNumber(end)) {
15580 return fillNumbers(start, end, step, opts);
15581 }
15582
15583 return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
15584};
15585
15586module.exports = fill;
15587
15588
15589/***/ }),
15590/* 78 */
15591/***/ (function(module, exports, __webpack_require__) {
15592
15593"use strict";
15594/*!
15595 * to-regex-range <https://github.com/micromatch/to-regex-range>
15596 *
15597 * Copyright (c) 2015-present, Jon Schlinkert.
15598 * Released under the MIT License.
15599 */
15600
15601
15602
15603const isNumber = __webpack_require__(79);
15604
15605const toRegexRange = (min, max, options) => {
15606 if (isNumber(min) === false) {
15607 throw new TypeError('toRegexRange: expected the first argument to be a number');
15608 }
15609
15610 if (max === void 0 || min === max) {
15611 return String(min);
15612 }
15613
15614 if (isNumber(max) === false) {
15615 throw new TypeError('toRegexRange: expected the second argument to be a number.');
15616 }
15617
15618 let opts = { relaxZeros: true, ...options };
15619 if (typeof opts.strictZeros === 'boolean') {
15620 opts.relaxZeros = opts.strictZeros === false;
15621 }
15622
15623 let relax = String(opts.relaxZeros);
15624 let shorthand = String(opts.shorthand);
15625 let capture = String(opts.capture);
15626 let wrap = String(opts.wrap);
15627 let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
15628
15629 if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
15630 return toRegexRange.cache[cacheKey].result;
15631 }
15632
15633 let a = Math.min(min, max);
15634 let b = Math.max(min, max);
15635
15636 if (Math.abs(a - b) === 1) {
15637 let result = min + '|' + max;
15638 if (opts.capture) {
15639 return `(${result})`;
15640 }
15641 if (opts.wrap === false) {
15642 return result;
15643 }
15644 return `(?:${result})`;
15645 }
15646
15647 let isPadded = hasPadding(min) || hasPadding(max);
15648 let state = { min, max, a, b };
15649 let positives = [];
15650 let negatives = [];
15651
15652 if (isPadded) {
15653 state.isPadded = isPadded;
15654 state.maxLen = String(state.max).length;
15655 }
15656
15657 if (a < 0) {
15658 let newMin = b < 0 ? Math.abs(b) : 1;
15659 negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
15660 a = state.a = 0;
15661 }
15662
15663 if (b >= 0) {
15664 positives = splitToPatterns(a, b, state, opts);
15665 }
15666
15667 state.negatives = negatives;
15668 state.positives = positives;
15669 state.result = collatePatterns(negatives, positives, opts);
15670
15671 if (opts.capture === true) {
15672 state.result = `(${state.result})`;
15673 } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
15674 state.result = `(?:${state.result})`;
15675 }
15676
15677 toRegexRange.cache[cacheKey] = state;
15678 return state.result;
15679};
15680
15681function collatePatterns(neg, pos, options) {
15682 let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
15683 let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
15684 let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
15685 let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
15686 return subpatterns.join('|');
15687}
15688
15689function splitToRanges(min, max) {
15690 let nines = 1;
15691 let zeros = 1;
15692
15693 let stop = countNines(min, nines);
15694 let stops = new Set([max]);
15695
15696 while (min <= stop && stop <= max) {
15697 stops.add(stop);
15698 nines += 1;
15699 stop = countNines(min, nines);
15700 }
15701
15702 stop = countZeros(max + 1, zeros) - 1;
15703
15704 while (min < stop && stop <= max) {
15705 stops.add(stop);
15706 zeros += 1;
15707 stop = countZeros(max + 1, zeros) - 1;
15708 }
15709
15710 stops = [...stops];
15711 stops.sort(compare);
15712 return stops;
15713}
15714
15715/**
15716 * Convert a range to a regex pattern
15717 * @param {Number} `start`
15718 * @param {Number} `stop`
15719 * @return {String}
15720 */
15721
15722function rangeToPattern(start, stop, options) {
15723 if (start === stop) {
15724 return { pattern: start, count: [], digits: 0 };
15725 }
15726
15727 let zipped = zip(start, stop);
15728 let digits = zipped.length;
15729 let pattern = '';
15730 let count = 0;
15731
15732 for (let i = 0; i < digits; i++) {
15733 let [startDigit, stopDigit] = zipped[i];
15734
15735 if (startDigit === stopDigit) {
15736 pattern += startDigit;
15737
15738 } else if (startDigit !== '0' || stopDigit !== '9') {
15739 pattern += toCharacterClass(startDigit, stopDigit, options);
15740
15741 } else {
15742 count++;
15743 }
15744 }
15745
15746 if (count) {
15747 pattern += options.shorthand === true ? '\\d' : '[0-9]';
15748 }
15749
15750 return { pattern, count: [count], digits };
15751}
15752
15753function splitToPatterns(min, max, tok, options) {
15754 let ranges = splitToRanges(min, max);
15755 let tokens = [];
15756 let start = min;
15757 let prev;
15758
15759 for (let i = 0; i < ranges.length; i++) {
15760 let max = ranges[i];
15761 let obj = rangeToPattern(String(start), String(max), options);
15762 let zeros = '';
15763
15764 if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
15765 if (prev.count.length > 1) {
15766 prev.count.pop();
15767 }
15768
15769 prev.count.push(obj.count[0]);
15770 prev.string = prev.pattern + toQuantifier(prev.count);
15771 start = max + 1;
15772 continue;
15773 }
15774
15775 if (tok.isPadded) {
15776 zeros = padZeros(max, tok, options);
15777 }
15778
15779 obj.string = zeros + obj.pattern + toQuantifier(obj.count);
15780 tokens.push(obj);
15781 start = max + 1;
15782 prev = obj;
15783 }
15784
15785 return tokens;
15786}
15787
15788function filterPatterns(arr, comparison, prefix, intersection, options) {
15789 let result = [];
15790
15791 for (let ele of arr) {
15792 let { string } = ele;
15793
15794 // only push if _both_ are negative...
15795 if (!intersection && !contains(comparison, 'string', string)) {
15796 result.push(prefix + string);
15797 }
15798
15799 // or _both_ are positive
15800 if (intersection && contains(comparison, 'string', string)) {
15801 result.push(prefix + string);
15802 }
15803 }
15804 return result;
15805}
15806
15807/**
15808 * Zip strings
15809 */
15810
15811function zip(a, b) {
15812 let arr = [];
15813 for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
15814 return arr;
15815}
15816
15817function compare(a, b) {
15818 return a > b ? 1 : b > a ? -1 : 0;
15819}
15820
15821function contains(arr, key, val) {
15822 return arr.some(ele => ele[key] === val);
15823}
15824
15825function countNines(min, len) {
15826 return Number(String(min).slice(0, -len) + '9'.repeat(len));
15827}
15828
15829function countZeros(integer, zeros) {
15830 return integer - (integer % Math.pow(10, zeros));
15831}
15832
15833function toQuantifier(digits) {
15834 let [start = 0, stop = ''] = digits;
15835 if (stop || start > 1) {
15836 return `{${start + (stop ? ',' + stop : '')}}`;
15837 }
15838 return '';
15839}
15840
15841function toCharacterClass(a, b, options) {
15842 return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
15843}
15844
15845function hasPadding(str) {
15846 return /^-?(0+)\d/.test(str);
15847}
15848
15849function padZeros(value, tok, options) {
15850 if (!tok.isPadded) {
15851 return value;
15852 }
15853
15854 let diff = Math.abs(tok.maxLen - String(value).length);
15855 let relax = options.relaxZeros !== false;
15856
15857 switch (diff) {
15858 case 0:
15859 return '';
15860 case 1:
15861 return relax ? '0?' : '0';
15862 case 2:
15863 return relax ? '0{0,2}' : '00';
15864 default: {
15865 return relax ? `0{0,${diff}}` : `0{${diff}}`;
15866 }
15867 }
15868}
15869
15870/**
15871 * Cache
15872 */
15873
15874toRegexRange.cache = {};
15875toRegexRange.clearCache = () => (toRegexRange.cache = {});
15876
15877/**
15878 * Expose `toRegexRange`
15879 */
15880
15881module.exports = toRegexRange;
15882
15883
15884/***/ }),
15885/* 79 */
15886/***/ (function(module, exports, __webpack_require__) {
15887
15888"use strict";
15889/*!
15890 * is-number <https://github.com/jonschlinkert/is-number>
15891 *
15892 * Copyright (c) 2014-present, Jon Schlinkert.
15893 * Released under the MIT License.
15894 */
15895
15896
15897
15898module.exports = function(num) {
15899 if (typeof num === 'number') {
15900 return num - num === 0;
15901 }
15902 if (typeof num === 'string' && num.trim() !== '') {
15903 return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
15904 }
15905 return false;
15906};
15907
15908
15909/***/ }),
15910/* 80 */
15911/***/ (function(module, exports, __webpack_require__) {
15912
15913"use strict";
15914
15915
15916const fill = __webpack_require__(77);
15917const stringify = __webpack_require__(74);
15918const utils = __webpack_require__(75);
15919
15920const append = (queue = '', stash = '', enclose = false) => {
15921 let result = [];
15922
15923 queue = [].concat(queue);
15924 stash = [].concat(stash);
15925
15926 if (!stash.length) return queue;
15927 if (!queue.length) {
15928 return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
15929 }
15930
15931 for (let item of queue) {
15932 if (Array.isArray(item)) {
15933 for (let value of item) {
15934 result.push(append(value, stash, enclose));
15935 }
15936 } else {
15937 for (let ele of stash) {
15938 if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
15939 result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));
15940 }
15941 }
15942 }
15943 return utils.flatten(result);
15944};
15945
15946const expand = (ast, options = {}) => {
15947 let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
15948
15949 let walk = (node, parent = {}) => {
15950 node.queue = [];
15951
15952 let p = parent;
15953 let q = parent.queue;
15954
15955 while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
15956 p = p.parent;
15957 q = p.queue;
15958 }
15959
15960 if (node.invalid || node.dollar) {
15961 q.push(append(q.pop(), stringify(node, options)));
15962 return;
15963 }
15964
15965 if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
15966 q.push(append(q.pop(), ['{}']));
15967 return;
15968 }
15969
15970 if (node.nodes && node.ranges > 0) {
15971 let args = utils.reduce(node.nodes);
15972
15973 if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
15974 throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
15975 }
15976
15977 let range = fill(...args, options);
15978 if (range.length === 0) {
15979 range = stringify(node, options);
15980 }
15981
15982 q.push(append(q.pop(), range));
15983 node.nodes = [];
15984 return;
15985 }
15986
15987 let enclose = utils.encloseBrace(node);
15988 let queue = node.queue;
15989 let block = node;
15990
15991 while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
15992 block = block.parent;
15993 queue = block.queue;
15994 }
15995
15996 for (let i = 0; i < node.nodes.length; i++) {
15997 let child = node.nodes[i];
15998
15999 if (child.type === 'comma' && node.type === 'brace') {
16000 if (i === 1) queue.push('');
16001 queue.push('');
16002 continue;
16003 }
16004
16005 if (child.type === 'close') {
16006 q.push(append(q.pop(), queue, enclose));
16007 continue;
16008 }
16009
16010 if (child.value && child.type !== 'open') {
16011 queue.push(append(queue.pop(), child.value));
16012 continue;
16013 }
16014
16015 if (child.nodes) {
16016 walk(child, node);
16017 }
16018 }
16019
16020 return queue;
16021 };
16022
16023 return utils.flatten(walk(ast));
16024};
16025
16026module.exports = expand;
16027
16028
16029/***/ }),
16030/* 81 */
16031/***/ (function(module, exports, __webpack_require__) {
16032
16033"use strict";
16034
16035
16036const stringify = __webpack_require__(74);
16037
16038/**
16039 * Constants
16040 */
16041
16042const {
16043 MAX_LENGTH,
16044 CHAR_BACKSLASH, /* \ */
16045 CHAR_BACKTICK, /* ` */
16046 CHAR_COMMA, /* , */
16047 CHAR_DOT, /* . */
16048 CHAR_LEFT_PARENTHESES, /* ( */
16049 CHAR_RIGHT_PARENTHESES, /* ) */
16050 CHAR_LEFT_CURLY_BRACE, /* { */
16051 CHAR_RIGHT_CURLY_BRACE, /* } */
16052 CHAR_LEFT_SQUARE_BRACKET, /* [ */
16053 CHAR_RIGHT_SQUARE_BRACKET, /* ] */
16054 CHAR_DOUBLE_QUOTE, /* " */
16055 CHAR_SINGLE_QUOTE, /* ' */
16056 CHAR_NO_BREAK_SPACE,
16057 CHAR_ZERO_WIDTH_NOBREAK_SPACE
16058} = __webpack_require__(82);
16059
16060/**
16061 * parse
16062 */
16063
16064const parse = (input, options = {}) => {
16065 if (typeof input !== 'string') {
16066 throw new TypeError('Expected a string');
16067 }
16068
16069 let opts = options || {};
16070 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
16071 if (input.length > max) {
16072 throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
16073 }
16074
16075 let ast = { type: 'root', input, nodes: [] };
16076 let stack = [ast];
16077 let block = ast;
16078 let prev = ast;
16079 let brackets = 0;
16080 let length = input.length;
16081 let index = 0;
16082 let depth = 0;
16083 let value;
16084 let memo = {};
16085
16086 /**
16087 * Helpers
16088 */
16089
16090 const advance = () => input[index++];
16091 const push = node => {
16092 if (node.type === 'text' && prev.type === 'dot') {
16093 prev.type = 'text';
16094 }
16095
16096 if (prev && prev.type === 'text' && node.type === 'text') {
16097 prev.value += node.value;
16098 return;
16099 }
16100
16101 block.nodes.push(node);
16102 node.parent = block;
16103 node.prev = prev;
16104 prev = node;
16105 return node;
16106 };
16107
16108 push({ type: 'bos' });
16109
16110 while (index < length) {
16111 block = stack[stack.length - 1];
16112 value = advance();
16113
16114 /**
16115 * Invalid chars
16116 */
16117
16118 if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
16119 continue;
16120 }
16121
16122 /**
16123 * Escaped chars
16124 */
16125
16126 if (value === CHAR_BACKSLASH) {
16127 push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
16128 continue;
16129 }
16130
16131 /**
16132 * Right square bracket (literal): ']'
16133 */
16134
16135 if (value === CHAR_RIGHT_SQUARE_BRACKET) {
16136 push({ type: 'text', value: '\\' + value });
16137 continue;
16138 }
16139
16140 /**
16141 * Left square bracket: '['
16142 */
16143
16144 if (value === CHAR_LEFT_SQUARE_BRACKET) {
16145 brackets++;
16146
16147 let closed = true;
16148 let next;
16149
16150 while (index < length && (next = advance())) {
16151 value += next;
16152
16153 if (next === CHAR_LEFT_SQUARE_BRACKET) {
16154 brackets++;
16155 continue;
16156 }
16157
16158 if (next === CHAR_BACKSLASH) {
16159 value += advance();
16160 continue;
16161 }
16162
16163 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
16164 brackets--;
16165
16166 if (brackets === 0) {
16167 break;
16168 }
16169 }
16170 }
16171
16172 push({ type: 'text', value });
16173 continue;
16174 }
16175
16176 /**
16177 * Parentheses
16178 */
16179
16180 if (value === CHAR_LEFT_PARENTHESES) {
16181 block = push({ type: 'paren', nodes: [] });
16182 stack.push(block);
16183 push({ type: 'text', value });
16184 continue;
16185 }
16186
16187 if (value === CHAR_RIGHT_PARENTHESES) {
16188 if (block.type !== 'paren') {
16189 push({ type: 'text', value });
16190 continue;
16191 }
16192 block = stack.pop();
16193 push({ type: 'text', value });
16194 block = stack[stack.length - 1];
16195 continue;
16196 }
16197
16198 /**
16199 * Quotes: '|"|`
16200 */
16201
16202 if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
16203 let open = value;
16204 let next;
16205
16206 if (options.keepQuotes !== true) {
16207 value = '';
16208 }
16209
16210 while (index < length && (next = advance())) {
16211 if (next === CHAR_BACKSLASH) {
16212 value += next + advance();
16213 continue;
16214 }
16215
16216 if (next === open) {
16217 if (options.keepQuotes === true) value += next;
16218 break;
16219 }
16220
16221 value += next;
16222 }
16223
16224 push({ type: 'text', value });
16225 continue;
16226 }
16227
16228 /**
16229 * Left curly brace: '{'
16230 */
16231
16232 if (value === CHAR_LEFT_CURLY_BRACE) {
16233 depth++;
16234
16235 let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
16236 let brace = {
16237 type: 'brace',
16238 open: true,
16239 close: false,
16240 dollar,
16241 depth,
16242 commas: 0,
16243 ranges: 0,
16244 nodes: []
16245 };
16246
16247 block = push(brace);
16248 stack.push(block);
16249 push({ type: 'open', value });
16250 continue;
16251 }
16252
16253 /**
16254 * Right curly brace: '}'
16255 */
16256
16257 if (value === CHAR_RIGHT_CURLY_BRACE) {
16258 if (block.type !== 'brace') {
16259 push({ type: 'text', value });
16260 continue;
16261 }
16262
16263 let type = 'close';
16264 block = stack.pop();
16265 block.close = true;
16266
16267 push({ type, value });
16268 depth--;
16269
16270 block = stack[stack.length - 1];
16271 continue;
16272 }
16273
16274 /**
16275 * Comma: ','
16276 */
16277
16278 if (value === CHAR_COMMA && depth > 0) {
16279 if (block.ranges > 0) {
16280 block.ranges = 0;
16281 let open = block.nodes.shift();
16282 block.nodes = [open, { type: 'text', value: stringify(block) }];
16283 }
16284
16285 push({ type: 'comma', value });
16286 block.commas++;
16287 continue;
16288 }
16289
16290 /**
16291 * Dot: '.'
16292 */
16293
16294 if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
16295 let siblings = block.nodes;
16296
16297 if (depth === 0 || siblings.length === 0) {
16298 push({ type: 'text', value });
16299 continue;
16300 }
16301
16302 if (prev.type === 'dot') {
16303 block.range = [];
16304 prev.value += value;
16305 prev.type = 'range';
16306
16307 if (block.nodes.length !== 3 && block.nodes.length !== 5) {
16308 block.invalid = true;
16309 block.ranges = 0;
16310 prev.type = 'text';
16311 continue;
16312 }
16313
16314 block.ranges++;
16315 block.args = [];
16316 continue;
16317 }
16318
16319 if (prev.type === 'range') {
16320 siblings.pop();
16321
16322 let before = siblings[siblings.length - 1];
16323 before.value += prev.value + value;
16324 prev = before;
16325 block.ranges--;
16326 continue;
16327 }
16328
16329 push({ type: 'dot', value });
16330 continue;
16331 }
16332
16333 /**
16334 * Text
16335 */
16336
16337 push({ type: 'text', value });
16338 }
16339
16340 // Mark imbalanced braces and brackets as invalid
16341 do {
16342 block = stack.pop();
16343
16344 if (block.type !== 'root') {
16345 block.nodes.forEach(node => {
16346 if (!node.nodes) {
16347 if (node.type === 'open') node.isOpen = true;
16348 if (node.type === 'close') node.isClose = true;
16349 if (!node.nodes) node.type = 'text';
16350 node.invalid = true;
16351 }
16352 });
16353
16354 // get the location of the block on parent.nodes (block's siblings)
16355 let parent = stack[stack.length - 1];
16356 let index = parent.nodes.indexOf(block);
16357 // replace the (invalid) block with it's nodes
16358 parent.nodes.splice(index, 1, ...block.nodes);
16359 }
16360 } while (stack.length > 0);
16361
16362 push({ type: 'eos' });
16363 return ast;
16364};
16365
16366module.exports = parse;
16367
16368
16369/***/ }),
16370/* 82 */
16371/***/ (function(module, exports, __webpack_require__) {
16372
16373"use strict";
16374
16375
16376module.exports = {
16377 MAX_LENGTH: 1024 * 64,
16378
16379 // Digits
16380 CHAR_0: '0', /* 0 */
16381 CHAR_9: '9', /* 9 */
16382
16383 // Alphabet chars.
16384 CHAR_UPPERCASE_A: 'A', /* A */
16385 CHAR_LOWERCASE_A: 'a', /* a */
16386 CHAR_UPPERCASE_Z: 'Z', /* Z */
16387 CHAR_LOWERCASE_Z: 'z', /* z */
16388
16389 CHAR_LEFT_PARENTHESES: '(', /* ( */
16390 CHAR_RIGHT_PARENTHESES: ')', /* ) */
16391
16392 CHAR_ASTERISK: '*', /* * */
16393
16394 // Non-alphabetic chars.
16395 CHAR_AMPERSAND: '&', /* & */
16396 CHAR_AT: '@', /* @ */
16397 CHAR_BACKSLASH: '\\', /* \ */
16398 CHAR_BACKTICK: '`', /* ` */
16399 CHAR_CARRIAGE_RETURN: '\r', /* \r */
16400 CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
16401 CHAR_COLON: ':', /* : */
16402 CHAR_COMMA: ',', /* , */
16403 CHAR_DOLLAR: '$', /* . */
16404 CHAR_DOT: '.', /* . */
16405 CHAR_DOUBLE_QUOTE: '"', /* " */
16406 CHAR_EQUAL: '=', /* = */
16407 CHAR_EXCLAMATION_MARK: '!', /* ! */
16408 CHAR_FORM_FEED: '\f', /* \f */
16409 CHAR_FORWARD_SLASH: '/', /* / */
16410 CHAR_HASH: '#', /* # */
16411 CHAR_HYPHEN_MINUS: '-', /* - */
16412 CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
16413 CHAR_LEFT_CURLY_BRACE: '{', /* { */
16414 CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
16415 CHAR_LINE_FEED: '\n', /* \n */
16416 CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
16417 CHAR_PERCENT: '%', /* % */
16418 CHAR_PLUS: '+', /* + */
16419 CHAR_QUESTION_MARK: '?', /* ? */
16420 CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
16421 CHAR_RIGHT_CURLY_BRACE: '}', /* } */
16422 CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
16423 CHAR_SEMICOLON: ';', /* ; */
16424 CHAR_SINGLE_QUOTE: '\'', /* ' */
16425 CHAR_SPACE: ' ', /* */
16426 CHAR_TAB: '\t', /* \t */
16427 CHAR_UNDERSCORE: '_', /* _ */
16428 CHAR_VERTICAL_LINE: '|', /* | */
16429 CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
16430};
16431
16432
16433/***/ }),
16434/* 83 */
16435/***/ (function(module, exports, __webpack_require__) {
16436
16437"use strict";
16438
16439
16440module.exports = __webpack_require__(84);
16441
16442
16443/***/ }),
16444/* 84 */
16445/***/ (function(module, exports, __webpack_require__) {
16446
16447"use strict";
16448
16449
16450const path = __webpack_require__(13);
16451const scan = __webpack_require__(85);
16452const parse = __webpack_require__(88);
16453const utils = __webpack_require__(86);
16454
16455/**
16456 * Creates a matcher function from one or more glob patterns. The
16457 * returned function takes a string to match as its first argument,
16458 * and returns true if the string is a match. The returned matcher
16459 * function also takes a boolean as the second argument that, when true,
16460 * returns an object with additional information.
16461 *
16462 * ```js
16463 * const picomatch = require('picomatch');
16464 * // picomatch(glob[, options]);
16465 *
16466 * const isMatch = picomatch('*.!(*a)');
16467 * console.log(isMatch('a.a')); //=> false
16468 * console.log(isMatch('a.b')); //=> true
16469 * ```
16470 * @name picomatch
16471 * @param {String|Array} `globs` One or more glob patterns.
16472 * @param {Object=} `options`
16473 * @return {Function=} Returns a matcher function.
16474 * @api public
16475 */
16476
16477const picomatch = (glob, options, returnState = false) => {
16478 if (Array.isArray(glob)) {
16479 let fns = glob.map(input => picomatch(input, options, returnState));
16480 return str => {
16481 for (let isMatch of fns) {
16482 let state = isMatch(str);
16483 if (state) return state;
16484 }
16485 return false;
16486 };
16487 }
16488
16489 if (typeof glob !== 'string' || glob === '') {
16490 throw new TypeError('Expected pattern to be a non-empty string');
16491 }
16492
16493 let opts = options || {};
16494 let posix = utils.isWindows(options);
16495 let regex = picomatch.makeRe(glob, options, false, true);
16496 let state = regex.state;
16497 delete regex.state;
16498
16499 let isIgnored = () => false;
16500 if (opts.ignore) {
16501 let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
16502 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
16503 }
16504
16505 const matcher = (input, returnObject = false) => {
16506 let { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
16507 let result = { glob, state, regex, posix, input, output, match, isMatch };
16508
16509 if (typeof opts.onResult === 'function') {
16510 opts.onResult(result);
16511 }
16512
16513 if (isMatch === false) {
16514 result.isMatch = false;
16515 return returnObject ? result : false;
16516 }
16517
16518 if (isIgnored(input)) {
16519 if (typeof opts.onIgnore === 'function') {
16520 opts.onIgnore(result);
16521 }
16522 result.isMatch = false;
16523 return returnObject ? result : false;
16524 }
16525
16526 if (typeof opts.onMatch === 'function') {
16527 opts.onMatch(result);
16528 }
16529 return returnObject ? result : true;
16530 };
16531
16532 if (returnState) {
16533 matcher.state = state;
16534 }
16535
16536 return matcher;
16537};
16538
16539/**
16540 * Test `input` with the given `regex`. This is used by the main
16541 * `picomatch()` function to test the input string.
16542 *
16543 * ```js
16544 * const picomatch = require('picomatch');
16545 * // picomatch.test(input, regex[, options]);
16546 *
16547 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
16548 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
16549 * ```
16550 * @param {String} `input` String to test.
16551 * @param {RegExp} `regex`
16552 * @return {Object} Returns an object with matching info.
16553 * @api public
16554 */
16555
16556picomatch.test = (input, regex, options, { glob, posix } = {}) => {
16557 if (typeof input !== 'string') {
16558 throw new TypeError('Expected input to be a string');
16559 }
16560
16561 if (input === '') {
16562 return { isMatch: false, output: '' };
16563 }
16564
16565 let opts = options || {};
16566 let format = opts.format || (posix ? utils.toPosixSlashes : null);
16567 let match = input === glob;
16568 let output = (match && format) ? format(input) : input;
16569
16570 if (match === false) {
16571 output = format ? format(input) : input;
16572 match = output === glob;
16573 }
16574
16575 if (match === false || opts.capture === true) {
16576 if (opts.matchBase === true || opts.basename === true) {
16577 match = picomatch.matchBase(input, regex, options, posix);
16578 } else {
16579 match = regex.exec(output);
16580 }
16581 }
16582
16583 return { isMatch: !!match, match, output };
16584};
16585
16586/**
16587 * Match the basename of a filepath.
16588 *
16589 * ```js
16590 * const picomatch = require('picomatch');
16591 * // picomatch.matchBase(input, glob[, options]);
16592 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
16593 * ```
16594 * @param {String} `input` String to test.
16595 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
16596 * @return {Boolean}
16597 * @api public
16598 */
16599
16600picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
16601 let regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
16602 return regex.test(path.basename(input));
16603};
16604
16605/**
16606 * Returns true if **any** of the given glob `patterns` match the specified `string`.
16607 *
16608 * ```js
16609 * const picomatch = require('picomatch');
16610 * // picomatch.isMatch(string, patterns[, options]);
16611 *
16612 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
16613 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
16614 * ```
16615 * @param {String|Array} str The string to test.
16616 * @param {String|Array} patterns One or more glob patterns to use for matching.
16617 * @param {Object} [options] See available [options](#options).
16618 * @return {Boolean} Returns true if any patterns match `str`
16619 * @api public
16620 */
16621
16622picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
16623
16624/**
16625 * Parse a glob pattern to create the source string for a regular
16626 * expression.
16627 *
16628 * ```js
16629 * const picomatch = require('picomatch');
16630 * const result = picomatch.parse(glob[, options]);
16631 * ```
16632 * @param {String} `glob`
16633 * @param {Object} `options`
16634 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
16635 * @api public
16636 */
16637
16638picomatch.parse = (glob, options) => parse(glob, options);
16639
16640/**
16641 * Scan a glob pattern to separate the pattern into segments.
16642 *
16643 * ```js
16644 * const picomatch = require('picomatch');
16645 * // picomatch.scan(input[, options]);
16646 *
16647 * const result = picomatch.scan('!./foo/*.js');
16648 * console.log(result);
16649 * // { prefix: '!./',
16650 * // input: '!./foo/*.js',
16651 * // base: 'foo',
16652 * // glob: '*.js',
16653 * // negated: true,
16654 * // isGlob: true }
16655 * ```
16656 * @param {String} `input` Glob pattern to scan.
16657 * @param {Object} `options`
16658 * @return {Object} Returns an object with
16659 * @api public
16660 */
16661
16662picomatch.scan = (input, options) => scan(input, options);
16663
16664/**
16665 * Create a regular expression from a glob pattern.
16666 *
16667 * ```js
16668 * const picomatch = require('picomatch');
16669 * // picomatch.makeRe(input[, options]);
16670 *
16671 * console.log(picomatch.makeRe('*.js'));
16672 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
16673 * ```
16674 * @param {String} `input` A glob pattern to convert to regex.
16675 * @param {Object} `options`
16676 * @return {RegExp} Returns a regex created from the given pattern.
16677 * @api public
16678 */
16679
16680picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
16681 if (!input || typeof input !== 'string') {
16682 throw new TypeError('Expected a non-empty string');
16683 }
16684
16685 let opts = options || {};
16686 let prepend = opts.contains ? '' : '^';
16687 let append = opts.contains ? '' : '$';
16688 let state = { negated: false, fastpaths: true };
16689 let prefix = '';
16690 let output;
16691
16692 if (input.startsWith('./')) {
16693 input = input.slice(2);
16694 prefix = state.prefix = './';
16695 }
16696
16697 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
16698 output = parse.fastpaths(input, options);
16699 }
16700
16701 if (output === void 0) {
16702 state = picomatch.parse(input, options);
16703 state.prefix = prefix + (state.prefix || '');
16704 output = state.output;
16705 }
16706
16707 if (returnOutput === true) {
16708 return output;
16709 }
16710
16711 let source = `${prepend}(?:${output})${append}`;
16712 if (state && state.negated === true) {
16713 source = `^(?!${source}).*$`;
16714 }
16715
16716 let regex = picomatch.toRegex(source, options);
16717 if (returnState === true) {
16718 regex.state = state;
16719 }
16720
16721 return regex;
16722};
16723
16724/**
16725 * Create a regular expression from the given regex source string.
16726 *
16727 * ```js
16728 * const picomatch = require('picomatch');
16729 * // picomatch.toRegex(source[, options]);
16730 *
16731 * const { output } = picomatch.parse('*.js');
16732 * console.log(picomatch.toRegex(output));
16733 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
16734 * ```
16735 * @param {String} `source` Regular expression source string.
16736 * @param {Object} `options`
16737 * @return {RegExp}
16738 * @api public
16739 */
16740
16741picomatch.toRegex = (source, options) => {
16742 try {
16743 let opts = options || {};
16744 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
16745 } catch (err) {
16746 if (options && options.debug === true) throw err;
16747 return /$^/;
16748 }
16749};
16750
16751/**
16752 * Picomatch constants.
16753 * @return {Object}
16754 */
16755
16756picomatch.constants = __webpack_require__(87);
16757
16758/**
16759 * Expose "picomatch"
16760 */
16761
16762module.exports = picomatch;
16763
16764
16765/***/ }),
16766/* 85 */
16767/***/ (function(module, exports, __webpack_require__) {
16768
16769"use strict";
16770
16771
16772const utils = __webpack_require__(86);
16773
16774const {
16775 CHAR_ASTERISK, /* * */
16776 CHAR_AT, /* @ */
16777 CHAR_BACKWARD_SLASH, /* \ */
16778 CHAR_COMMA, /* , */
16779 CHAR_DOT, /* . */
16780 CHAR_EXCLAMATION_MARK, /* ! */
16781 CHAR_FORWARD_SLASH, /* / */
16782 CHAR_LEFT_CURLY_BRACE, /* { */
16783 CHAR_LEFT_PARENTHESES, /* ( */
16784 CHAR_LEFT_SQUARE_BRACKET, /* [ */
16785 CHAR_PLUS, /* + */
16786 CHAR_QUESTION_MARK, /* ? */
16787 CHAR_RIGHT_CURLY_BRACE, /* } */
16788 CHAR_RIGHT_PARENTHESES, /* ) */
16789 CHAR_RIGHT_SQUARE_BRACKET /* ] */
16790} = __webpack_require__(87);
16791
16792const isPathSeparator = code => {
16793 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
16794};
16795
16796/**
16797 * Quickly scans a glob pattern and returns an object with a handful of
16798 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
16799 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
16800 *
16801 * ```js
16802 * const pm = require('picomatch');
16803 * console.log(pm.scan('foo/bar/*.js'));
16804 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
16805 * ```
16806 * @param {String} `str`
16807 * @param {Object} `options`
16808 * @return {Object} Returns an object with tokens and regex source string.
16809 * @api public
16810 */
16811
16812module.exports = (input, options) => {
16813 let opts = options || {};
16814 let length = input.length - 1;
16815 let index = -1;
16816 let start = 0;
16817 let lastIndex = 0;
16818 let isGlob = false;
16819 let backslashes = false;
16820 let negated = false;
16821 let braces = 0;
16822 let prev;
16823 let code;
16824
16825 let braceEscaped = false;
16826
16827 let eos = () => index >= length;
16828 let advance = () => {
16829 prev = code;
16830 return input.charCodeAt(++index);
16831 };
16832
16833 while (index < length) {
16834 code = advance();
16835 let next;
16836
16837 if (code === CHAR_BACKWARD_SLASH) {
16838 backslashes = true;
16839 next = advance();
16840
16841 if (next === CHAR_LEFT_CURLY_BRACE) {
16842 braceEscaped = true;
16843 }
16844 continue;
16845 }
16846
16847 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
16848 braces++;
16849
16850 while (!eos() && (next = advance())) {
16851 if (next === CHAR_BACKWARD_SLASH) {
16852 backslashes = true;
16853 next = advance();
16854 continue;
16855 }
16856
16857 if (next === CHAR_LEFT_CURLY_BRACE) {
16858 braces++;
16859 continue;
16860 }
16861
16862 if (!braceEscaped && next === CHAR_DOT && (next = advance()) === CHAR_DOT) {
16863 isGlob = true;
16864 break;
16865 }
16866
16867 if (!braceEscaped && next === CHAR_COMMA) {
16868 isGlob = true;
16869 break;
16870 }
16871
16872 if (next === CHAR_RIGHT_CURLY_BRACE) {
16873 braces--;
16874 if (braces === 0) {
16875 braceEscaped = false;
16876 break;
16877 }
16878 }
16879 }
16880 }
16881
16882 if (code === CHAR_FORWARD_SLASH) {
16883 if (prev === CHAR_DOT && index === (start + 1)) {
16884 start += 2;
16885 continue;
16886 }
16887
16888 lastIndex = index + 1;
16889 continue;
16890 }
16891
16892 if (code === CHAR_ASTERISK) {
16893 isGlob = true;
16894 break;
16895 }
16896
16897 if (code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK) {
16898 isGlob = true;
16899 break;
16900 }
16901
16902 if (code === CHAR_LEFT_SQUARE_BRACKET) {
16903 while (!eos() && (next = advance())) {
16904 if (next === CHAR_BACKWARD_SLASH) {
16905 backslashes = true;
16906 next = advance();
16907 continue;
16908 }
16909
16910 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
16911 isGlob = true;
16912 break;
16913 }
16914 }
16915 }
16916
16917 let isExtglobChar = code === CHAR_PLUS
16918 || code === CHAR_AT
16919 || code === CHAR_EXCLAMATION_MARK;
16920
16921 if (isExtglobChar && input.charCodeAt(index + 1) === CHAR_LEFT_PARENTHESES) {
16922 isGlob = true;
16923 break;
16924 }
16925
16926 if (code === CHAR_EXCLAMATION_MARK && index === start) {
16927 negated = true;
16928 start++;
16929 continue;
16930 }
16931
16932 if (code === CHAR_LEFT_PARENTHESES) {
16933 while (!eos() && (next = advance())) {
16934 if (next === CHAR_BACKWARD_SLASH) {
16935 backslashes = true;
16936 next = advance();
16937 continue;
16938 }
16939
16940 if (next === CHAR_RIGHT_PARENTHESES) {
16941 isGlob = true;
16942 break;
16943 }
16944 }
16945 }
16946
16947 if (isGlob) {
16948 break;
16949 }
16950 }
16951
16952 let prefix = '';
16953 let orig = input;
16954 let base = input;
16955 let glob = '';
16956
16957 if (start > 0) {
16958 prefix = input.slice(0, start);
16959 input = input.slice(start);
16960 lastIndex -= start;
16961 }
16962
16963 if (base && isGlob === true && lastIndex > 0) {
16964 base = input.slice(0, lastIndex);
16965 glob = input.slice(lastIndex);
16966 } else if (isGlob === true) {
16967 base = '';
16968 glob = input;
16969 } else {
16970 base = input;
16971 }
16972
16973 if (base && base !== '' && base !== '/' && base !== input) {
16974 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
16975 base = base.slice(0, -1);
16976 }
16977 }
16978
16979 if (opts.unescape === true) {
16980 if (glob) glob = utils.removeBackslashes(glob);
16981
16982 if (base && backslashes === true) {
16983 base = utils.removeBackslashes(base);
16984 }
16985 }
16986
16987 return { prefix, input: orig, base, glob, negated, isGlob };
16988};
16989
16990
16991/***/ }),
16992/* 86 */
16993/***/ (function(module, exports, __webpack_require__) {
16994
16995"use strict";
16996
16997
16998const path = __webpack_require__(13);
16999const win32 = process.platform === 'win32';
17000const {
17001 REGEX_SPECIAL_CHARS,
17002 REGEX_SPECIAL_CHARS_GLOBAL,
17003 REGEX_REMOVE_BACKSLASH
17004} = __webpack_require__(87);
17005
17006exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
17007exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
17008exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
17009exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
17010exports.toPosixSlashes = str => str.replace(/\\/g, '/');
17011
17012exports.removeBackslashes = str => {
17013 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
17014 return match === '\\' ? '' : match;
17015 });
17016}
17017
17018exports.supportsLookbehinds = () => {
17019 let segs = process.version.slice(1).split('.');
17020 if (segs.length === 3 && +segs[0] >= 9 || (+segs[0] === 8 && +segs[1] >= 10)) {
17021 return true;
17022 }
17023 return false;
17024};
17025
17026exports.isWindows = options => {
17027 if (options && typeof options.windows === 'boolean') {
17028 return options.windows;
17029 }
17030 return win32 === true || path.sep === '\\';
17031};
17032
17033exports.escapeLast = (input, char, lastIdx) => {
17034 let idx = input.lastIndexOf(char, lastIdx);
17035 if (idx === -1) return input;
17036 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
17037 return input.slice(0, idx) + '\\' + input.slice(idx);
17038};
17039
17040
17041/***/ }),
17042/* 87 */
17043/***/ (function(module, exports, __webpack_require__) {
17044
17045"use strict";
17046
17047
17048const path = __webpack_require__(13);
17049const WIN_SLASH = '\\\\/';
17050const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
17051
17052/**
17053 * Posix glob regex
17054 */
17055
17056const DOT_LITERAL = '\\.';
17057const PLUS_LITERAL = '\\+';
17058const QMARK_LITERAL = '\\?';
17059const SLASH_LITERAL = '\\/';
17060const ONE_CHAR = '(?=.)';
17061const QMARK = '[^/]';
17062const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
17063const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
17064const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
17065const NO_DOT = `(?!${DOT_LITERAL})`;
17066const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
17067const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
17068const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
17069const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
17070const STAR = `${QMARK}*?`;
17071
17072const POSIX_CHARS = {
17073 DOT_LITERAL,
17074 PLUS_LITERAL,
17075 QMARK_LITERAL,
17076 SLASH_LITERAL,
17077 ONE_CHAR,
17078 QMARK,
17079 END_ANCHOR,
17080 DOTS_SLASH,
17081 NO_DOT,
17082 NO_DOTS,
17083 NO_DOT_SLASH,
17084 NO_DOTS_SLASH,
17085 QMARK_NO_DOT,
17086 STAR,
17087 START_ANCHOR
17088};
17089
17090/**
17091 * Windows glob regex
17092 */
17093
17094const WINDOWS_CHARS = {
17095 ...POSIX_CHARS,
17096
17097 SLASH_LITERAL: `[${WIN_SLASH}]`,
17098 QMARK: WIN_NO_SLASH,
17099 STAR: `${WIN_NO_SLASH}*?`,
17100 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
17101 NO_DOT: `(?!${DOT_LITERAL})`,
17102 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
17103 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
17104 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
17105 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
17106 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
17107 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
17108};
17109
17110/**
17111 * POSIX Bracket Regex
17112 */
17113
17114const POSIX_REGEX_SOURCE = {
17115 alnum: 'a-zA-Z0-9',
17116 alpha: 'a-zA-Z',
17117 ascii: '\\x00-\\x7F',
17118 blank: ' \\t',
17119 cntrl: '\\x00-\\x1F\\x7F',
17120 digit: '0-9',
17121 graph: '\\x21-\\x7E',
17122 lower: 'a-z',
17123 print: '\\x20-\\x7E ',
17124 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
17125 space: ' \\t\\r\\n\\v\\f',
17126 upper: 'A-Z',
17127 word: 'A-Za-z0-9_',
17128 xdigit: 'A-Fa-f0-9'
17129};
17130
17131module.exports = {
17132 MAX_LENGTH: 1024 * 64,
17133 POSIX_REGEX_SOURCE,
17134
17135 // regular expressions
17136 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
17137 REGEX_NON_SPECIAL_CHAR: /^[^@![\].,$*+?^{}()|\\/]+/,
17138 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
17139 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
17140 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
17141 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
17142
17143 // Replace globs with equivalent patterns to reduce parsing time.
17144 REPLACEMENTS: {
17145 '***': '*',
17146 '**/**': '**',
17147 '**/**/**': '**'
17148 },
17149
17150 // Digits
17151 CHAR_0: 48, /* 0 */
17152 CHAR_9: 57, /* 9 */
17153
17154 // Alphabet chars.
17155 CHAR_UPPERCASE_A: 65, /* A */
17156 CHAR_LOWERCASE_A: 97, /* a */
17157 CHAR_UPPERCASE_Z: 90, /* Z */
17158 CHAR_LOWERCASE_Z: 122, /* z */
17159
17160 CHAR_LEFT_PARENTHESES: 40, /* ( */
17161 CHAR_RIGHT_PARENTHESES: 41, /* ) */
17162
17163 CHAR_ASTERISK: 42, /* * */
17164
17165 // Non-alphabetic chars.
17166 CHAR_AMPERSAND: 38, /* & */
17167 CHAR_AT: 64, /* @ */
17168 CHAR_BACKWARD_SLASH: 92, /* \ */
17169 CHAR_CARRIAGE_RETURN: 13, /* \r */
17170 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
17171 CHAR_COLON: 58, /* : */
17172 CHAR_COMMA: 44, /* , */
17173 CHAR_DOT: 46, /* . */
17174 CHAR_DOUBLE_QUOTE: 34, /* " */
17175 CHAR_EQUAL: 61, /* = */
17176 CHAR_EXCLAMATION_MARK: 33, /* ! */
17177 CHAR_FORM_FEED: 12, /* \f */
17178 CHAR_FORWARD_SLASH: 47, /* / */
17179 CHAR_GRAVE_ACCENT: 96, /* ` */
17180 CHAR_HASH: 35, /* # */
17181 CHAR_HYPHEN_MINUS: 45, /* - */
17182 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
17183 CHAR_LEFT_CURLY_BRACE: 123, /* { */
17184 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
17185 CHAR_LINE_FEED: 10, /* \n */
17186 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
17187 CHAR_PERCENT: 37, /* % */
17188 CHAR_PLUS: 43, /* + */
17189 CHAR_QUESTION_MARK: 63, /* ? */
17190 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
17191 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
17192 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
17193 CHAR_SEMICOLON: 59, /* ; */
17194 CHAR_SINGLE_QUOTE: 39, /* ' */
17195 CHAR_SPACE: 32, /* */
17196 CHAR_TAB: 9, /* \t */
17197 CHAR_UNDERSCORE: 95, /* _ */
17198 CHAR_VERTICAL_LINE: 124, /* | */
17199 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
17200
17201 SEP: path.sep,
17202
17203 /**
17204 * Create EXTGLOB_CHARS
17205 */
17206
17207 extglobChars(chars) {
17208 return {
17209 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
17210 '?': { type: 'qmark', open: '(?:', close: ')?' },
17211 '+': { type: 'plus', open: '(?:', close: ')+' },
17212 '*': { type: 'star', open: '(?:', close: ')*' },
17213 '@': { type: 'at', open: '(?:', close: ')' }
17214 };
17215 },
17216
17217 /**
17218 * Create GLOB_CHARS
17219 */
17220
17221 globChars(win32) {
17222 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
17223 }
17224};
17225
17226
17227/***/ }),
17228/* 88 */
17229/***/ (function(module, exports, __webpack_require__) {
17230
17231"use strict";
17232
17233
17234const utils = __webpack_require__(86);
17235const constants = __webpack_require__(87);
17236
17237/**
17238 * Constants
17239 */
17240
17241const {
17242 MAX_LENGTH,
17243 POSIX_REGEX_SOURCE,
17244 REGEX_NON_SPECIAL_CHAR,
17245 REGEX_SPECIAL_CHARS_BACKREF,
17246 REPLACEMENTS
17247} = constants;
17248
17249/**
17250 * Helpers
17251 */
17252
17253const expandRange = (args, options) => {
17254 if (typeof options.expandRange === 'function') {
17255 return options.expandRange(...args, options);
17256 }
17257
17258 args.sort();
17259 let value = `[${args.join('-')}]`;
17260
17261 try {
17262 /* eslint-disable no-new */
17263 new RegExp(value);
17264 } catch (ex) {
17265 return args.map(v => utils.escapeRegex(v)).join('..');
17266 }
17267
17268 return value;
17269};
17270
17271const negate = state => {
17272 let count = 1;
17273
17274 while (state.peek() === '!' && (state.peek(2) !== '(' || state.peek(3) === '?')) {
17275 state.advance();
17276 state.start++;
17277 count++;
17278 }
17279
17280 if (count % 2 === 0) {
17281 return false;
17282 }
17283
17284 state.negated = true;
17285 state.start++;
17286 return true;
17287};
17288
17289/**
17290 * Create the message for a syntax error
17291 */
17292
17293const syntaxError = (type, char) => {
17294 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
17295};
17296
17297/**
17298 * Parse the given input string.
17299 * @param {String} input
17300 * @param {Object} options
17301 * @return {Object}
17302 */
17303
17304const parse = (input, options) => {
17305 if (typeof input !== 'string') {
17306 throw new TypeError('Expected a string');
17307 }
17308
17309 input = REPLACEMENTS[input] || input;
17310
17311 let opts = { ...options };
17312 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
17313 let len = input.length;
17314 if (len > max) {
17315 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
17316 }
17317
17318 let bos = { type: 'bos', value: '', output: opts.prepend || '' };
17319 let tokens = [bos];
17320
17321 let capture = opts.capture ? '' : '?:';
17322 let win32 = utils.isWindows(options);
17323
17324 // create constants based on platform, for windows or posix
17325 const PLATFORM_CHARS = constants.globChars(win32);
17326 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
17327
17328 const {
17329 DOT_LITERAL,
17330 PLUS_LITERAL,
17331 SLASH_LITERAL,
17332 ONE_CHAR,
17333 DOTS_SLASH,
17334 NO_DOT,
17335 NO_DOT_SLASH,
17336 NO_DOTS_SLASH,
17337 QMARK,
17338 QMARK_NO_DOT,
17339 STAR,
17340 START_ANCHOR
17341 } = PLATFORM_CHARS;
17342
17343 const globstar = (opts) => {
17344 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
17345 };
17346
17347 let nodot = opts.dot ? '' : NO_DOT;
17348 let star = opts.bash === true ? globstar(opts) : STAR;
17349 let qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
17350
17351 if (opts.capture) {
17352 star = `(${star})`;
17353 }
17354
17355 // minimatch options support
17356 if (typeof opts.noext === 'boolean') {
17357 opts.noextglob = opts.noext;
17358 }
17359
17360 let state = {
17361 index: -1,
17362 start: 0,
17363 consumed: '',
17364 output: '',
17365 backtrack: false,
17366 brackets: 0,
17367 braces: 0,
17368 parens: 0,
17369 quotes: 0,
17370 tokens
17371 };
17372
17373 let extglobs = [];
17374 let stack = [];
17375 let prev = bos;
17376 let value;
17377
17378 /**
17379 * Tokenizing helpers
17380 */
17381
17382 const eos = () => state.index === len - 1;
17383 const peek = state.peek = (n = 1) => input[state.index + n];
17384 const advance = state.advance = () => input[++state.index];
17385 const append = token => {
17386 state.output += token.output != null ? token.output : token.value;
17387 state.consumed += token.value || '';
17388 };
17389
17390 const increment = type => {
17391 state[type]++;
17392 stack.push(type);
17393 };
17394
17395 const decrement = type => {
17396 state[type]--;
17397 stack.pop();
17398 };
17399
17400 /**
17401 * Push tokens onto the tokens array. This helper speeds up
17402 * tokenizing by 1) helping us avoid backtracking as much as possible,
17403 * and 2) helping us avoid creating extra tokens when consecutive
17404 * characters are plain text. This improves performance and simplifies
17405 * lookbehinds.
17406 */
17407
17408 const push = tok => {
17409 if (prev.type === 'globstar') {
17410 let isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
17411 let isExtglob = extglobs.length && (tok.type === 'pipe' || tok.type === 'paren');
17412 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
17413 state.output = state.output.slice(0, -prev.output.length);
17414 prev.type = 'star';
17415 prev.value = '*';
17416 prev.output = star;
17417 state.output += prev.output;
17418 }
17419 }
17420
17421 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
17422 extglobs[extglobs.length - 1].inner += tok.value;
17423 }
17424
17425 if (tok.value || tok.output) append(tok);
17426 if (prev && prev.type === 'text' && tok.type === 'text') {
17427 prev.value += tok.value;
17428 return;
17429 }
17430
17431 tok.prev = prev;
17432 tokens.push(tok);
17433 prev = tok;
17434 };
17435
17436 const extglobOpen = (type, value) => {
17437 let token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
17438
17439 token.prev = prev;
17440 token.parens = state.parens;
17441 token.output = state.output;
17442 let output = (opts.capture ? '(' : '') + token.open;
17443
17444 push({ type, value, output: state.output ? '' : ONE_CHAR });
17445 push({ type: 'paren', extglob: true, value: advance(), output });
17446 increment('parens');
17447 extglobs.push(token);
17448 };
17449
17450 const extglobClose = token => {
17451 let output = token.close + (opts.capture ? ')' : '');
17452
17453 if (token.type === 'negate') {
17454 let extglobStar = star;
17455
17456 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
17457 extglobStar = globstar(opts);
17458 }
17459
17460 if (extglobStar !== star || eos() || /^\)+$/.test(input.slice(state.index + 1))) {
17461 output = token.close = ')$))' + extglobStar;
17462 }
17463
17464 if (token.prev.type === 'bos' && eos()) {
17465 state.negatedExtglob = true;
17466 }
17467 }
17468
17469 push({ type: 'paren', extglob: true, value, output });
17470 decrement('parens');
17471 };
17472
17473 if (opts.fastpaths !== false && !/(^[*!]|[/{[()\]}"])/.test(input)) {
17474 let backslashes = false;
17475
17476 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
17477 if (first === '\\') {
17478 backslashes = true;
17479 return m;
17480 }
17481
17482 if (first === '?') {
17483 if (esc) {
17484 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
17485 }
17486 if (index === 0) {
17487 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
17488 }
17489 return QMARK.repeat(chars.length);
17490 }
17491
17492 if (first === '.') {
17493 return DOT_LITERAL.repeat(chars.length);
17494 }
17495
17496 if (first === '*') {
17497 if (esc) {
17498 return esc + first + (rest ? star : '');
17499 }
17500 return star;
17501 }
17502 return esc ? m : '\\' + m;
17503 });
17504
17505 if (backslashes === true) {
17506 if (opts.unescape === true) {
17507 output = output.replace(/\\/g, '');
17508 } else {
17509 output = output.replace(/\\+/g, m => {
17510 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
17511 });
17512 }
17513 }
17514
17515 state.output = output;
17516 return state;
17517 }
17518
17519 /**
17520 * Tokenize input until we reach end-of-string
17521 */
17522
17523 while (!eos()) {
17524 value = advance();
17525
17526 if (value === '\u0000') {
17527 continue;
17528 }
17529
17530 /**
17531 * Escaped characters
17532 */
17533
17534 if (value === '\\') {
17535 let next = peek();
17536
17537 if (next === '/' && opts.bash !== true) {
17538 continue;
17539 }
17540
17541 if (next === '.' || next === ';') {
17542 continue;
17543 }
17544
17545 if (!next) {
17546 value += '\\';
17547 push({ type: 'text', value });
17548 continue;
17549 }
17550
17551 // collapse slashes to reduce potential for exploits
17552 let match = /^\\+/.exec(input.slice(state.index + 1));
17553 let slashes = 0;
17554
17555 if (match && match[0].length > 2) {
17556 slashes = match[0].length;
17557 state.index += slashes;
17558 if (slashes % 2 !== 0) {
17559 value += '\\';
17560 }
17561 }
17562
17563 if (opts.unescape === true) {
17564 value = advance() || '';
17565 } else {
17566 value += advance() || '';
17567 }
17568
17569 if (state.brackets === 0) {
17570 push({ type: 'text', value });
17571 continue;
17572 }
17573 }
17574
17575 /**
17576 * If we're inside a regex character class, continue
17577 * until we reach the closing bracket.
17578 */
17579
17580 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
17581 if (opts.posix !== false && value === ':') {
17582 let inner = prev.value.slice(1);
17583 if (inner.includes('[')) {
17584 prev.posix = true;
17585
17586 if (inner.includes(':')) {
17587 let idx = prev.value.lastIndexOf('[');
17588 let pre = prev.value.slice(0, idx);
17589 let rest = prev.value.slice(idx + 2);
17590 let posix = POSIX_REGEX_SOURCE[rest];
17591 if (posix) {
17592 prev.value = pre + posix;
17593 state.backtrack = true;
17594 advance();
17595
17596 if (!bos.output && tokens.indexOf(prev) === 1) {
17597 bos.output = ONE_CHAR;
17598 }
17599 continue;
17600 }
17601 }
17602 }
17603 }
17604
17605 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
17606 value = '\\' + value;
17607 }
17608
17609 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
17610 value = '\\' + value;
17611 }
17612
17613 if (opts.posix === true && value === '!' && prev.value === '[') {
17614 value = '^';
17615 }
17616
17617 prev.value += value;
17618 append({ value });
17619 continue;
17620 }
17621
17622 /**
17623 * If we're inside a quoted string, continue
17624 * until we reach the closing double quote.
17625 */
17626
17627 if (state.quotes === 1 && value !== '"') {
17628 value = utils.escapeRegex(value);
17629 prev.value += value;
17630 append({ value });
17631 continue;
17632 }
17633
17634 /**
17635 * Double quotes
17636 */
17637
17638 if (value === '"') {
17639 state.quotes = state.quotes === 1 ? 0 : 1;
17640 if (opts.keepQuotes === true) {
17641 push({ type: 'text', value });
17642 }
17643 continue;
17644 }
17645
17646 /**
17647 * Parentheses
17648 */
17649
17650 if (value === '(') {
17651 push({ type: 'paren', value });
17652 increment('parens');
17653 continue;
17654 }
17655
17656 if (value === ')') {
17657 if (state.parens === 0 && opts.strictBrackets === true) {
17658 throw new SyntaxError(syntaxError('opening', '('));
17659 }
17660
17661 let extglob = extglobs[extglobs.length - 1];
17662 if (extglob && state.parens === extglob.parens + 1) {
17663 extglobClose(extglobs.pop());
17664 continue;
17665 }
17666
17667 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
17668 decrement('parens');
17669 continue;
17670 }
17671
17672 /**
17673 * Brackets
17674 */
17675
17676 if (value === '[') {
17677 if (opts.nobracket === true || !input.slice(state.index + 1).includes(']')) {
17678 if (opts.nobracket !== true && opts.strictBrackets === true) {
17679 throw new SyntaxError(syntaxError('closing', ']'));
17680 }
17681
17682 value = '\\' + value;
17683 } else {
17684 increment('brackets');
17685 }
17686
17687 push({ type: 'bracket', value });
17688 continue;
17689 }
17690
17691 if (value === ']') {
17692 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
17693 push({ type: 'text', value, output: '\\' + value });
17694 continue;
17695 }
17696
17697 if (state.brackets === 0) {
17698 if (opts.strictBrackets === true) {
17699 throw new SyntaxError(syntaxError('opening', '['));
17700 }
17701
17702 push({ type: 'text', value, output: '\\' + value });
17703 continue;
17704 }
17705
17706 decrement('brackets');
17707
17708 let prevValue = prev.value.slice(1);
17709 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
17710 value = '/' + value;
17711 }
17712
17713 prev.value += value;
17714 append({ value });
17715
17716 // when literal brackets are explicitly disabled
17717 // assume we should match with a regex character class
17718 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
17719 continue;
17720 }
17721
17722 let escaped = utils.escapeRegex(prev.value);
17723 state.output = state.output.slice(0, -prev.value.length);
17724
17725 // when literal brackets are explicitly enabled
17726 // assume we should escape the brackets to match literal characters
17727 if (opts.literalBrackets === true) {
17728 state.output += escaped;
17729 prev.value = escaped;
17730 continue;
17731 }
17732
17733 // when the user specifies nothing, try to match both
17734 prev.value = `(${capture}${escaped}|${prev.value})`;
17735 state.output += prev.value;
17736 continue;
17737 }
17738
17739 /**
17740 * Braces
17741 */
17742
17743 if (value === '{' && opts.nobrace !== true) {
17744 push({ type: 'brace', value, output: '(' });
17745 increment('braces');
17746 continue;
17747 }
17748
17749 if (value === '}') {
17750 if (opts.nobrace === true || state.braces === 0) {
17751 push({ type: 'text', value, output: '\\' + value });
17752 continue;
17753 }
17754
17755 let output = ')';
17756
17757 if (state.dots === true) {
17758 let arr = tokens.slice();
17759 let range = [];
17760
17761 for (let i = arr.length - 1; i >= 0; i--) {
17762 tokens.pop();
17763 if (arr[i].type === 'brace') {
17764 break;
17765 }
17766 if (arr[i].type !== 'dots') {
17767 range.unshift(arr[i].value);
17768 }
17769 }
17770
17771 output = expandRange(range, opts);
17772 state.backtrack = true;
17773 }
17774
17775 push({ type: 'brace', value, output });
17776 decrement('braces');
17777 continue;
17778 }
17779
17780 /**
17781 * Pipes
17782 */
17783
17784 if (value === '|') {
17785 if (extglobs.length > 0) {
17786 extglobs[extglobs.length - 1].conditions++;
17787 }
17788 push({ type: 'text', value });
17789 continue;
17790 }
17791
17792 /**
17793 * Commas
17794 */
17795
17796 if (value === ',') {
17797 let output = value;
17798
17799 if (state.braces > 0 && stack[stack.length - 1] === 'braces') {
17800 output = '|';
17801 }
17802
17803 push({ type: 'comma', value, output });
17804 continue;
17805 }
17806
17807 /**
17808 * Slashes
17809 */
17810
17811 if (value === '/') {
17812 // if the beginning of the glob is "./", advance the start
17813 // to the current index, and don't add the "./" characters
17814 // to the state. This greatly simplifies lookbehinds when
17815 // checking for BOS characters like "!" and "." (not "./")
17816 if (prev.type === 'dot' && state.index === 1) {
17817 state.start = state.index + 1;
17818 state.consumed = '';
17819 state.output = '';
17820 tokens.pop();
17821 prev = bos; // reset "prev" to the first token
17822 continue;
17823 }
17824
17825 push({ type: 'slash', value, output: SLASH_LITERAL });
17826 continue;
17827 }
17828
17829 /**
17830 * Dots
17831 */
17832
17833 if (value === '.') {
17834 if (state.braces > 0 && prev.type === 'dot') {
17835 if (prev.value === '.') prev.output = DOT_LITERAL;
17836 prev.type = 'dots';
17837 prev.output += value;
17838 prev.value += value;
17839 state.dots = true;
17840 continue;
17841 }
17842
17843 push({ type: 'dot', value, output: DOT_LITERAL });
17844 continue;
17845 }
17846
17847 /**
17848 * Question marks
17849 */
17850
17851 if (value === '?') {
17852 if (prev && prev.type === 'paren') {
17853 let next = peek();
17854 let output = value;
17855
17856 if (next === '<' && !utils.supportsLookbehinds()) {
17857 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
17858 }
17859
17860 if (prev.value === '(' && !/[!=<:]/.test(next) || (next === '<' && !/[!=]/.test(peek(2)))) {
17861 output = '\\' + value;
17862 }
17863
17864 push({ type: 'text', value, output });
17865 continue;
17866 }
17867
17868 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17869 extglobOpen('qmark', value);
17870 continue;
17871 }
17872
17873 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
17874 push({ type: 'qmark', value, output: QMARK_NO_DOT });
17875 continue;
17876 }
17877
17878 push({ type: 'qmark', value, output: QMARK });
17879 continue;
17880 }
17881
17882 /**
17883 * Exclamation
17884 */
17885
17886 if (value === '!') {
17887 if (opts.noextglob !== true && peek() === '(') {
17888 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
17889 extglobOpen('negate', value);
17890 continue;
17891 }
17892 }
17893
17894 if (opts.nonegate !== true && state.index === 0) {
17895 negate(state);
17896 continue;
17897 }
17898 }
17899
17900 /**
17901 * Plus
17902 */
17903
17904 if (value === '+') {
17905 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17906 extglobOpen('plus', value);
17907 continue;
17908 }
17909
17910 if (prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) {
17911 let output = prev.extglob === true ? '\\' + value : value;
17912 push({ type: 'plus', value, output });
17913 continue;
17914 }
17915
17916 // use regex behavior inside parens
17917 if (state.parens > 0 && opts.regex !== false) {
17918 push({ type: 'plus', value });
17919 continue;
17920 }
17921
17922 push({ type: 'plus', value: PLUS_LITERAL });
17923 continue;
17924 }
17925
17926 /**
17927 * Plain text
17928 */
17929
17930 if (value === '@') {
17931 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17932 push({ type: 'at', value, output: '' });
17933 continue;
17934 }
17935
17936 push({ type: 'text', value });
17937 continue;
17938 }
17939
17940 /**
17941 * Plain text
17942 */
17943
17944 if (value !== '*') {
17945 if (value === '$' || value === '^') {
17946 value = '\\' + value;
17947 }
17948
17949 let match = REGEX_NON_SPECIAL_CHAR.exec(input.slice(state.index + 1));
17950 if (match) {
17951 value += match[0];
17952 state.index += match[0].length;
17953 }
17954
17955 push({ type: 'text', value });
17956 continue;
17957 }
17958
17959 /**
17960 * Stars
17961 */
17962
17963 if (prev && (prev.type === 'globstar' || prev.star === true)) {
17964 prev.type = 'star';
17965 prev.star = true;
17966 prev.value += value;
17967 prev.output = star;
17968 state.backtrack = true;
17969 state.consumed += value;
17970 continue;
17971 }
17972
17973 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17974 extglobOpen('star', value);
17975 continue;
17976 }
17977
17978 if (prev.type === 'star') {
17979 if (opts.noglobstar === true) {
17980 state.consumed += value;
17981 continue;
17982 }
17983
17984 let prior = prev.prev;
17985 let before = prior.prev;
17986 let isStart = prior.type === 'slash' || prior.type === 'bos';
17987 let afterStar = before && (before.type === 'star' || before.type === 'globstar');
17988
17989 if (opts.bash === true && (!isStart || (!eos() && peek() !== '/'))) {
17990 push({ type: 'star', value, output: '' });
17991 continue;
17992 }
17993
17994 let isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
17995 let isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
17996 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
17997 push({ type: 'star', value, output: '' });
17998 continue;
17999 }
18000
18001 // strip consecutive `/**/`
18002 while (input.slice(state.index + 1, state.index + 4) === '/**') {
18003 let after = input[state.index + 4];
18004 if (after && after !== '/') {
18005 break;
18006 }
18007 state.consumed += '/**';
18008 state.index += 3;
18009 }
18010
18011 if (prior.type === 'bos' && eos()) {
18012 prev.type = 'globstar';
18013 prev.value += value;
18014 prev.output = globstar(opts);
18015 state.output = prev.output;
18016 state.consumed += value;
18017 continue;
18018 }
18019
18020 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
18021 state.output = state.output.slice(0, -(prior.output + prev.output).length);
18022 prior.output = '(?:' + prior.output;
18023
18024 prev.type = 'globstar';
18025 prev.output = globstar(opts) + '|$)';
18026 prev.value += value;
18027
18028 state.output += prior.output + prev.output;
18029 state.consumed += value;
18030 continue;
18031 }
18032
18033 let next = peek();
18034 if (prior.type === 'slash' && prior.prev.type !== 'bos' && next === '/') {
18035 let end = peek(2) !== void 0 ? '|$' : '';
18036
18037 state.output = state.output.slice(0, -(prior.output + prev.output).length);
18038 prior.output = '(?:' + prior.output;
18039
18040 prev.type = 'globstar';
18041 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
18042 prev.value += value;
18043
18044 state.output += prior.output + prev.output;
18045 state.consumed += value + advance();
18046
18047 push({ type: 'slash', value, output: '' });
18048 continue;
18049 }
18050
18051 if (prior.type === 'bos' && next === '/') {
18052 prev.type = 'globstar';
18053 prev.value += value;
18054 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
18055 state.output = prev.output;
18056 state.consumed += value + advance();
18057 push({ type: 'slash', value, output: '' });
18058 continue;
18059 }
18060
18061 // remove single star from output
18062 state.output = state.output.slice(0, -prev.output.length);
18063
18064 // reset previous token to globstar
18065 prev.type = 'globstar';
18066 prev.output = globstar(opts);
18067 prev.value += value;
18068
18069 // reset output with globstar
18070 state.output += prev.output;
18071 state.consumed += value;
18072 continue;
18073 }
18074
18075 let token = { type: 'star', value, output: star };
18076
18077 if (opts.bash === true) {
18078 token.output = '.*?';
18079 if (prev.type === 'bos' || prev.type === 'slash') {
18080 token.output = nodot + token.output;
18081 }
18082 push(token);
18083 continue;
18084 }
18085
18086 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
18087 token.output = value;
18088 push(token);
18089 continue;
18090 }
18091
18092 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
18093 if (prev.type === 'dot') {
18094 state.output += NO_DOT_SLASH;
18095 prev.output += NO_DOT_SLASH;
18096
18097 } else if (opts.dot === true) {
18098 state.output += NO_DOTS_SLASH;
18099 prev.output += NO_DOTS_SLASH;
18100
18101 } else {
18102 state.output += nodot;
18103 prev.output += nodot;
18104 }
18105
18106 if (peek() !== '*') {
18107 state.output += ONE_CHAR;
18108 prev.output += ONE_CHAR;
18109 }
18110 }
18111
18112 push(token);
18113 }
18114
18115 while (state.brackets > 0) {
18116 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
18117 state.output = utils.escapeLast(state.output, '[');
18118 decrement('brackets');
18119 }
18120
18121 while (state.parens > 0) {
18122 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
18123 state.output = utils.escapeLast(state.output, '(');
18124 decrement('parens');
18125 }
18126
18127 while (state.braces > 0) {
18128 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
18129 state.output = utils.escapeLast(state.output, '{');
18130 decrement('braces');
18131 }
18132
18133 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
18134 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
18135 }
18136
18137 // rebuild the output if we had to backtrack at any point
18138 if (state.backtrack === true) {
18139 state.output = '';
18140
18141 for (let token of state.tokens) {
18142 state.output += token.output != null ? token.output : token.value;
18143
18144 if (token.suffix) {
18145 state.output += token.suffix;
18146 }
18147 }
18148 }
18149
18150 return state;
18151};
18152
18153/**
18154 * Fast paths for creating regular expressions for common glob patterns.
18155 * This can significantly speed up processing and has very little downside
18156 * impact when none of the fast paths match.
18157 */
18158
18159parse.fastpaths = (input, options) => {
18160 let opts = { ...options };
18161 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
18162 let len = input.length;
18163 if (len > max) {
18164 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
18165 }
18166
18167 input = REPLACEMENTS[input] || input;
18168 let win32 = utils.isWindows(options);
18169
18170 // create constants based on platform, for windows or posix
18171 const {
18172 DOT_LITERAL,
18173 SLASH_LITERAL,
18174 ONE_CHAR,
18175 DOTS_SLASH,
18176 NO_DOT,
18177 NO_DOTS,
18178 NO_DOTS_SLASH,
18179 STAR,
18180 START_ANCHOR
18181 } = constants.globChars(win32);
18182
18183 let capture = opts.capture ? '' : '?:';
18184 let star = opts.bash === true ? '.*?' : STAR;
18185 let nodot = opts.dot ? NO_DOTS : NO_DOT;
18186 let slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
18187
18188 if (opts.capture) {
18189 star = `(${star})`;
18190 }
18191
18192 const globstar = (opts) => {
18193 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
18194 };
18195
18196 const create = str => {
18197 switch (str) {
18198 case '*':
18199 return `${nodot}${ONE_CHAR}${star}`;
18200
18201 case '.*':
18202 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
18203
18204 case '*.*':
18205 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
18206
18207 case '*/*':
18208 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
18209
18210 case '**':
18211 return nodot + globstar(opts);
18212
18213 case '**/*':
18214 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
18215
18216 case '**/*.*':
18217 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
18218
18219 case '**/.*':
18220 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
18221
18222 default: {
18223 let match = /^(.*?)\.(\w+)$/.exec(str);
18224 if (!match) return;
18225
18226 let source = create(match[1], options);
18227 if (!source) return;
18228
18229 return source + DOT_LITERAL + match[2];
18230 }
18231 }
18232 };
18233
18234 let output = create(input);
18235 if (output && opts.strictSlashes !== true) {
18236 output += `${SLASH_LITERAL}?`;
18237 }
18238
18239 return output;
18240};
18241
18242module.exports = parse;
18243
18244
18245/***/ }),
18246/* 89 */
18247/***/ (function(module, exports, __webpack_require__) {
18248
18249"use strict";
18250
18251
18252module.exports = __webpack_require__(90);
18253
18254
18255/***/ }),
18256/* 90 */
18257/***/ (function(module, exports, __webpack_require__) {
18258
18259"use strict";
18260
18261
18262const path = __webpack_require__(13);
18263const scan = __webpack_require__(91);
18264const parse = __webpack_require__(94);
18265const utils = __webpack_require__(92);
18266const constants = __webpack_require__(93);
18267const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
18268
18269/**
18270 * Creates a matcher function from one or more glob patterns. The
18271 * returned function takes a string to match as its first argument,
18272 * and returns true if the string is a match. The returned matcher
18273 * function also takes a boolean as the second argument that, when true,
18274 * returns an object with additional information.
18275 *
18276 * ```js
18277 * const picomatch = require('picomatch');
18278 * // picomatch(glob[, options]);
18279 *
18280 * const isMatch = picomatch('*.!(*a)');
18281 * console.log(isMatch('a.a')); //=> false
18282 * console.log(isMatch('a.b')); //=> true
18283 * ```
18284 * @name picomatch
18285 * @param {String|Array} `globs` One or more glob patterns.
18286 * @param {Object=} `options`
18287 * @return {Function=} Returns a matcher function.
18288 * @api public
18289 */
18290
18291const picomatch = (glob, options, returnState = false) => {
18292 if (Array.isArray(glob)) {
18293 const fns = glob.map(input => picomatch(input, options, returnState));
18294 const arrayMatcher = str => {
18295 for (const isMatch of fns) {
18296 const state = isMatch(str);
18297 if (state) return state;
18298 }
18299 return false;
18300 };
18301 return arrayMatcher;
18302 }
18303
18304 const isState = isObject(glob) && glob.tokens && glob.input;
18305
18306 if (glob === '' || (typeof glob !== 'string' && !isState)) {
18307 throw new TypeError('Expected pattern to be a non-empty string');
18308 }
18309
18310 const opts = options || {};
18311 const posix = utils.isWindows(options);
18312 const regex = isState
18313 ? picomatch.compileRe(glob, options)
18314 : picomatch.makeRe(glob, options, false, true);
18315
18316 const state = regex.state;
18317 delete regex.state;
18318
18319 let isIgnored = () => false;
18320 if (opts.ignore) {
18321 const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
18322 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
18323 }
18324
18325 const matcher = (input, returnObject = false) => {
18326 const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
18327 const result = { glob, state, regex, posix, input, output, match, isMatch };
18328
18329 if (typeof opts.onResult === 'function') {
18330 opts.onResult(result);
18331 }
18332
18333 if (isMatch === false) {
18334 result.isMatch = false;
18335 return returnObject ? result : false;
18336 }
18337
18338 if (isIgnored(input)) {
18339 if (typeof opts.onIgnore === 'function') {
18340 opts.onIgnore(result);
18341 }
18342 result.isMatch = false;
18343 return returnObject ? result : false;
18344 }
18345
18346 if (typeof opts.onMatch === 'function') {
18347 opts.onMatch(result);
18348 }
18349 return returnObject ? result : true;
18350 };
18351
18352 if (returnState) {
18353 matcher.state = state;
18354 }
18355
18356 return matcher;
18357};
18358
18359/**
18360 * Test `input` with the given `regex`. This is used by the main
18361 * `picomatch()` function to test the input string.
18362 *
18363 * ```js
18364 * const picomatch = require('picomatch');
18365 * // picomatch.test(input, regex[, options]);
18366 *
18367 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
18368 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
18369 * ```
18370 * @param {String} `input` String to test.
18371 * @param {RegExp} `regex`
18372 * @return {Object} Returns an object with matching info.
18373 * @api public
18374 */
18375
18376picomatch.test = (input, regex, options, { glob, posix } = {}) => {
18377 if (typeof input !== 'string') {
18378 throw new TypeError('Expected input to be a string');
18379 }
18380
18381 if (input === '') {
18382 return { isMatch: false, output: '' };
18383 }
18384
18385 const opts = options || {};
18386 const format = opts.format || (posix ? utils.toPosixSlashes : null);
18387 let match = input === glob;
18388 let output = (match && format) ? format(input) : input;
18389
18390 if (match === false) {
18391 output = format ? format(input) : input;
18392 match = output === glob;
18393 }
18394
18395 if (match === false || opts.capture === true) {
18396 if (opts.matchBase === true || opts.basename === true) {
18397 match = picomatch.matchBase(input, regex, options, posix);
18398 } else {
18399 match = regex.exec(output);
18400 }
18401 }
18402
18403 return { isMatch: Boolean(match), match, output };
18404};
18405
18406/**
18407 * Match the basename of a filepath.
18408 *
18409 * ```js
18410 * const picomatch = require('picomatch');
18411 * // picomatch.matchBase(input, glob[, options]);
18412 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
18413 * ```
18414 * @param {String} `input` String to test.
18415 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
18416 * @return {Boolean}
18417 * @api public
18418 */
18419
18420picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
18421 const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
18422 return regex.test(path.basename(input));
18423};
18424
18425/**
18426 * Returns true if **any** of the given glob `patterns` match the specified `string`.
18427 *
18428 * ```js
18429 * const picomatch = require('picomatch');
18430 * // picomatch.isMatch(string, patterns[, options]);
18431 *
18432 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
18433 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
18434 * ```
18435 * @param {String|Array} str The string to test.
18436 * @param {String|Array} patterns One or more glob patterns to use for matching.
18437 * @param {Object} [options] See available [options](#options).
18438 * @return {Boolean} Returns true if any patterns match `str`
18439 * @api public
18440 */
18441
18442picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
18443
18444/**
18445 * Parse a glob pattern to create the source string for a regular
18446 * expression.
18447 *
18448 * ```js
18449 * const picomatch = require('picomatch');
18450 * const result = picomatch.parse(pattern[, options]);
18451 * ```
18452 * @param {String} `pattern`
18453 * @param {Object} `options`
18454 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
18455 * @api public
18456 */
18457
18458picomatch.parse = (pattern, options) => {
18459 if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
18460 return parse(pattern, { ...options, fastpaths: false });
18461};
18462
18463/**
18464 * Scan a glob pattern to separate the pattern into segments.
18465 *
18466 * ```js
18467 * const picomatch = require('picomatch');
18468 * // picomatch.scan(input[, options]);
18469 *
18470 * const result = picomatch.scan('!./foo/*.js');
18471 * console.log(result);
18472 * { prefix: '!./',
18473 * input: '!./foo/*.js',
18474 * start: 3,
18475 * base: 'foo',
18476 * glob: '*.js',
18477 * isBrace: false,
18478 * isBracket: false,
18479 * isGlob: true,
18480 * isExtglob: false,
18481 * isGlobstar: false,
18482 * negated: true }
18483 * ```
18484 * @param {String} `input` Glob pattern to scan.
18485 * @param {Object} `options`
18486 * @return {Object} Returns an object with
18487 * @api public
18488 */
18489
18490picomatch.scan = (input, options) => scan(input, options);
18491
18492/**
18493 * Create a regular expression from a parsed glob pattern.
18494 *
18495 * ```js
18496 * const picomatch = require('picomatch');
18497 * const state = picomatch.parse('*.js');
18498 * // picomatch.compileRe(state[, options]);
18499 *
18500 * console.log(picomatch.compileRe(state));
18501 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
18502 * ```
18503 * @param {String} `state` The object returned from the `.parse` method.
18504 * @param {Object} `options`
18505 * @return {RegExp} Returns a regex created from the given pattern.
18506 * @api public
18507 */
18508
18509picomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {
18510 if (returnOutput === true) {
18511 return parsed.output;
18512 }
18513
18514 const opts = options || {};
18515 const prepend = opts.contains ? '' : '^';
18516 const append = opts.contains ? '' : '$';
18517
18518 let source = `${prepend}(?:${parsed.output})${append}`;
18519 if (parsed && parsed.negated === true) {
18520 source = `^(?!${source}).*$`;
18521 }
18522
18523 const regex = picomatch.toRegex(source, options);
18524 if (returnState === true) {
18525 regex.state = parsed;
18526 }
18527
18528 return regex;
18529};
18530
18531picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
18532 if (!input || typeof input !== 'string') {
18533 throw new TypeError('Expected a non-empty string');
18534 }
18535
18536 const opts = options || {};
18537 let parsed = { negated: false, fastpaths: true };
18538 let prefix = '';
18539 let output;
18540
18541 if (input.startsWith('./')) {
18542 input = input.slice(2);
18543 prefix = parsed.prefix = './';
18544 }
18545
18546 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
18547 output = parse.fastpaths(input, options);
18548 }
18549
18550 if (output === undefined) {
18551 parsed = parse(input, options);
18552 parsed.prefix = prefix + (parsed.prefix || '');
18553 } else {
18554 parsed.output = output;
18555 }
18556
18557 return picomatch.compileRe(parsed, options, returnOutput, returnState);
18558};
18559
18560/**
18561 * Create a regular expression from the given regex source string.
18562 *
18563 * ```js
18564 * const picomatch = require('picomatch');
18565 * // picomatch.toRegex(source[, options]);
18566 *
18567 * const { output } = picomatch.parse('*.js');
18568 * console.log(picomatch.toRegex(output));
18569 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
18570 * ```
18571 * @param {String} `source` Regular expression source string.
18572 * @param {Object} `options`
18573 * @return {RegExp}
18574 * @api public
18575 */
18576
18577picomatch.toRegex = (source, options) => {
18578 try {
18579 const opts = options || {};
18580 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
18581 } catch (err) {
18582 if (options && options.debug === true) throw err;
18583 return /$^/;
18584 }
18585};
18586
18587/**
18588 * Picomatch constants.
18589 * @return {Object}
18590 */
18591
18592picomatch.constants = constants;
18593
18594/**
18595 * Expose "picomatch"
18596 */
18597
18598module.exports = picomatch;
18599
18600
18601/***/ }),
18602/* 91 */
18603/***/ (function(module, exports, __webpack_require__) {
18604
18605"use strict";
18606
18607
18608const utils = __webpack_require__(92);
18609const {
18610 CHAR_ASTERISK, /* * */
18611 CHAR_AT, /* @ */
18612 CHAR_BACKWARD_SLASH, /* \ */
18613 CHAR_COMMA, /* , */
18614 CHAR_DOT, /* . */
18615 CHAR_EXCLAMATION_MARK, /* ! */
18616 CHAR_FORWARD_SLASH, /* / */
18617 CHAR_LEFT_CURLY_BRACE, /* { */
18618 CHAR_LEFT_PARENTHESES, /* ( */
18619 CHAR_LEFT_SQUARE_BRACKET, /* [ */
18620 CHAR_PLUS, /* + */
18621 CHAR_QUESTION_MARK, /* ? */
18622 CHAR_RIGHT_CURLY_BRACE, /* } */
18623 CHAR_RIGHT_PARENTHESES, /* ) */
18624 CHAR_RIGHT_SQUARE_BRACKET /* ] */
18625} = __webpack_require__(93);
18626
18627const isPathSeparator = code => {
18628 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
18629};
18630
18631const depth = token => {
18632 if (token.isPrefix !== true) {
18633 token.depth = token.isGlobstar ? Infinity : 1;
18634 }
18635};
18636
18637/**
18638 * Quickly scans a glob pattern and returns an object with a handful of
18639 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
18640 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
18641 *
18642 * ```js
18643 * const pm = require('picomatch');
18644 * console.log(pm.scan('foo/bar/*.js'));
18645 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
18646 * ```
18647 * @param {String} `str`
18648 * @param {Object} `options`
18649 * @return {Object} Returns an object with tokens and regex source string.
18650 * @api public
18651 */
18652
18653const scan = (input, options) => {
18654 const opts = options || {};
18655
18656 const length = input.length - 1;
18657 const scanToEnd = opts.parts === true || opts.scanToEnd === true;
18658 const slashes = [];
18659 const tokens = [];
18660 const parts = [];
18661
18662 let str = input;
18663 let index = -1;
18664 let start = 0;
18665 let lastIndex = 0;
18666 let isBrace = false;
18667 let isBracket = false;
18668 let isGlob = false;
18669 let isExtglob = false;
18670 let isGlobstar = false;
18671 let braceEscaped = false;
18672 let backslashes = false;
18673 let negated = false;
18674 let finished = false;
18675 let braces = 0;
18676 let prev;
18677 let code;
18678 let token = { value: '', depth: 0, isGlob: false };
18679
18680 const eos = () => index >= length;
18681 const peek = () => str.charCodeAt(index + 1);
18682 const advance = () => {
18683 prev = code;
18684 return str.charCodeAt(++index);
18685 };
18686
18687 while (index < length) {
18688 code = advance();
18689 let next;
18690
18691 if (code === CHAR_BACKWARD_SLASH) {
18692 backslashes = token.backslashes = true;
18693 code = advance();
18694
18695 if (code === CHAR_LEFT_CURLY_BRACE) {
18696 braceEscaped = true;
18697 }
18698 continue;
18699 }
18700
18701 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
18702 braces++;
18703
18704 while (eos() !== true && (code = advance())) {
18705 if (code === CHAR_BACKWARD_SLASH) {
18706 backslashes = token.backslashes = true;
18707 advance();
18708 continue;
18709 }
18710
18711 if (code === CHAR_LEFT_CURLY_BRACE) {
18712 braces++;
18713 continue;
18714 }
18715
18716 if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
18717 isBrace = token.isBrace = true;
18718 isGlob = token.isGlob = true;
18719 finished = true;
18720
18721 if (scanToEnd === true) {
18722 continue;
18723 }
18724
18725 break;
18726 }
18727
18728 if (braceEscaped !== true && code === CHAR_COMMA) {
18729 isBrace = token.isBrace = true;
18730 isGlob = token.isGlob = true;
18731 finished = true;
18732
18733 if (scanToEnd === true) {
18734 continue;
18735 }
18736
18737 break;
18738 }
18739
18740 if (code === CHAR_RIGHT_CURLY_BRACE) {
18741 braces--;
18742
18743 if (braces === 0) {
18744 braceEscaped = false;
18745 isBrace = token.isBrace = true;
18746 finished = true;
18747 break;
18748 }
18749 }
18750 }
18751
18752 if (scanToEnd === true) {
18753 continue;
18754 }
18755
18756 break;
18757 }
18758
18759 if (code === CHAR_FORWARD_SLASH) {
18760 slashes.push(index);
18761 tokens.push(token);
18762 token = { value: '', depth: 0, isGlob: false };
18763
18764 if (finished === true) continue;
18765 if (prev === CHAR_DOT && index === (start + 1)) {
18766 start += 2;
18767 continue;
18768 }
18769
18770 lastIndex = index + 1;
18771 continue;
18772 }
18773
18774 if (opts.noext !== true) {
18775 const isExtglobChar = code === CHAR_PLUS
18776 || code === CHAR_AT
18777 || code === CHAR_ASTERISK
18778 || code === CHAR_QUESTION_MARK
18779 || code === CHAR_EXCLAMATION_MARK;
18780
18781 if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
18782 isGlob = token.isGlob = true;
18783 isExtglob = token.isExtglob = true;
18784 finished = true;
18785
18786 if (scanToEnd === true) {
18787 while (eos() !== true && (code = advance())) {
18788 if (code === CHAR_BACKWARD_SLASH) {
18789 backslashes = token.backslashes = true;
18790 code = advance();
18791 continue;
18792 }
18793
18794 if (code === CHAR_RIGHT_PARENTHESES) {
18795 isGlob = token.isGlob = true;
18796 finished = true;
18797 break;
18798 }
18799 }
18800 continue;
18801 }
18802 break;
18803 }
18804 }
18805
18806 if (code === CHAR_ASTERISK) {
18807 if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
18808 isGlob = token.isGlob = true;
18809 finished = true;
18810
18811 if (scanToEnd === true) {
18812 continue;
18813 }
18814 break;
18815 }
18816
18817 if (code === CHAR_QUESTION_MARK) {
18818 isGlob = token.isGlob = true;
18819 finished = true;
18820
18821 if (scanToEnd === true) {
18822 continue;
18823 }
18824 break;
18825 }
18826
18827 if (code === CHAR_LEFT_SQUARE_BRACKET) {
18828 while (eos() !== true && (next = advance())) {
18829 if (next === CHAR_BACKWARD_SLASH) {
18830 backslashes = token.backslashes = true;
18831 advance();
18832 continue;
18833 }
18834
18835 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
18836 isBracket = token.isBracket = true;
18837 isGlob = token.isGlob = true;
18838 finished = true;
18839
18840 if (scanToEnd === true) {
18841 continue;
18842 }
18843 break;
18844 }
18845 }
18846 }
18847
18848 if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
18849 negated = token.negated = true;
18850 start++;
18851 continue;
18852 }
18853
18854 if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
18855 isGlob = token.isGlob = true;
18856
18857 if (scanToEnd === true) {
18858 while (eos() !== true && (code = advance())) {
18859 if (code === CHAR_LEFT_PARENTHESES) {
18860 backslashes = token.backslashes = true;
18861 code = advance();
18862 continue;
18863 }
18864
18865 if (code === CHAR_RIGHT_PARENTHESES) {
18866 finished = true;
18867 break;
18868 }
18869 }
18870 continue;
18871 }
18872 break;
18873 }
18874
18875 if (isGlob === true) {
18876 finished = true;
18877
18878 if (scanToEnd === true) {
18879 continue;
18880 }
18881
18882 break;
18883 }
18884 }
18885
18886 if (opts.noext === true) {
18887 isExtglob = false;
18888 isGlob = false;
18889 }
18890
18891 let base = str;
18892 let prefix = '';
18893 let glob = '';
18894
18895 if (start > 0) {
18896 prefix = str.slice(0, start);
18897 str = str.slice(start);
18898 lastIndex -= start;
18899 }
18900
18901 if (base && isGlob === true && lastIndex > 0) {
18902 base = str.slice(0, lastIndex);
18903 glob = str.slice(lastIndex);
18904 } else if (isGlob === true) {
18905 base = '';
18906 glob = str;
18907 } else {
18908 base = str;
18909 }
18910
18911 if (base && base !== '' && base !== '/' && base !== str) {
18912 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
18913 base = base.slice(0, -1);
18914 }
18915 }
18916
18917 if (opts.unescape === true) {
18918 if (glob) glob = utils.removeBackslashes(glob);
18919
18920 if (base && backslashes === true) {
18921 base = utils.removeBackslashes(base);
18922 }
18923 }
18924
18925 const state = {
18926 prefix,
18927 input,
18928 start,
18929 base,
18930 glob,
18931 isBrace,
18932 isBracket,
18933 isGlob,
18934 isExtglob,
18935 isGlobstar,
18936 negated
18937 };
18938
18939 if (opts.tokens === true) {
18940 state.maxDepth = 0;
18941 if (!isPathSeparator(code)) {
18942 tokens.push(token);
18943 }
18944 state.tokens = tokens;
18945 }
18946
18947 if (opts.parts === true || opts.tokens === true) {
18948 let prevIndex;
18949
18950 for (let idx = 0; idx < slashes.length; idx++) {
18951 const n = prevIndex ? prevIndex + 1 : start;
18952 const i = slashes[idx];
18953 const value = input.slice(n, i);
18954 if (opts.tokens) {
18955 if (idx === 0 && start !== 0) {
18956 tokens[idx].isPrefix = true;
18957 tokens[idx].value = prefix;
18958 } else {
18959 tokens[idx].value = value;
18960 }
18961 depth(tokens[idx]);
18962 state.maxDepth += tokens[idx].depth;
18963 }
18964 if (idx !== 0 || value !== '') {
18965 parts.push(value);
18966 }
18967 prevIndex = i;
18968 }
18969
18970 if (prevIndex && prevIndex + 1 < input.length) {
18971 const value = input.slice(prevIndex + 1);
18972 parts.push(value);
18973
18974 if (opts.tokens) {
18975 tokens[tokens.length - 1].value = value;
18976 depth(tokens[tokens.length - 1]);
18977 state.maxDepth += tokens[tokens.length - 1].depth;
18978 }
18979 }
18980
18981 state.slashes = slashes;
18982 state.parts = parts;
18983 }
18984
18985 return state;
18986};
18987
18988module.exports = scan;
18989
18990
18991/***/ }),
18992/* 92 */
18993/***/ (function(module, exports, __webpack_require__) {
18994
18995"use strict";
18996
18997
18998const path = __webpack_require__(13);
18999const win32 = process.platform === 'win32';
19000const {
19001 REGEX_BACKSLASH,
19002 REGEX_REMOVE_BACKSLASH,
19003 REGEX_SPECIAL_CHARS,
19004 REGEX_SPECIAL_CHARS_GLOBAL
19005} = __webpack_require__(93);
19006
19007exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
19008exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
19009exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
19010exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
19011exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
19012
19013exports.removeBackslashes = str => {
19014 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
19015 return match === '\\' ? '' : match;
19016 });
19017};
19018
19019exports.supportsLookbehinds = () => {
19020 const segs = process.version.slice(1).split('.').map(Number);
19021 if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
19022 return true;
19023 }
19024 return false;
19025};
19026
19027exports.isWindows = options => {
19028 if (options && typeof options.windows === 'boolean') {
19029 return options.windows;
19030 }
19031 return win32 === true || path.sep === '\\';
19032};
19033
19034exports.escapeLast = (input, char, lastIdx) => {
19035 const idx = input.lastIndexOf(char, lastIdx);
19036 if (idx === -1) return input;
19037 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
19038 return `${input.slice(0, idx)}\\${input.slice(idx)}`;
19039};
19040
19041exports.removePrefix = (input, state = {}) => {
19042 let output = input;
19043 if (output.startsWith('./')) {
19044 output = output.slice(2);
19045 state.prefix = './';
19046 }
19047 return output;
19048};
19049
19050exports.wrapOutput = (input, state = {}, options = {}) => {
19051 const prepend = options.contains ? '' : '^';
19052 const append = options.contains ? '' : '$';
19053
19054 let output = `${prepend}(?:${input})${append}`;
19055 if (state.negated === true) {
19056 output = `(?:^(?!${output}).*$)`;
19057 }
19058 return output;
19059};
19060
19061
19062/***/ }),
19063/* 93 */
19064/***/ (function(module, exports, __webpack_require__) {
19065
19066"use strict";
19067
19068
19069const path = __webpack_require__(13);
19070const WIN_SLASH = '\\\\/';
19071const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
19072
19073/**
19074 * Posix glob regex
19075 */
19076
19077const DOT_LITERAL = '\\.';
19078const PLUS_LITERAL = '\\+';
19079const QMARK_LITERAL = '\\?';
19080const SLASH_LITERAL = '\\/';
19081const ONE_CHAR = '(?=.)';
19082const QMARK = '[^/]';
19083const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
19084const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
19085const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
19086const NO_DOT = `(?!${DOT_LITERAL})`;
19087const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
19088const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
19089const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
19090const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
19091const STAR = `${QMARK}*?`;
19092
19093const POSIX_CHARS = {
19094 DOT_LITERAL,
19095 PLUS_LITERAL,
19096 QMARK_LITERAL,
19097 SLASH_LITERAL,
19098 ONE_CHAR,
19099 QMARK,
19100 END_ANCHOR,
19101 DOTS_SLASH,
19102 NO_DOT,
19103 NO_DOTS,
19104 NO_DOT_SLASH,
19105 NO_DOTS_SLASH,
19106 QMARK_NO_DOT,
19107 STAR,
19108 START_ANCHOR
19109};
19110
19111/**
19112 * Windows glob regex
19113 */
19114
19115const WINDOWS_CHARS = {
19116 ...POSIX_CHARS,
19117
19118 SLASH_LITERAL: `[${WIN_SLASH}]`,
19119 QMARK: WIN_NO_SLASH,
19120 STAR: `${WIN_NO_SLASH}*?`,
19121 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
19122 NO_DOT: `(?!${DOT_LITERAL})`,
19123 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
19124 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
19125 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
19126 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
19127 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
19128 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
19129};
19130
19131/**
19132 * POSIX Bracket Regex
19133 */
19134
19135const POSIX_REGEX_SOURCE = {
19136 alnum: 'a-zA-Z0-9',
19137 alpha: 'a-zA-Z',
19138 ascii: '\\x00-\\x7F',
19139 blank: ' \\t',
19140 cntrl: '\\x00-\\x1F\\x7F',
19141 digit: '0-9',
19142 graph: '\\x21-\\x7E',
19143 lower: 'a-z',
19144 print: '\\x20-\\x7E ',
19145 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
19146 space: ' \\t\\r\\n\\v\\f',
19147 upper: 'A-Z',
19148 word: 'A-Za-z0-9_',
19149 xdigit: 'A-Fa-f0-9'
19150};
19151
19152module.exports = {
19153 MAX_LENGTH: 1024 * 64,
19154 POSIX_REGEX_SOURCE,
19155
19156 // regular expressions
19157 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
19158 REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
19159 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
19160 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
19161 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
19162 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
19163
19164 // Replace globs with equivalent patterns to reduce parsing time.
19165 REPLACEMENTS: {
19166 '***': '*',
19167 '**/**': '**',
19168 '**/**/**': '**'
19169 },
19170
19171 // Digits
19172 CHAR_0: 48, /* 0 */
19173 CHAR_9: 57, /* 9 */
19174
19175 // Alphabet chars.
19176 CHAR_UPPERCASE_A: 65, /* A */
19177 CHAR_LOWERCASE_A: 97, /* a */
19178 CHAR_UPPERCASE_Z: 90, /* Z */
19179 CHAR_LOWERCASE_Z: 122, /* z */
19180
19181 CHAR_LEFT_PARENTHESES: 40, /* ( */
19182 CHAR_RIGHT_PARENTHESES: 41, /* ) */
19183
19184 CHAR_ASTERISK: 42, /* * */
19185
19186 // Non-alphabetic chars.
19187 CHAR_AMPERSAND: 38, /* & */
19188 CHAR_AT: 64, /* @ */
19189 CHAR_BACKWARD_SLASH: 92, /* \ */
19190 CHAR_CARRIAGE_RETURN: 13, /* \r */
19191 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
19192 CHAR_COLON: 58, /* : */
19193 CHAR_COMMA: 44, /* , */
19194 CHAR_DOT: 46, /* . */
19195 CHAR_DOUBLE_QUOTE: 34, /* " */
19196 CHAR_EQUAL: 61, /* = */
19197 CHAR_EXCLAMATION_MARK: 33, /* ! */
19198 CHAR_FORM_FEED: 12, /* \f */
19199 CHAR_FORWARD_SLASH: 47, /* / */
19200 CHAR_GRAVE_ACCENT: 96, /* ` */
19201 CHAR_HASH: 35, /* # */
19202 CHAR_HYPHEN_MINUS: 45, /* - */
19203 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
19204 CHAR_LEFT_CURLY_BRACE: 123, /* { */
19205 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
19206 CHAR_LINE_FEED: 10, /* \n */
19207 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
19208 CHAR_PERCENT: 37, /* % */
19209 CHAR_PLUS: 43, /* + */
19210 CHAR_QUESTION_MARK: 63, /* ? */
19211 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
19212 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
19213 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
19214 CHAR_SEMICOLON: 59, /* ; */
19215 CHAR_SINGLE_QUOTE: 39, /* ' */
19216 CHAR_SPACE: 32, /* */
19217 CHAR_TAB: 9, /* \t */
19218 CHAR_UNDERSCORE: 95, /* _ */
19219 CHAR_VERTICAL_LINE: 124, /* | */
19220 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
19221
19222 SEP: path.sep,
19223
19224 /**
19225 * Create EXTGLOB_CHARS
19226 */
19227
19228 extglobChars(chars) {
19229 return {
19230 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
19231 '?': { type: 'qmark', open: '(?:', close: ')?' },
19232 '+': { type: 'plus', open: '(?:', close: ')+' },
19233 '*': { type: 'star', open: '(?:', close: ')*' },
19234 '@': { type: 'at', open: '(?:', close: ')' }
19235 };
19236 },
19237
19238 /**
19239 * Create GLOB_CHARS
19240 */
19241
19242 globChars(win32) {
19243 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
19244 }
19245};
19246
19247
19248/***/ }),
19249/* 94 */
19250/***/ (function(module, exports, __webpack_require__) {
19251
19252"use strict";
19253
19254
19255const constants = __webpack_require__(93);
19256const utils = __webpack_require__(92);
19257
19258/**
19259 * Constants
19260 */
19261
19262const {
19263 MAX_LENGTH,
19264 POSIX_REGEX_SOURCE,
19265 REGEX_NON_SPECIAL_CHARS,
19266 REGEX_SPECIAL_CHARS_BACKREF,
19267 REPLACEMENTS
19268} = constants;
19269
19270/**
19271 * Helpers
19272 */
19273
19274const expandRange = (args, options) => {
19275 if (typeof options.expandRange === 'function') {
19276 return options.expandRange(...args, options);
19277 }
19278
19279 args.sort();
19280 const value = `[${args.join('-')}]`;
19281
19282 try {
19283 /* eslint-disable-next-line no-new */
19284 new RegExp(value);
19285 } catch (ex) {
19286 return args.map(v => utils.escapeRegex(v)).join('..');
19287 }
19288
19289 return value;
19290};
19291
19292/**
19293 * Create the message for a syntax error
19294 */
19295
19296const syntaxError = (type, char) => {
19297 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
19298};
19299
19300/**
19301 * Parse the given input string.
19302 * @param {String} input
19303 * @param {Object} options
19304 * @return {Object}
19305 */
19306
19307const parse = (input, options) => {
19308 if (typeof input !== 'string') {
19309 throw new TypeError('Expected a string');
19310 }
19311
19312 input = REPLACEMENTS[input] || input;
19313
19314 const opts = { ...options };
19315 const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
19316
19317 let len = input.length;
19318 if (len > max) {
19319 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
19320 }
19321
19322 const bos = { type: 'bos', value: '', output: opts.prepend || '' };
19323 const tokens = [bos];
19324
19325 const capture = opts.capture ? '' : '?:';
19326 const win32 = utils.isWindows(options);
19327
19328 // create constants based on platform, for windows or posix
19329 const PLATFORM_CHARS = constants.globChars(win32);
19330 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
19331
19332 const {
19333 DOT_LITERAL,
19334 PLUS_LITERAL,
19335 SLASH_LITERAL,
19336 ONE_CHAR,
19337 DOTS_SLASH,
19338 NO_DOT,
19339 NO_DOT_SLASH,
19340 NO_DOTS_SLASH,
19341 QMARK,
19342 QMARK_NO_DOT,
19343 STAR,
19344 START_ANCHOR
19345 } = PLATFORM_CHARS;
19346
19347 const globstar = (opts) => {
19348 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
19349 };
19350
19351 const nodot = opts.dot ? '' : NO_DOT;
19352 const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
19353 let star = opts.bash === true ? globstar(opts) : STAR;
19354
19355 if (opts.capture) {
19356 star = `(${star})`;
19357 }
19358
19359 // minimatch options support
19360 if (typeof opts.noext === 'boolean') {
19361 opts.noextglob = opts.noext;
19362 }
19363
19364 const state = {
19365 input,
19366 index: -1,
19367 start: 0,
19368 dot: opts.dot === true,
19369 consumed: '',
19370 output: '',
19371 prefix: '',
19372 backtrack: false,
19373 negated: false,
19374 brackets: 0,
19375 braces: 0,
19376 parens: 0,
19377 quotes: 0,
19378 globstar: false,
19379 tokens
19380 };
19381
19382 input = utils.removePrefix(input, state);
19383 len = input.length;
19384
19385 const extglobs = [];
19386 const braces = [];
19387 const stack = [];
19388 let prev = bos;
19389 let value;
19390
19391 /**
19392 * Tokenizing helpers
19393 */
19394
19395 const eos = () => state.index === len - 1;
19396 const peek = state.peek = (n = 1) => input[state.index + n];
19397 const advance = state.advance = () => input[++state.index];
19398 const remaining = () => input.slice(state.index + 1);
19399 const consume = (value = '', num = 0) => {
19400 state.consumed += value;
19401 state.index += num;
19402 };
19403 const append = token => {
19404 state.output += token.output != null ? token.output : token.value;
19405 consume(token.value);
19406 };
19407
19408 const negate = () => {
19409 let count = 1;
19410
19411 while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
19412 advance();
19413 state.start++;
19414 count++;
19415 }
19416
19417 if (count % 2 === 0) {
19418 return false;
19419 }
19420
19421 state.negated = true;
19422 state.start++;
19423 return true;
19424 };
19425
19426 const increment = type => {
19427 state[type]++;
19428 stack.push(type);
19429 };
19430
19431 const decrement = type => {
19432 state[type]--;
19433 stack.pop();
19434 };
19435
19436 /**
19437 * Push tokens onto the tokens array. This helper speeds up
19438 * tokenizing by 1) helping us avoid backtracking as much as possible,
19439 * and 2) helping us avoid creating extra tokens when consecutive
19440 * characters are plain text. This improves performance and simplifies
19441 * lookbehinds.
19442 */
19443
19444 const push = tok => {
19445 if (prev.type === 'globstar') {
19446 const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
19447 const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
19448
19449 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
19450 state.output = state.output.slice(0, -prev.output.length);
19451 prev.type = 'star';
19452 prev.value = '*';
19453 prev.output = star;
19454 state.output += prev.output;
19455 }
19456 }
19457
19458 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
19459 extglobs[extglobs.length - 1].inner += tok.value;
19460 }
19461
19462 if (tok.value || tok.output) append(tok);
19463 if (prev && prev.type === 'text' && tok.type === 'text') {
19464 prev.value += tok.value;
19465 prev.output = (prev.output || '') + tok.value;
19466 return;
19467 }
19468
19469 tok.prev = prev;
19470 tokens.push(tok);
19471 prev = tok;
19472 };
19473
19474 const extglobOpen = (type, value) => {
19475 const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
19476
19477 token.prev = prev;
19478 token.parens = state.parens;
19479 token.output = state.output;
19480 const output = (opts.capture ? '(' : '') + token.open;
19481
19482 increment('parens');
19483 push({ type, value, output: state.output ? '' : ONE_CHAR });
19484 push({ type: 'paren', extglob: true, value: advance(), output });
19485 extglobs.push(token);
19486 };
19487
19488 const extglobClose = token => {
19489 let output = token.close + (opts.capture ? ')' : '');
19490
19491 if (token.type === 'negate') {
19492 let extglobStar = star;
19493
19494 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
19495 extglobStar = globstar(opts);
19496 }
19497
19498 if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
19499 output = token.close = `)$))${extglobStar}`;
19500 }
19501
19502 if (token.prev.type === 'bos' && eos()) {
19503 state.negatedExtglob = true;
19504 }
19505 }
19506
19507 push({ type: 'paren', extglob: true, value, output });
19508 decrement('parens');
19509 };
19510
19511 /**
19512 * Fast paths
19513 */
19514
19515 if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
19516 let backslashes = false;
19517
19518 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
19519 if (first === '\\') {
19520 backslashes = true;
19521 return m;
19522 }
19523
19524 if (first === '?') {
19525 if (esc) {
19526 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
19527 }
19528 if (index === 0) {
19529 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
19530 }
19531 return QMARK.repeat(chars.length);
19532 }
19533
19534 if (first === '.') {
19535 return DOT_LITERAL.repeat(chars.length);
19536 }
19537
19538 if (first === '*') {
19539 if (esc) {
19540 return esc + first + (rest ? star : '');
19541 }
19542 return star;
19543 }
19544 return esc ? m : `\\${m}`;
19545 });
19546
19547 if (backslashes === true) {
19548 if (opts.unescape === true) {
19549 output = output.replace(/\\/g, '');
19550 } else {
19551 output = output.replace(/\\+/g, m => {
19552 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
19553 });
19554 }
19555 }
19556
19557 if (output === input && opts.contains === true) {
19558 state.output = input;
19559 return state;
19560 }
19561
19562 state.output = utils.wrapOutput(output, state, options);
19563 return state;
19564 }
19565
19566 /**
19567 * Tokenize input until we reach end-of-string
19568 */
19569
19570 while (!eos()) {
19571 value = advance();
19572
19573 if (value === '\u0000') {
19574 continue;
19575 }
19576
19577 /**
19578 * Escaped characters
19579 */
19580
19581 if (value === '\\') {
19582 const next = peek();
19583
19584 if (next === '/' && opts.bash !== true) {
19585 continue;
19586 }
19587
19588 if (next === '.' || next === ';') {
19589 continue;
19590 }
19591
19592 if (!next) {
19593 value += '\\';
19594 push({ type: 'text', value });
19595 continue;
19596 }
19597
19598 // collapse slashes to reduce potential for exploits
19599 const match = /^\\+/.exec(remaining());
19600 let slashes = 0;
19601
19602 if (match && match[0].length > 2) {
19603 slashes = match[0].length;
19604 state.index += slashes;
19605 if (slashes % 2 !== 0) {
19606 value += '\\';
19607 }
19608 }
19609
19610 if (opts.unescape === true) {
19611 value = advance() || '';
19612 } else {
19613 value += advance() || '';
19614 }
19615
19616 if (state.brackets === 0) {
19617 push({ type: 'text', value });
19618 continue;
19619 }
19620 }
19621
19622 /**
19623 * If we're inside a regex character class, continue
19624 * until we reach the closing bracket.
19625 */
19626
19627 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
19628 if (opts.posix !== false && value === ':') {
19629 const inner = prev.value.slice(1);
19630 if (inner.includes('[')) {
19631 prev.posix = true;
19632
19633 if (inner.includes(':')) {
19634 const idx = prev.value.lastIndexOf('[');
19635 const pre = prev.value.slice(0, idx);
19636 const rest = prev.value.slice(idx + 2);
19637 const posix = POSIX_REGEX_SOURCE[rest];
19638 if (posix) {
19639 prev.value = pre + posix;
19640 state.backtrack = true;
19641 advance();
19642
19643 if (!bos.output && tokens.indexOf(prev) === 1) {
19644 bos.output = ONE_CHAR;
19645 }
19646 continue;
19647 }
19648 }
19649 }
19650 }
19651
19652 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
19653 value = `\\${value}`;
19654 }
19655
19656 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
19657 value = `\\${value}`;
19658 }
19659
19660 if (opts.posix === true && value === '!' && prev.value === '[') {
19661 value = '^';
19662 }
19663
19664 prev.value += value;
19665 append({ value });
19666 continue;
19667 }
19668
19669 /**
19670 * If we're inside a quoted string, continue
19671 * until we reach the closing double quote.
19672 */
19673
19674 if (state.quotes === 1 && value !== '"') {
19675 value = utils.escapeRegex(value);
19676 prev.value += value;
19677 append({ value });
19678 continue;
19679 }
19680
19681 /**
19682 * Double quotes
19683 */
19684
19685 if (value === '"') {
19686 state.quotes = state.quotes === 1 ? 0 : 1;
19687 if (opts.keepQuotes === true) {
19688 push({ type: 'text', value });
19689 }
19690 continue;
19691 }
19692
19693 /**
19694 * Parentheses
19695 */
19696
19697 if (value === '(') {
19698 increment('parens');
19699 push({ type: 'paren', value });
19700 continue;
19701 }
19702
19703 if (value === ')') {
19704 if (state.parens === 0 && opts.strictBrackets === true) {
19705 throw new SyntaxError(syntaxError('opening', '('));
19706 }
19707
19708 const extglob = extglobs[extglobs.length - 1];
19709 if (extglob && state.parens === extglob.parens + 1) {
19710 extglobClose(extglobs.pop());
19711 continue;
19712 }
19713
19714 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
19715 decrement('parens');
19716 continue;
19717 }
19718
19719 /**
19720 * Square brackets
19721 */
19722
19723 if (value === '[') {
19724 if (opts.nobracket === true || !remaining().includes(']')) {
19725 if (opts.nobracket !== true && opts.strictBrackets === true) {
19726 throw new SyntaxError(syntaxError('closing', ']'));
19727 }
19728
19729 value = `\\${value}`;
19730 } else {
19731 increment('brackets');
19732 }
19733
19734 push({ type: 'bracket', value });
19735 continue;
19736 }
19737
19738 if (value === ']') {
19739 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
19740 push({ type: 'text', value, output: `\\${value}` });
19741 continue;
19742 }
19743
19744 if (state.brackets === 0) {
19745 if (opts.strictBrackets === true) {
19746 throw new SyntaxError(syntaxError('opening', '['));
19747 }
19748
19749 push({ type: 'text', value, output: `\\${value}` });
19750 continue;
19751 }
19752
19753 decrement('brackets');
19754
19755 const prevValue = prev.value.slice(1);
19756 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
19757 value = `/${value}`;
19758 }
19759
19760 prev.value += value;
19761 append({ value });
19762
19763 // when literal brackets are explicitly disabled
19764 // assume we should match with a regex character class
19765 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
19766 continue;
19767 }
19768
19769 const escaped = utils.escapeRegex(prev.value);
19770 state.output = state.output.slice(0, -prev.value.length);
19771
19772 // when literal brackets are explicitly enabled
19773 // assume we should escape the brackets to match literal characters
19774 if (opts.literalBrackets === true) {
19775 state.output += escaped;
19776 prev.value = escaped;
19777 continue;
19778 }
19779
19780 // when the user specifies nothing, try to match both
19781 prev.value = `(${capture}${escaped}|${prev.value})`;
19782 state.output += prev.value;
19783 continue;
19784 }
19785
19786 /**
19787 * Braces
19788 */
19789
19790 if (value === '{' && opts.nobrace !== true) {
19791 increment('braces');
19792
19793 const open = {
19794 type: 'brace',
19795 value,
19796 output: '(',
19797 outputIndex: state.output.length,
19798 tokensIndex: state.tokens.length
19799 };
19800
19801 braces.push(open);
19802 push(open);
19803 continue;
19804 }
19805
19806 if (value === '}') {
19807 const brace = braces[braces.length - 1];
19808
19809 if (opts.nobrace === true || !brace) {
19810 push({ type: 'text', value, output: value });
19811 continue;
19812 }
19813
19814 let output = ')';
19815
19816 if (brace.dots === true) {
19817 const arr = tokens.slice();
19818 const range = [];
19819
19820 for (let i = arr.length - 1; i >= 0; i--) {
19821 tokens.pop();
19822 if (arr[i].type === 'brace') {
19823 break;
19824 }
19825 if (arr[i].type !== 'dots') {
19826 range.unshift(arr[i].value);
19827 }
19828 }
19829
19830 output = expandRange(range, opts);
19831 state.backtrack = true;
19832 }
19833
19834 if (brace.comma !== true && brace.dots !== true) {
19835 const out = state.output.slice(0, brace.outputIndex);
19836 const toks = state.tokens.slice(brace.tokensIndex);
19837 brace.value = brace.output = '\\{';
19838 value = output = '\\}';
19839 state.output = out;
19840 for (const t of toks) {
19841 state.output += (t.output || t.value);
19842 }
19843 }
19844
19845 push({ type: 'brace', value, output });
19846 decrement('braces');
19847 braces.pop();
19848 continue;
19849 }
19850
19851 /**
19852 * Pipes
19853 */
19854
19855 if (value === '|') {
19856 if (extglobs.length > 0) {
19857 extglobs[extglobs.length - 1].conditions++;
19858 }
19859 push({ type: 'text', value });
19860 continue;
19861 }
19862
19863 /**
19864 * Commas
19865 */
19866
19867 if (value === ',') {
19868 let output = value;
19869
19870 const brace = braces[braces.length - 1];
19871 if (brace && stack[stack.length - 1] === 'braces') {
19872 brace.comma = true;
19873 output = '|';
19874 }
19875
19876 push({ type: 'comma', value, output });
19877 continue;
19878 }
19879
19880 /**
19881 * Slashes
19882 */
19883
19884 if (value === '/') {
19885 // if the beginning of the glob is "./", advance the start
19886 // to the current index, and don't add the "./" characters
19887 // to the state. This greatly simplifies lookbehinds when
19888 // checking for BOS characters like "!" and "." (not "./")
19889 if (prev.type === 'dot' && state.index === state.start + 1) {
19890 state.start = state.index + 1;
19891 state.consumed = '';
19892 state.output = '';
19893 tokens.pop();
19894 prev = bos; // reset "prev" to the first token
19895 continue;
19896 }
19897
19898 push({ type: 'slash', value, output: SLASH_LITERAL });
19899 continue;
19900 }
19901
19902 /**
19903 * Dots
19904 */
19905
19906 if (value === '.') {
19907 if (state.braces > 0 && prev.type === 'dot') {
19908 if (prev.value === '.') prev.output = DOT_LITERAL;
19909 const brace = braces[braces.length - 1];
19910 prev.type = 'dots';
19911 prev.output += value;
19912 prev.value += value;
19913 brace.dots = true;
19914 continue;
19915 }
19916
19917 if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
19918 push({ type: 'text', value, output: DOT_LITERAL });
19919 continue;
19920 }
19921
19922 push({ type: 'dot', value, output: DOT_LITERAL });
19923 continue;
19924 }
19925
19926 /**
19927 * Question marks
19928 */
19929
19930 if (value === '?') {
19931 const isGroup = prev && prev.value === '(';
19932 if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
19933 extglobOpen('qmark', value);
19934 continue;
19935 }
19936
19937 if (prev && prev.type === 'paren') {
19938 const next = peek();
19939 let output = value;
19940
19941 if (next === '<' && !utils.supportsLookbehinds()) {
19942 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
19943 }
19944
19945 if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
19946 output = `\\${value}`;
19947 }
19948
19949 push({ type: 'text', value, output });
19950 continue;
19951 }
19952
19953 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
19954 push({ type: 'qmark', value, output: QMARK_NO_DOT });
19955 continue;
19956 }
19957
19958 push({ type: 'qmark', value, output: QMARK });
19959 continue;
19960 }
19961
19962 /**
19963 * Exclamation
19964 */
19965
19966 if (value === '!') {
19967 if (opts.noextglob !== true && peek() === '(') {
19968 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
19969 extglobOpen('negate', value);
19970 continue;
19971 }
19972 }
19973
19974 if (opts.nonegate !== true && state.index === 0) {
19975 negate();
19976 continue;
19977 }
19978 }
19979
19980 /**
19981 * Plus
19982 */
19983
19984 if (value === '+') {
19985 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
19986 extglobOpen('plus', value);
19987 continue;
19988 }
19989
19990 if ((prev && prev.value === '(') || opts.regex === false) {
19991 push({ type: 'plus', value, output: PLUS_LITERAL });
19992 continue;
19993 }
19994
19995 if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
19996 push({ type: 'plus', value });
19997 continue;
19998 }
19999
20000 push({ type: 'plus', value: PLUS_LITERAL });
20001 continue;
20002 }
20003
20004 /**
20005 * Plain text
20006 */
20007
20008 if (value === '@') {
20009 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
20010 push({ type: 'at', extglob: true, value, output: '' });
20011 continue;
20012 }
20013
20014 push({ type: 'text', value });
20015 continue;
20016 }
20017
20018 /**
20019 * Plain text
20020 */
20021
20022 if (value !== '*') {
20023 if (value === '$' || value === '^') {
20024 value = `\\${value}`;
20025 }
20026
20027 const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
20028 if (match) {
20029 value += match[0];
20030 state.index += match[0].length;
20031 }
20032
20033 push({ type: 'text', value });
20034 continue;
20035 }
20036
20037 /**
20038 * Stars
20039 */
20040
20041 if (prev && (prev.type === 'globstar' || prev.star === true)) {
20042 prev.type = 'star';
20043 prev.star = true;
20044 prev.value += value;
20045 prev.output = star;
20046 state.backtrack = true;
20047 state.globstar = true;
20048 consume(value);
20049 continue;
20050 }
20051
20052 let rest = remaining();
20053 if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
20054 extglobOpen('star', value);
20055 continue;
20056 }
20057
20058 if (prev.type === 'star') {
20059 if (opts.noglobstar === true) {
20060 consume(value);
20061 continue;
20062 }
20063
20064 const prior = prev.prev;
20065 const before = prior.prev;
20066 const isStart = prior.type === 'slash' || prior.type === 'bos';
20067 const afterStar = before && (before.type === 'star' || before.type === 'globstar');
20068
20069 if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
20070 push({ type: 'star', value, output: '' });
20071 continue;
20072 }
20073
20074 const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
20075 const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
20076 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
20077 push({ type: 'star', value, output: '' });
20078 continue;
20079 }
20080
20081 // strip consecutive `/**/`
20082 while (rest.slice(0, 3) === '/**') {
20083 const after = input[state.index + 4];
20084 if (after && after !== '/') {
20085 break;
20086 }
20087 rest = rest.slice(3);
20088 consume('/**', 3);
20089 }
20090
20091 if (prior.type === 'bos' && eos()) {
20092 prev.type = 'globstar';
20093 prev.value += value;
20094 prev.output = globstar(opts);
20095 state.output = prev.output;
20096 state.globstar = true;
20097 consume(value);
20098 continue;
20099 }
20100
20101 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
20102 state.output = state.output.slice(0, -(prior.output + prev.output).length);
20103 prior.output = `(?:${prior.output}`;
20104
20105 prev.type = 'globstar';
20106 prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
20107 prev.value += value;
20108 state.globstar = true;
20109 state.output += prior.output + prev.output;
20110 consume(value);
20111 continue;
20112 }
20113
20114 if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
20115 const end = rest[1] !== void 0 ? '|$' : '';
20116
20117 state.output = state.output.slice(0, -(prior.output + prev.output).length);
20118 prior.output = `(?:${prior.output}`;
20119
20120 prev.type = 'globstar';
20121 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
20122 prev.value += value;
20123
20124 state.output += prior.output + prev.output;
20125 state.globstar = true;
20126
20127 consume(value + advance());
20128
20129 push({ type: 'slash', value: '/', output: '' });
20130 continue;
20131 }
20132
20133 if (prior.type === 'bos' && rest[0] === '/') {
20134 prev.type = 'globstar';
20135 prev.value += value;
20136 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
20137 state.output = prev.output;
20138 state.globstar = true;
20139 consume(value + advance());
20140 push({ type: 'slash', value: '/', output: '' });
20141 continue;
20142 }
20143
20144 // remove single star from output
20145 state.output = state.output.slice(0, -prev.output.length);
20146
20147 // reset previous token to globstar
20148 prev.type = 'globstar';
20149 prev.output = globstar(opts);
20150 prev.value += value;
20151
20152 // reset output with globstar
20153 state.output += prev.output;
20154 state.globstar = true;
20155 consume(value);
20156 continue;
20157 }
20158
20159 const token = { type: 'star', value, output: star };
20160
20161 if (opts.bash === true) {
20162 token.output = '.*?';
20163 if (prev.type === 'bos' || prev.type === 'slash') {
20164 token.output = nodot + token.output;
20165 }
20166 push(token);
20167 continue;
20168 }
20169
20170 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
20171 token.output = value;
20172 push(token);
20173 continue;
20174 }
20175
20176 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
20177 if (prev.type === 'dot') {
20178 state.output += NO_DOT_SLASH;
20179 prev.output += NO_DOT_SLASH;
20180
20181 } else if (opts.dot === true) {
20182 state.output += NO_DOTS_SLASH;
20183 prev.output += NO_DOTS_SLASH;
20184
20185 } else {
20186 state.output += nodot;
20187 prev.output += nodot;
20188 }
20189
20190 if (peek() !== '*') {
20191 state.output += ONE_CHAR;
20192 prev.output += ONE_CHAR;
20193 }
20194 }
20195
20196 push(token);
20197 }
20198
20199 while (state.brackets > 0) {
20200 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
20201 state.output = utils.escapeLast(state.output, '[');
20202 decrement('brackets');
20203 }
20204
20205 while (state.parens > 0) {
20206 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
20207 state.output = utils.escapeLast(state.output, '(');
20208 decrement('parens');
20209 }
20210
20211 while (state.braces > 0) {
20212 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
20213 state.output = utils.escapeLast(state.output, '{');
20214 decrement('braces');
20215 }
20216
20217 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
20218 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
20219 }
20220
20221 // rebuild the output if we had to backtrack at any point
20222 if (state.backtrack === true) {
20223 state.output = '';
20224
20225 for (const token of state.tokens) {
20226 state.output += token.output != null ? token.output : token.value;
20227
20228 if (token.suffix) {
20229 state.output += token.suffix;
20230 }
20231 }
20232 }
20233
20234 return state;
20235};
20236
20237/**
20238 * Fast paths for creating regular expressions for common glob patterns.
20239 * This can significantly speed up processing and has very little downside
20240 * impact when none of the fast paths match.
20241 */
20242
20243parse.fastpaths = (input, options) => {
20244 const opts = { ...options };
20245 const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
20246 const len = input.length;
20247 if (len > max) {
20248 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
20249 }
20250
20251 input = REPLACEMENTS[input] || input;
20252 const win32 = utils.isWindows(options);
20253
20254 // create constants based on platform, for windows or posix
20255 const {
20256 DOT_LITERAL,
20257 SLASH_LITERAL,
20258 ONE_CHAR,
20259 DOTS_SLASH,
20260 NO_DOT,
20261 NO_DOTS,
20262 NO_DOTS_SLASH,
20263 STAR,
20264 START_ANCHOR
20265 } = constants.globChars(win32);
20266
20267 const nodot = opts.dot ? NO_DOTS : NO_DOT;
20268 const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
20269 const capture = opts.capture ? '' : '?:';
20270 const state = { negated: false, prefix: '' };
20271 let star = opts.bash === true ? '.*?' : STAR;
20272
20273 if (opts.capture) {
20274 star = `(${star})`;
20275 }
20276
20277 const globstar = (opts) => {
20278 if (opts.noglobstar === true) return star;
20279 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
20280 };
20281
20282 const create = str => {
20283 switch (str) {
20284 case '*':
20285 return `${nodot}${ONE_CHAR}${star}`;
20286
20287 case '.*':
20288 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
20289
20290 case '*.*':
20291 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
20292
20293 case '*/*':
20294 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
20295
20296 case '**':
20297 return nodot + globstar(opts);
20298
20299 case '**/*':
20300 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
20301
20302 case '**/*.*':
20303 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
20304
20305 case '**/.*':
20306 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
20307
20308 default: {
20309 const match = /^(.*?)\.(\w+)$/.exec(str);
20310 if (!match) return;
20311
20312 const source = create(match[1]);
20313 if (!source) return;
20314
20315 return source + DOT_LITERAL + match[2];
20316 }
20317 }
20318 };
20319
20320 const output = utils.removePrefix(input, state);
20321 let source = create(output);
20322
20323 if (source && opts.strictSlashes !== true) {
20324 source += `${SLASH_LITERAL}?`;
20325 }
20326
20327 return source;
20328};
20329
20330module.exports = parse;
20331
20332
20333/***/ }),
20334/* 95 */
20335/***/ (function(module, exports, __webpack_require__) {
20336
20337"use strict";
20338
20339Object.defineProperty(exports, "__esModule", { value: true });
20340const merge2 = __webpack_require__(96);
20341function merge(streams) {
20342 const mergedStream = merge2(streams);
20343 streams.forEach((stream) => {
20344 stream.once('error', (error) => mergedStream.emit('error', error));
20345 });
20346 mergedStream.once('close', () => propagateCloseEventToSources(streams));
20347 mergedStream.once('end', () => propagateCloseEventToSources(streams));
20348 return mergedStream;
20349}
20350exports.merge = merge;
20351function propagateCloseEventToSources(streams) {
20352 streams.forEach((stream) => stream.emit('close'));
20353}
20354
20355
20356/***/ }),
20357/* 96 */
20358/***/ (function(module, exports, __webpack_require__) {
20359
20360"use strict";
20361
20362/*
20363 * merge2
20364 * https://github.com/teambition/merge2
20365 *
20366 * Copyright (c) 2014-2016 Teambition
20367 * Licensed under the MIT license.
20368 */
20369const Stream = __webpack_require__(97)
20370const PassThrough = Stream.PassThrough
20371const slice = Array.prototype.slice
20372
20373module.exports = merge2
20374
20375function merge2 () {
20376 const streamsQueue = []
20377 let merging = false
20378 const args = slice.call(arguments)
20379 let options = args[args.length - 1]
20380
20381 if (options && !Array.isArray(options) && options.pipe == null) args.pop()
20382 else options = {}
20383
20384 const doEnd = options.end !== false
20385 if (options.objectMode == null) options.objectMode = true
20386 if (options.highWaterMark == null) options.highWaterMark = 64 * 1024
20387 const mergedStream = PassThrough(options)
20388
20389 function addStream () {
20390 for (let i = 0, len = arguments.length; i < len; i++) {
20391 streamsQueue.push(pauseStreams(arguments[i], options))
20392 }
20393 mergeStream()
20394 return this
20395 }
20396
20397 function mergeStream () {
20398 if (merging) return
20399 merging = true
20400
20401 let streams = streamsQueue.shift()
20402 if (!streams) {
20403 process.nextTick(endStream)
20404 return
20405 }
20406 if (!Array.isArray(streams)) streams = [streams]
20407
20408 let pipesCount = streams.length + 1
20409
20410 function next () {
20411 if (--pipesCount > 0) return
20412 merging = false
20413 mergeStream()
20414 }
20415
20416 function pipe (stream) {
20417 function onend () {
20418 stream.removeListener('merge2UnpipeEnd', onend)
20419 stream.removeListener('end', onend)
20420 next()
20421 }
20422 // skip ended stream
20423 if (stream._readableState.endEmitted) return next()
20424
20425 stream.on('merge2UnpipeEnd', onend)
20426 stream.on('end', onend)
20427 stream.pipe(mergedStream, { end: false })
20428 // compatible for old stream
20429 stream.resume()
20430 }
20431
20432 for (let i = 0; i < streams.length; i++) pipe(streams[i])
20433
20434 next()
20435 }
20436
20437 function endStream () {
20438 merging = false
20439 // emit 'queueDrain' when all streams merged.
20440 mergedStream.emit('queueDrain')
20441 return doEnd && mergedStream.end()
20442 }
20443
20444 mergedStream.setMaxListeners(0)
20445 mergedStream.add = addStream
20446 mergedStream.on('unpipe', function (stream) {
20447 stream.emit('merge2UnpipeEnd')
20448 })
20449
20450 if (args.length) addStream.apply(null, args)
20451 return mergedStream
20452}
20453
20454// check and pause streams for pipe.
20455function pauseStreams (streams, options) {
20456 if (!Array.isArray(streams)) {
20457 // Backwards-compat with old-style streams
20458 if (!streams._readableState && streams.pipe) streams = streams.pipe(PassThrough(options))
20459 if (!streams._readableState || !streams.pause || !streams.pipe) {
20460 throw new Error('Only readable stream can be merged.')
20461 }
20462 streams.pause()
20463 } else {
20464 for (let i = 0, len = streams.length; i < len; i++) streams[i] = pauseStreams(streams[i], options)
20465 }
20466 return streams
20467}
20468
20469
20470/***/ }),
20471/* 97 */
20472/***/ (function(module, exports) {
20473
20474module.exports = require("stream");
20475
20476/***/ }),
20477/* 98 */
20478/***/ (function(module, exports, __webpack_require__) {
20479
20480"use strict";
20481
20482Object.defineProperty(exports, "__esModule", { value: true });
20483function isString(input) {
20484 return typeof input === 'string';
20485}
20486exports.isString = isString;
20487function isEmpty(input) {
20488 return input === '';
20489}
20490exports.isEmpty = isEmpty;
20491
20492
20493/***/ }),
20494/* 99 */
20495/***/ (function(module, exports, __webpack_require__) {
20496
20497"use strict";
20498
20499Object.defineProperty(exports, "__esModule", { value: true });
20500const stream_1 = __webpack_require__(100);
20501const provider_1 = __webpack_require__(127);
20502class ProviderAsync extends provider_1.default {
20503 constructor() {
20504 super(...arguments);
20505 this._reader = new stream_1.default(this._settings);
20506 }
20507 read(task) {
20508 const root = this._getRootDirectory(task);
20509 const options = this._getReaderOptions(task);
20510 const entries = [];
20511 return new Promise((resolve, reject) => {
20512 const stream = this.api(root, task, options);
20513 stream.once('error', reject);
20514 stream.on('data', (entry) => entries.push(options.transform(entry)));
20515 stream.once('end', () => resolve(entries));
20516 });
20517 }
20518 api(root, task, options) {
20519 if (task.dynamic) {
20520 return this._reader.dynamic(root, options);
20521 }
20522 return this._reader.static(task.patterns, options);
20523 }
20524}
20525exports.default = ProviderAsync;
20526
20527
20528/***/ }),
20529/* 100 */
20530/***/ (function(module, exports, __webpack_require__) {
20531
20532"use strict";
20533
20534Object.defineProperty(exports, "__esModule", { value: true });
20535const stream_1 = __webpack_require__(97);
20536const fsStat = __webpack_require__(101);
20537const fsWalk = __webpack_require__(106);
20538const reader_1 = __webpack_require__(126);
20539class ReaderStream extends reader_1.default {
20540 constructor() {
20541 super(...arguments);
20542 this._walkStream = fsWalk.walkStream;
20543 this._stat = fsStat.stat;
20544 }
20545 dynamic(root, options) {
20546 return this._walkStream(root, options);
20547 }
20548 static(patterns, options) {
20549 const filepaths = patterns.map(this._getFullEntryPath, this);
20550 const stream = new stream_1.PassThrough({ objectMode: true });
20551 stream._write = (index, _enc, done) => {
20552 return this._getEntry(filepaths[index], patterns[index], options)
20553 .then((entry) => {
20554 if (entry !== null && options.entryFilter(entry)) {
20555 stream.push(entry);
20556 }
20557 if (index === filepaths.length - 1) {
20558 stream.end();
20559 }
20560 done();
20561 })
20562 .catch(done);
20563 };
20564 for (let i = 0; i < filepaths.length; i++) {
20565 stream.write(i);
20566 }
20567 return stream;
20568 }
20569 _getEntry(filepath, pattern, options) {
20570 return this._getStat(filepath)
20571 .then((stats) => this._makeEntry(stats, pattern))
20572 .catch((error) => {
20573 if (options.errorFilter(error)) {
20574 return null;
20575 }
20576 throw error;
20577 });
20578 }
20579 _getStat(filepath) {
20580 return new Promise((resolve, reject) => {
20581 this._stat(filepath, this._fsStatSettings, (error, stats) => {
20582 return error === null ? resolve(stats) : reject(error);
20583 });
20584 });
20585 }
20586}
20587exports.default = ReaderStream;
20588
20589
20590/***/ }),
20591/* 101 */
20592/***/ (function(module, exports, __webpack_require__) {
20593
20594"use strict";
20595
20596Object.defineProperty(exports, "__esModule", { value: true });
20597const async = __webpack_require__(102);
20598const sync = __webpack_require__(103);
20599const settings_1 = __webpack_require__(104);
20600exports.Settings = settings_1.default;
20601function stat(path, optionsOrSettingsOrCallback, callback) {
20602 if (typeof optionsOrSettingsOrCallback === 'function') {
20603 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
20604 }
20605 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
20606}
20607exports.stat = stat;
20608function statSync(path, optionsOrSettings) {
20609 const settings = getSettings(optionsOrSettings);
20610 return sync.read(path, settings);
20611}
20612exports.statSync = statSync;
20613function getSettings(settingsOrOptions = {}) {
20614 if (settingsOrOptions instanceof settings_1.default) {
20615 return settingsOrOptions;
20616 }
20617 return new settings_1.default(settingsOrOptions);
20618}
20619
20620
20621/***/ }),
20622/* 102 */
20623/***/ (function(module, exports, __webpack_require__) {
20624
20625"use strict";
20626
20627Object.defineProperty(exports, "__esModule", { value: true });
20628function read(path, settings, callback) {
20629 settings.fs.lstat(path, (lstatError, lstat) => {
20630 if (lstatError !== null) {
20631 return callFailureCallback(callback, lstatError);
20632 }
20633 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
20634 return callSuccessCallback(callback, lstat);
20635 }
20636 settings.fs.stat(path, (statError, stat) => {
20637 if (statError !== null) {
20638 if (settings.throwErrorOnBrokenSymbolicLink) {
20639 return callFailureCallback(callback, statError);
20640 }
20641 return callSuccessCallback(callback, lstat);
20642 }
20643 if (settings.markSymbolicLink) {
20644 stat.isSymbolicLink = () => true;
20645 }
20646 callSuccessCallback(callback, stat);
20647 });
20648 });
20649}
20650exports.read = read;
20651function callFailureCallback(callback, error) {
20652 callback(error);
20653}
20654function callSuccessCallback(callback, result) {
20655 callback(null, result);
20656}
20657
20658
20659/***/ }),
20660/* 103 */
20661/***/ (function(module, exports, __webpack_require__) {
20662
20663"use strict";
20664
20665Object.defineProperty(exports, "__esModule", { value: true });
20666function read(path, settings) {
20667 const lstat = settings.fs.lstatSync(path);
20668 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
20669 return lstat;
20670 }
20671 try {
20672 const stat = settings.fs.statSync(path);
20673 if (settings.markSymbolicLink) {
20674 stat.isSymbolicLink = () => true;
20675 }
20676 return stat;
20677 }
20678 catch (error) {
20679 if (!settings.throwErrorOnBrokenSymbolicLink) {
20680 return lstat;
20681 }
20682 throw error;
20683 }
20684}
20685exports.read = read;
20686
20687
20688/***/ }),
20689/* 104 */
20690/***/ (function(module, exports, __webpack_require__) {
20691
20692"use strict";
20693
20694Object.defineProperty(exports, "__esModule", { value: true });
20695const fs = __webpack_require__(105);
20696class Settings {
20697 constructor(_options = {}) {
20698 this._options = _options;
20699 this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
20700 this.fs = fs.createFileSystemAdapter(this._options.fs);
20701 this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
20702 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
20703 }
20704 _getValue(option, value) {
20705 return option === undefined ? value : option;
20706 }
20707}
20708exports.default = Settings;
20709
20710
20711/***/ }),
20712/* 105 */
20713/***/ (function(module, exports, __webpack_require__) {
20714
20715"use strict";
20716
20717Object.defineProperty(exports, "__esModule", { value: true });
20718const fs = __webpack_require__(40);
20719exports.FILE_SYSTEM_ADAPTER = {
20720 lstat: fs.lstat,
20721 stat: fs.stat,
20722 lstatSync: fs.lstatSync,
20723 statSync: fs.statSync
20724};
20725function createFileSystemAdapter(fsMethods) {
20726 if (fsMethods === undefined) {
20727 return exports.FILE_SYSTEM_ADAPTER;
20728 }
20729 return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
20730}
20731exports.createFileSystemAdapter = createFileSystemAdapter;
20732
20733
20734/***/ }),
20735/* 106 */
20736/***/ (function(module, exports, __webpack_require__) {
20737
20738"use strict";
20739
20740Object.defineProperty(exports, "__esModule", { value: true });
20741const async_1 = __webpack_require__(107);
20742const stream_1 = __webpack_require__(122);
20743const sync_1 = __webpack_require__(123);
20744const settings_1 = __webpack_require__(125);
20745exports.Settings = settings_1.default;
20746function walk(directory, optionsOrSettingsOrCallback, callback) {
20747 if (typeof optionsOrSettingsOrCallback === 'function') {
20748 return new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
20749 }
20750 new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
20751}
20752exports.walk = walk;
20753function walkSync(directory, optionsOrSettings) {
20754 const settings = getSettings(optionsOrSettings);
20755 const provider = new sync_1.default(directory, settings);
20756 return provider.read();
20757}
20758exports.walkSync = walkSync;
20759function walkStream(directory, optionsOrSettings) {
20760 const settings = getSettings(optionsOrSettings);
20761 const provider = new stream_1.default(directory, settings);
20762 return provider.read();
20763}
20764exports.walkStream = walkStream;
20765function getSettings(settingsOrOptions = {}) {
20766 if (settingsOrOptions instanceof settings_1.default) {
20767 return settingsOrOptions;
20768 }
20769 return new settings_1.default(settingsOrOptions);
20770}
20771
20772
20773/***/ }),
20774/* 107 */
20775/***/ (function(module, exports, __webpack_require__) {
20776
20777"use strict";
20778
20779Object.defineProperty(exports, "__esModule", { value: true });
20780const async_1 = __webpack_require__(108);
20781class AsyncProvider {
20782 constructor(_root, _settings) {
20783 this._root = _root;
20784 this._settings = _settings;
20785 this._reader = new async_1.default(this._root, this._settings);
20786 this._storage = new Set();
20787 }
20788 read(callback) {
20789 this._reader.onError((error) => {
20790 callFailureCallback(callback, error);
20791 });
20792 this._reader.onEntry((entry) => {
20793 this._storage.add(entry);
20794 });
20795 this._reader.onEnd(() => {
20796 callSuccessCallback(callback, [...this._storage]);
20797 });
20798 this._reader.read();
20799 }
20800}
20801exports.default = AsyncProvider;
20802function callFailureCallback(callback, error) {
20803 callback(error);
20804}
20805function callSuccessCallback(callback, entries) {
20806 callback(null, entries);
20807}
20808
20809
20810/***/ }),
20811/* 108 */
20812/***/ (function(module, exports, __webpack_require__) {
20813
20814"use strict";
20815
20816Object.defineProperty(exports, "__esModule", { value: true });
20817const events_1 = __webpack_require__(52);
20818const fsScandir = __webpack_require__(109);
20819const fastq = __webpack_require__(118);
20820const common = __webpack_require__(120);
20821const reader_1 = __webpack_require__(121);
20822class AsyncReader extends reader_1.default {
20823 constructor(_root, _settings) {
20824 super(_root, _settings);
20825 this._settings = _settings;
20826 this._scandir = fsScandir.scandir;
20827 this._emitter = new events_1.EventEmitter();
20828 this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
20829 this._isFatalError = false;
20830 this._isDestroyed = false;
20831 this._queue.drain = () => {
20832 if (!this._isFatalError) {
20833 this._emitter.emit('end');
20834 }
20835 };
20836 }
20837 read() {
20838 this._isFatalError = false;
20839 this._isDestroyed = false;
20840 setImmediate(() => {
20841 this._pushToQueue(this._root, this._settings.basePath);
20842 });
20843 return this._emitter;
20844 }
20845 destroy() {
20846 if (this._isDestroyed) {
20847 throw new Error('The reader is already destroyed');
20848 }
20849 this._isDestroyed = true;
20850 this._queue.killAndDrain();
20851 }
20852 onEntry(callback) {
20853 this._emitter.on('entry', callback);
20854 }
20855 onError(callback) {
20856 this._emitter.once('error', callback);
20857 }
20858 onEnd(callback) {
20859 this._emitter.once('end', callback);
20860 }
20861 _pushToQueue(directory, base) {
20862 const queueItem = { directory, base };
20863 this._queue.push(queueItem, (error) => {
20864 if (error !== null) {
20865 this._handleError(error);
20866 }
20867 });
20868 }
20869 _worker(item, done) {
20870 this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
20871 if (error !== null) {
20872 return done(error, undefined);
20873 }
20874 for (const entry of entries) {
20875 this._handleEntry(entry, item.base);
20876 }
20877 done(null, undefined);
20878 });
20879 }
20880 _handleError(error) {
20881 if (!common.isFatalError(this._settings, error)) {
20882 return;
20883 }
20884 this._isFatalError = true;
20885 this._isDestroyed = true;
20886 this._emitter.emit('error', error);
20887 }
20888 _handleEntry(entry, base) {
20889 if (this._isDestroyed || this._isFatalError) {
20890 return;
20891 }
20892 const fullpath = entry.path;
20893 if (base !== undefined) {
20894 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
20895 }
20896 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
20897 this._emitEntry(entry);
20898 }
20899 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
20900 this._pushToQueue(fullpath, entry.path);
20901 }
20902 }
20903 _emitEntry(entry) {
20904 this._emitter.emit('entry', entry);
20905 }
20906}
20907exports.default = AsyncReader;
20908
20909
20910/***/ }),
20911/* 109 */
20912/***/ (function(module, exports, __webpack_require__) {
20913
20914"use strict";
20915
20916Object.defineProperty(exports, "__esModule", { value: true });
20917const async = __webpack_require__(110);
20918const sync = __webpack_require__(115);
20919const settings_1 = __webpack_require__(116);
20920exports.Settings = settings_1.default;
20921function scandir(path, optionsOrSettingsOrCallback, callback) {
20922 if (typeof optionsOrSettingsOrCallback === 'function') {
20923 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
20924 }
20925 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
20926}
20927exports.scandir = scandir;
20928function scandirSync(path, optionsOrSettings) {
20929 const settings = getSettings(optionsOrSettings);
20930 return sync.read(path, settings);
20931}
20932exports.scandirSync = scandirSync;
20933function getSettings(settingsOrOptions = {}) {
20934 if (settingsOrOptions instanceof settings_1.default) {
20935 return settingsOrOptions;
20936 }
20937 return new settings_1.default(settingsOrOptions);
20938}
20939
20940
20941/***/ }),
20942/* 110 */
20943/***/ (function(module, exports, __webpack_require__) {
20944
20945"use strict";
20946
20947Object.defineProperty(exports, "__esModule", { value: true });
20948const fsStat = __webpack_require__(101);
20949const rpl = __webpack_require__(111);
20950const constants_1 = __webpack_require__(112);
20951const utils = __webpack_require__(113);
20952function read(directory, settings, callback) {
20953 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
20954 return readdirWithFileTypes(directory, settings, callback);
20955 }
20956 return readdir(directory, settings, callback);
20957}
20958exports.read = read;
20959function readdirWithFileTypes(directory, settings, callback) {
20960 settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
20961 if (readdirError !== null) {
20962 return callFailureCallback(callback, readdirError);
20963 }
20964 const entries = dirents.map((dirent) => ({
20965 dirent,
20966 name: dirent.name,
20967 path: `${directory}${settings.pathSegmentSeparator}${dirent.name}`
20968 }));
20969 if (!settings.followSymbolicLinks) {
20970 return callSuccessCallback(callback, entries);
20971 }
20972 const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
20973 rpl(tasks, (rplError, rplEntries) => {
20974 if (rplError !== null) {
20975 return callFailureCallback(callback, rplError);
20976 }
20977 callSuccessCallback(callback, rplEntries);
20978 });
20979 });
20980}
20981exports.readdirWithFileTypes = readdirWithFileTypes;
20982function makeRplTaskEntry(entry, settings) {
20983 return (done) => {
20984 if (!entry.dirent.isSymbolicLink()) {
20985 return done(null, entry);
20986 }
20987 settings.fs.stat(entry.path, (statError, stats) => {
20988 if (statError !== null) {
20989 if (settings.throwErrorOnBrokenSymbolicLink) {
20990 return done(statError);
20991 }
20992 return done(null, entry);
20993 }
20994 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
20995 return done(null, entry);
20996 });
20997 };
20998}
20999function readdir(directory, settings, callback) {
21000 settings.fs.readdir(directory, (readdirError, names) => {
21001 if (readdirError !== null) {
21002 return callFailureCallback(callback, readdirError);
21003 }
21004 const filepaths = names.map((name) => `${directory}${settings.pathSegmentSeparator}${name}`);
21005 const tasks = filepaths.map((filepath) => {
21006 return (done) => fsStat.stat(filepath, settings.fsStatSettings, done);
21007 });
21008 rpl(tasks, (rplError, results) => {
21009 if (rplError !== null) {
21010 return callFailureCallback(callback, rplError);
21011 }
21012 const entries = [];
21013 names.forEach((name, index) => {
21014 const stats = results[index];
21015 const entry = {
21016 name,
21017 path: filepaths[index],
21018 dirent: utils.fs.createDirentFromStats(name, stats)
21019 };
21020 if (settings.stats) {
21021 entry.stats = stats;
21022 }
21023 entries.push(entry);
21024 });
21025 callSuccessCallback(callback, entries);
21026 });
21027 });
21028}
21029exports.readdir = readdir;
21030function callFailureCallback(callback, error) {
21031 callback(error);
21032}
21033function callSuccessCallback(callback, result) {
21034 callback(null, result);
21035}
21036
21037
21038/***/ }),
21039/* 111 */
21040/***/ (function(module, exports) {
21041
21042module.exports = runParallel
21043
21044function runParallel (tasks, cb) {
21045 var results, pending, keys
21046 var isSync = true
21047
21048 if (Array.isArray(tasks)) {
21049 results = []
21050 pending = tasks.length
21051 } else {
21052 keys = Object.keys(tasks)
21053 results = {}
21054 pending = keys.length
21055 }
21056
21057 function done (err) {
21058 function end () {
21059 if (cb) cb(err, results)
21060 cb = null
21061 }
21062 if (isSync) process.nextTick(end)
21063 else end()
21064 }
21065
21066 function each (i, err, result) {
21067 results[i] = result
21068 if (--pending === 0 || err) {
21069 done(err)
21070 }
21071 }
21072
21073 if (!pending) {
21074 // empty
21075 done(null)
21076 } else if (keys) {
21077 // object
21078 keys.forEach(function (key) {
21079 tasks[key](function (err, result) { each(key, err, result) })
21080 })
21081 } else {
21082 // array
21083 tasks.forEach(function (task, i) {
21084 task(function (err, result) { each(i, err, result) })
21085 })
21086 }
21087
21088 isSync = false
21089}
21090
21091
21092/***/ }),
21093/* 112 */
21094/***/ (function(module, exports, __webpack_require__) {
21095
21096"use strict";
21097
21098Object.defineProperty(exports, "__esModule", { value: true });
21099const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
21100const MAJOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
21101const MINOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
21102const SUPPORTED_MAJOR_VERSION = 10;
21103const SUPPORTED_MINOR_VERSION = 10;
21104const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
21105const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
21106/**
21107 * IS `true` for Node.js 10.10 and greater.
21108 */
21109exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
21110
21111
21112/***/ }),
21113/* 113 */
21114/***/ (function(module, exports, __webpack_require__) {
21115
21116"use strict";
21117
21118Object.defineProperty(exports, "__esModule", { value: true });
21119const fs = __webpack_require__(114);
21120exports.fs = fs;
21121
21122
21123/***/ }),
21124/* 114 */
21125/***/ (function(module, exports, __webpack_require__) {
21126
21127"use strict";
21128
21129Object.defineProperty(exports, "__esModule", { value: true });
21130class DirentFromStats {
21131 constructor(name, stats) {
21132 this.name = name;
21133 this.isBlockDevice = stats.isBlockDevice.bind(stats);
21134 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
21135 this.isDirectory = stats.isDirectory.bind(stats);
21136 this.isFIFO = stats.isFIFO.bind(stats);
21137 this.isFile = stats.isFile.bind(stats);
21138 this.isSocket = stats.isSocket.bind(stats);
21139 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
21140 }
21141}
21142function createDirentFromStats(name, stats) {
21143 return new DirentFromStats(name, stats);
21144}
21145exports.createDirentFromStats = createDirentFromStats;
21146
21147
21148/***/ }),
21149/* 115 */
21150/***/ (function(module, exports, __webpack_require__) {
21151
21152"use strict";
21153
21154Object.defineProperty(exports, "__esModule", { value: true });
21155const fsStat = __webpack_require__(101);
21156const constants_1 = __webpack_require__(112);
21157const utils = __webpack_require__(113);
21158function read(directory, settings) {
21159 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
21160 return readdirWithFileTypes(directory, settings);
21161 }
21162 return readdir(directory, settings);
21163}
21164exports.read = read;
21165function readdirWithFileTypes(directory, settings) {
21166 const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
21167 return dirents.map((dirent) => {
21168 const entry = {
21169 dirent,
21170 name: dirent.name,
21171 path: `${directory}${settings.pathSegmentSeparator}${dirent.name}`
21172 };
21173 if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
21174 try {
21175 const stats = settings.fs.statSync(entry.path);
21176 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
21177 }
21178 catch (error) {
21179 if (settings.throwErrorOnBrokenSymbolicLink) {
21180 throw error;
21181 }
21182 }
21183 }
21184 return entry;
21185 });
21186}
21187exports.readdirWithFileTypes = readdirWithFileTypes;
21188function readdir(directory, settings) {
21189 const names = settings.fs.readdirSync(directory);
21190 return names.map((name) => {
21191 const entryPath = `${directory}${settings.pathSegmentSeparator}${name}`;
21192 const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
21193 const entry = {
21194 name,
21195 path: entryPath,
21196 dirent: utils.fs.createDirentFromStats(name, stats)
21197 };
21198 if (settings.stats) {
21199 entry.stats = stats;
21200 }
21201 return entry;
21202 });
21203}
21204exports.readdir = readdir;
21205
21206
21207/***/ }),
21208/* 116 */
21209/***/ (function(module, exports, __webpack_require__) {
21210
21211"use strict";
21212
21213Object.defineProperty(exports, "__esModule", { value: true });
21214const path = __webpack_require__(13);
21215const fsStat = __webpack_require__(101);
21216const fs = __webpack_require__(117);
21217class Settings {
21218 constructor(_options = {}) {
21219 this._options = _options;
21220 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
21221 this.fs = fs.createFileSystemAdapter(this._options.fs);
21222 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
21223 this.stats = this._getValue(this._options.stats, false);
21224 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
21225 this.fsStatSettings = new fsStat.Settings({
21226 followSymbolicLink: this.followSymbolicLinks,
21227 fs: this.fs,
21228 throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
21229 });
21230 }
21231 _getValue(option, value) {
21232 return option === undefined ? value : option;
21233 }
21234}
21235exports.default = Settings;
21236
21237
21238/***/ }),
21239/* 117 */
21240/***/ (function(module, exports, __webpack_require__) {
21241
21242"use strict";
21243
21244Object.defineProperty(exports, "__esModule", { value: true });
21245const fs = __webpack_require__(40);
21246exports.FILE_SYSTEM_ADAPTER = {
21247 lstat: fs.lstat,
21248 stat: fs.stat,
21249 lstatSync: fs.lstatSync,
21250 statSync: fs.statSync,
21251 readdir: fs.readdir,
21252 readdirSync: fs.readdirSync
21253};
21254function createFileSystemAdapter(fsMethods) {
21255 if (fsMethods === undefined) {
21256 return exports.FILE_SYSTEM_ADAPTER;
21257 }
21258 return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
21259}
21260exports.createFileSystemAdapter = createFileSystemAdapter;
21261
21262
21263/***/ }),
21264/* 118 */
21265/***/ (function(module, exports, __webpack_require__) {
21266
21267"use strict";
21268
21269
21270var reusify = __webpack_require__(119)
21271
21272function fastqueue (context, worker, concurrency) {
21273 if (typeof context === 'function') {
21274 concurrency = worker
21275 worker = context
21276 context = null
21277 }
21278
21279 var cache = reusify(Task)
21280 var queueHead = null
21281 var queueTail = null
21282 var _running = 0
21283
21284 var self = {
21285 push: push,
21286 drain: noop,
21287 saturated: noop,
21288 pause: pause,
21289 paused: false,
21290 concurrency: concurrency,
21291 running: running,
21292 resume: resume,
21293 idle: idle,
21294 length: length,
21295 unshift: unshift,
21296 empty: noop,
21297 kill: kill,
21298 killAndDrain: killAndDrain
21299 }
21300
21301 return self
21302
21303 function running () {
21304 return _running
21305 }
21306
21307 function pause () {
21308 self.paused = true
21309 }
21310
21311 function length () {
21312 var current = queueHead
21313 var counter = 0
21314
21315 while (current) {
21316 current = current.next
21317 counter++
21318 }
21319
21320 return counter
21321 }
21322
21323 function resume () {
21324 if (!self.paused) return
21325 self.paused = false
21326 for (var i = 0; i < self.concurrency; i++) {
21327 _running++
21328 release()
21329 }
21330 }
21331
21332 function idle () {
21333 return _running === 0 && self.length() === 0
21334 }
21335
21336 function push (value, done) {
21337 var current = cache.get()
21338
21339 current.context = context
21340 current.release = release
21341 current.value = value
21342 current.callback = done || noop
21343
21344 if (_running === self.concurrency || self.paused) {
21345 if (queueTail) {
21346 queueTail.next = current
21347 queueTail = current
21348 } else {
21349 queueHead = current
21350 queueTail = current
21351 self.saturated()
21352 }
21353 } else {
21354 _running++
21355 worker.call(context, current.value, current.worked)
21356 }
21357 }
21358
21359 function unshift (value, done) {
21360 var current = cache.get()
21361
21362 current.context = context
21363 current.release = release
21364 current.value = value
21365 current.callback = done || noop
21366
21367 if (_running === self.concurrency || self.paused) {
21368 if (queueHead) {
21369 current.next = queueHead
21370 queueHead = current
21371 } else {
21372 queueHead = current
21373 queueTail = current
21374 self.saturated()
21375 }
21376 } else {
21377 _running++
21378 worker.call(context, current.value, current.worked)
21379 }
21380 }
21381
21382 function release (holder) {
21383 if (holder) {
21384 cache.release(holder)
21385 }
21386 var next = queueHead
21387 if (next) {
21388 if (!self.paused) {
21389 if (queueTail === queueHead) {
21390 queueTail = null
21391 }
21392 queueHead = next.next
21393 next.next = null
21394 worker.call(context, next.value, next.worked)
21395 if (queueTail === null) {
21396 self.empty()
21397 }
21398 } else {
21399 _running--
21400 }
21401 } else if (--_running === 0) {
21402 self.drain()
21403 }
21404 }
21405
21406 function kill () {
21407 queueHead = null
21408 queueTail = null
21409 self.drain = noop
21410 }
21411
21412 function killAndDrain () {
21413 queueHead = null
21414 queueTail = null
21415 self.drain()
21416 self.drain = noop
21417 }
21418}
21419
21420function noop () {}
21421
21422function Task () {
21423 this.value = null
21424 this.callback = noop
21425 this.next = null
21426 this.release = noop
21427 this.context = null
21428
21429 var self = this
21430
21431 this.worked = function worked (err, result) {
21432 var callback = self.callback
21433 self.value = null
21434 self.callback = noop
21435 callback.call(self.context, err, result)
21436 self.release(self)
21437 }
21438}
21439
21440module.exports = fastqueue
21441
21442
21443/***/ }),
21444/* 119 */
21445/***/ (function(module, exports, __webpack_require__) {
21446
21447"use strict";
21448
21449
21450function reusify (Constructor) {
21451 var head = new Constructor()
21452 var tail = head
21453
21454 function get () {
21455 var current = head
21456
21457 if (current.next) {
21458 head = current.next
21459 } else {
21460 head = new Constructor()
21461 tail = head
21462 }
21463
21464 current.next = null
21465
21466 return current
21467 }
21468
21469 function release (obj) {
21470 tail.next = obj
21471 tail = obj
21472 }
21473
21474 return {
21475 get: get,
21476 release: release
21477 }
21478}
21479
21480module.exports = reusify
21481
21482
21483/***/ }),
21484/* 120 */
21485/***/ (function(module, exports, __webpack_require__) {
21486
21487"use strict";
21488
21489Object.defineProperty(exports, "__esModule", { value: true });
21490function isFatalError(settings, error) {
21491 if (settings.errorFilter === null) {
21492 return true;
21493 }
21494 return !settings.errorFilter(error);
21495}
21496exports.isFatalError = isFatalError;
21497function isAppliedFilter(filter, value) {
21498 return filter === null || filter(value);
21499}
21500exports.isAppliedFilter = isAppliedFilter;
21501function replacePathSegmentSeparator(filepath, separator) {
21502 return filepath.split(/[\\/]/).join(separator);
21503}
21504exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
21505function joinPathSegments(a, b, separator) {
21506 if (a === '') {
21507 return b;
21508 }
21509 return a + separator + b;
21510}
21511exports.joinPathSegments = joinPathSegments;
21512
21513
21514/***/ }),
21515/* 121 */
21516/***/ (function(module, exports, __webpack_require__) {
21517
21518"use strict";
21519
21520Object.defineProperty(exports, "__esModule", { value: true });
21521const common = __webpack_require__(120);
21522class Reader {
21523 constructor(_root, _settings) {
21524 this._root = _root;
21525 this._settings = _settings;
21526 this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
21527 }
21528}
21529exports.default = Reader;
21530
21531
21532/***/ }),
21533/* 122 */
21534/***/ (function(module, exports, __webpack_require__) {
21535
21536"use strict";
21537
21538Object.defineProperty(exports, "__esModule", { value: true });
21539const stream_1 = __webpack_require__(97);
21540const async_1 = __webpack_require__(108);
21541class StreamProvider {
21542 constructor(_root, _settings) {
21543 this._root = _root;
21544 this._settings = _settings;
21545 this._reader = new async_1.default(this._root, this._settings);
21546 this._stream = new stream_1.Readable({
21547 objectMode: true,
21548 read: () => { },
21549 destroy: this._reader.destroy.bind(this._reader)
21550 });
21551 }
21552 read() {
21553 this._reader.onError((error) => {
21554 this._stream.emit('error', error);
21555 });
21556 this._reader.onEntry((entry) => {
21557 this._stream.push(entry);
21558 });
21559 this._reader.onEnd(() => {
21560 this._stream.push(null);
21561 });
21562 this._reader.read();
21563 return this._stream;
21564 }
21565}
21566exports.default = StreamProvider;
21567
21568
21569/***/ }),
21570/* 123 */
21571/***/ (function(module, exports, __webpack_require__) {
21572
21573"use strict";
21574
21575Object.defineProperty(exports, "__esModule", { value: true });
21576const sync_1 = __webpack_require__(124);
21577class SyncProvider {
21578 constructor(_root, _settings) {
21579 this._root = _root;
21580 this._settings = _settings;
21581 this._reader = new sync_1.default(this._root, this._settings);
21582 }
21583 read() {
21584 return this._reader.read();
21585 }
21586}
21587exports.default = SyncProvider;
21588
21589
21590/***/ }),
21591/* 124 */
21592/***/ (function(module, exports, __webpack_require__) {
21593
21594"use strict";
21595
21596Object.defineProperty(exports, "__esModule", { value: true });
21597const fsScandir = __webpack_require__(109);
21598const common = __webpack_require__(120);
21599const reader_1 = __webpack_require__(121);
21600class SyncReader extends reader_1.default {
21601 constructor() {
21602 super(...arguments);
21603 this._scandir = fsScandir.scandirSync;
21604 this._storage = new Set();
21605 this._queue = new Set();
21606 }
21607 read() {
21608 this._pushToQueue(this._root, this._settings.basePath);
21609 this._handleQueue();
21610 return [...this._storage];
21611 }
21612 _pushToQueue(directory, base) {
21613 this._queue.add({ directory, base });
21614 }
21615 _handleQueue() {
21616 for (const item of this._queue.values()) {
21617 this._handleDirectory(item.directory, item.base);
21618 }
21619 }
21620 _handleDirectory(directory, base) {
21621 try {
21622 const entries = this._scandir(directory, this._settings.fsScandirSettings);
21623 for (const entry of entries) {
21624 this._handleEntry(entry, base);
21625 }
21626 }
21627 catch (error) {
21628 this._handleError(error);
21629 }
21630 }
21631 _handleError(error) {
21632 if (!common.isFatalError(this._settings, error)) {
21633 return;
21634 }
21635 throw error;
21636 }
21637 _handleEntry(entry, base) {
21638 const fullpath = entry.path;
21639 if (base !== undefined) {
21640 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
21641 }
21642 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
21643 this._pushToStorage(entry);
21644 }
21645 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
21646 this._pushToQueue(fullpath, entry.path);
21647 }
21648 }
21649 _pushToStorage(entry) {
21650 this._storage.add(entry);
21651 }
21652}
21653exports.default = SyncReader;
21654
21655
21656/***/ }),
21657/* 125 */
21658/***/ (function(module, exports, __webpack_require__) {
21659
21660"use strict";
21661
21662Object.defineProperty(exports, "__esModule", { value: true });
21663const path = __webpack_require__(13);
21664const fsScandir = __webpack_require__(109);
21665class Settings {
21666 constructor(_options = {}) {
21667 this._options = _options;
21668 this.basePath = this._getValue(this._options.basePath, undefined);
21669 this.concurrency = this._getValue(this._options.concurrency, Infinity);
21670 this.deepFilter = this._getValue(this._options.deepFilter, null);
21671 this.entryFilter = this._getValue(this._options.entryFilter, null);
21672 this.errorFilter = this._getValue(this._options.errorFilter, null);
21673 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
21674 this.fsScandirSettings = new fsScandir.Settings({
21675 followSymbolicLinks: this._options.followSymbolicLinks,
21676 fs: this._options.fs,
21677 pathSegmentSeparator: this._options.pathSegmentSeparator,
21678 stats: this._options.stats,
21679 throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
21680 });
21681 }
21682 _getValue(option, value) {
21683 return option === undefined ? value : option;
21684 }
21685}
21686exports.default = Settings;
21687
21688
21689/***/ }),
21690/* 126 */
21691/***/ (function(module, exports, __webpack_require__) {
21692
21693"use strict";
21694
21695Object.defineProperty(exports, "__esModule", { value: true });
21696const path = __webpack_require__(13);
21697const fsStat = __webpack_require__(101);
21698const utils = __webpack_require__(63);
21699class Reader {
21700 constructor(_settings) {
21701 this._settings = _settings;
21702 this._fsStatSettings = new fsStat.Settings({
21703 followSymbolicLink: this._settings.followSymbolicLinks,
21704 fs: this._settings.fs,
21705 throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
21706 });
21707 }
21708 _getFullEntryPath(filepath) {
21709 return path.resolve(this._settings.cwd, filepath);
21710 }
21711 _makeEntry(stats, pattern) {
21712 const entry = {
21713 name: pattern,
21714 path: pattern,
21715 dirent: utils.fs.createDirentFromStats(pattern, stats)
21716 };
21717 if (this._settings.stats) {
21718 entry.stats = stats;
21719 }
21720 return entry;
21721 }
21722 _isFatalError(error) {
21723 return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
21724 }
21725}
21726exports.default = Reader;
21727
21728
21729/***/ }),
21730/* 127 */
21731/***/ (function(module, exports, __webpack_require__) {
21732
21733"use strict";
21734
21735Object.defineProperty(exports, "__esModule", { value: true });
21736const path = __webpack_require__(13);
21737const deep_1 = __webpack_require__(128);
21738const entry_1 = __webpack_require__(131);
21739const error_1 = __webpack_require__(132);
21740const entry_2 = __webpack_require__(133);
21741class Provider {
21742 constructor(_settings) {
21743 this._settings = _settings;
21744 this.errorFilter = new error_1.default(this._settings);
21745 this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
21746 this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
21747 this.entryTransformer = new entry_2.default(this._settings);
21748 }
21749 _getRootDirectory(task) {
21750 return path.resolve(this._settings.cwd, task.base);
21751 }
21752 _getReaderOptions(task) {
21753 const basePath = task.base === '.' ? '' : task.base;
21754 return {
21755 basePath,
21756 pathSegmentSeparator: '/',
21757 concurrency: this._settings.concurrency,
21758 deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
21759 entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
21760 errorFilter: this.errorFilter.getFilter(),
21761 followSymbolicLinks: this._settings.followSymbolicLinks,
21762 fs: this._settings.fs,
21763 stats: this._settings.stats,
21764 throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
21765 transform: this.entryTransformer.getTransformer()
21766 };
21767 }
21768 _getMicromatchOptions() {
21769 return {
21770 dot: this._settings.dot,
21771 matchBase: this._settings.baseNameMatch,
21772 nobrace: !this._settings.braceExpansion,
21773 nocase: !this._settings.caseSensitiveMatch,
21774 noext: !this._settings.extglob,
21775 noglobstar: !this._settings.globstar,
21776 posix: true,
21777 strictSlashes: false
21778 };
21779 }
21780}
21781exports.default = Provider;
21782
21783
21784/***/ }),
21785/* 128 */
21786/***/ (function(module, exports, __webpack_require__) {
21787
21788"use strict";
21789
21790Object.defineProperty(exports, "__esModule", { value: true });
21791const utils = __webpack_require__(63);
21792const partial_1 = __webpack_require__(129);
21793class DeepFilter {
21794 constructor(_settings, _micromatchOptions) {
21795 this._settings = _settings;
21796 this._micromatchOptions = _micromatchOptions;
21797 }
21798 getFilter(basePath, positive, negative) {
21799 const matcher = this._getMatcher(positive);
21800 const negativeRe = this._getNegativePatternsRe(negative);
21801 return (entry) => this._filter(basePath, entry, matcher, negativeRe);
21802 }
21803 _getMatcher(patterns) {
21804 return new partial_1.default(patterns, this._settings, this._micromatchOptions);
21805 }
21806 _getNegativePatternsRe(patterns) {
21807 const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
21808 return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
21809 }
21810 _filter(basePath, entry, matcher, negativeRe) {
21811 const depth = this._getEntryLevel(basePath, entry.path);
21812 if (this._isSkippedByDeep(depth)) {
21813 return false;
21814 }
21815 if (this._isSkippedSymbolicLink(entry)) {
21816 return false;
21817 }
21818 const filepath = utils.path.removeLeadingDotSegment(entry.path);
21819 if (this._isSkippedByPositivePatterns(filepath, matcher)) {
21820 return false;
21821 }
21822 return this._isSkippedByNegativePatterns(filepath, negativeRe);
21823 }
21824 _isSkippedByDeep(entryDepth) {
21825 return entryDepth >= this._settings.deep;
21826 }
21827 _isSkippedSymbolicLink(entry) {
21828 return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
21829 }
21830 _getEntryLevel(basePath, entryPath) {
21831 const basePathDepth = basePath.split('/').length;
21832 const entryPathDepth = entryPath.split('/').length;
21833 return entryPathDepth - (basePath === '' ? 0 : basePathDepth);
21834 }
21835 _isSkippedByPositivePatterns(entryPath, matcher) {
21836 return !this._settings.baseNameMatch && !matcher.match(entryPath);
21837 }
21838 _isSkippedByNegativePatterns(entryPath, negativeRe) {
21839 return !utils.pattern.matchAny(entryPath, negativeRe);
21840 }
21841}
21842exports.default = DeepFilter;
21843
21844
21845/***/ }),
21846/* 129 */
21847/***/ (function(module, exports, __webpack_require__) {
21848
21849"use strict";
21850
21851Object.defineProperty(exports, "__esModule", { value: true });
21852const matcher_1 = __webpack_require__(130);
21853class PartialMatcher extends matcher_1.default {
21854 match(filepath) {
21855 const parts = filepath.split('/');
21856 const levels = parts.length;
21857 const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
21858 for (const pattern of patterns) {
21859 const section = pattern.sections[0];
21860 /**
21861 * In this case, the pattern has a globstar and we must read all directories unconditionally,
21862 * but only if the level has reached the end of the first group.
21863 *
21864 * fixtures/{a,b}/**
21865 * ^ true/false ^ always true
21866 */
21867 if (!pattern.complete && levels > section.length) {
21868 return true;
21869 }
21870 const match = parts.every((part, index) => {
21871 const segment = pattern.segments[index];
21872 if (segment.dynamic && segment.patternRe.test(part)) {
21873 return true;
21874 }
21875 if (!segment.dynamic && segment.pattern === part) {
21876 return true;
21877 }
21878 return false;
21879 });
21880 if (match) {
21881 return true;
21882 }
21883 }
21884 return false;
21885 }
21886}
21887exports.default = PartialMatcher;
21888
21889
21890/***/ }),
21891/* 130 */
21892/***/ (function(module, exports, __webpack_require__) {
21893
21894"use strict";
21895
21896Object.defineProperty(exports, "__esModule", { value: true });
21897const utils = __webpack_require__(63);
21898class Matcher {
21899 constructor(_patterns, _settings, _micromatchOptions) {
21900 this._patterns = _patterns;
21901 this._settings = _settings;
21902 this._micromatchOptions = _micromatchOptions;
21903 this._storage = [];
21904 this._fillStorage();
21905 }
21906 _fillStorage() {
21907 /**
21908 * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
21909 * So, before expand patterns with brace expansion into separated patterns.
21910 */
21911 const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns);
21912 for (const pattern of patterns) {
21913 const segments = this._getPatternSegments(pattern);
21914 const sections = this._splitSegmentsIntoSections(segments);
21915 this._storage.push({
21916 complete: sections.length <= 1,
21917 pattern,
21918 segments,
21919 sections
21920 });
21921 }
21922 }
21923 _getPatternSegments(pattern) {
21924 const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
21925 return parts.map((part) => {
21926 const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
21927 if (!dynamic) {
21928 return {
21929 dynamic: false,
21930 pattern: part
21931 };
21932 }
21933 return {
21934 dynamic: true,
21935 pattern: part,
21936 patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
21937 };
21938 });
21939 }
21940 _splitSegmentsIntoSections(segments) {
21941 return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
21942 }
21943}
21944exports.default = Matcher;
21945
21946
21947/***/ }),
21948/* 131 */
21949/***/ (function(module, exports, __webpack_require__) {
21950
21951"use strict";
21952
21953Object.defineProperty(exports, "__esModule", { value: true });
21954const utils = __webpack_require__(63);
21955class EntryFilter {
21956 constructor(_settings, _micromatchOptions) {
21957 this._settings = _settings;
21958 this._micromatchOptions = _micromatchOptions;
21959 this.index = new Map();
21960 }
21961 getFilter(positive, negative) {
21962 const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
21963 const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
21964 return (entry) => this._filter(entry, positiveRe, negativeRe);
21965 }
21966 _filter(entry, positiveRe, negativeRe) {
21967 if (this._settings.unique) {
21968 if (this._isDuplicateEntry(entry)) {
21969 return false;
21970 }
21971 this._createIndexRecord(entry);
21972 }
21973 if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
21974 return false;
21975 }
21976 if (this._isSkippedByAbsoluteNegativePatterns(entry, negativeRe)) {
21977 return false;
21978 }
21979 const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
21980 return this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
21981 }
21982 _isDuplicateEntry(entry) {
21983 return this.index.has(entry.path);
21984 }
21985 _createIndexRecord(entry) {
21986 this.index.set(entry.path, undefined);
21987 }
21988 _onlyFileFilter(entry) {
21989 return this._settings.onlyFiles && !entry.dirent.isFile();
21990 }
21991 _onlyDirectoryFilter(entry) {
21992 return this._settings.onlyDirectories && !entry.dirent.isDirectory();
21993 }
21994 _isSkippedByAbsoluteNegativePatterns(entry, negativeRe) {
21995 if (!this._settings.absolute) {
21996 return false;
21997 }
21998 const fullpath = utils.path.makeAbsolute(this._settings.cwd, entry.path);
21999 return this._isMatchToPatterns(fullpath, negativeRe);
22000 }
22001 _isMatchToPatterns(entryPath, patternsRe) {
22002 const filepath = utils.path.removeLeadingDotSegment(entryPath);
22003 return utils.pattern.matchAny(filepath, patternsRe);
22004 }
22005}
22006exports.default = EntryFilter;
22007
22008
22009/***/ }),
22010/* 132 */
22011/***/ (function(module, exports, __webpack_require__) {
22012
22013"use strict";
22014
22015Object.defineProperty(exports, "__esModule", { value: true });
22016const utils = __webpack_require__(63);
22017class ErrorFilter {
22018 constructor(_settings) {
22019 this._settings = _settings;
22020 }
22021 getFilter() {
22022 return (error) => this._isNonFatalError(error);
22023 }
22024 _isNonFatalError(error) {
22025 return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
22026 }
22027}
22028exports.default = ErrorFilter;
22029
22030
22031/***/ }),
22032/* 133 */
22033/***/ (function(module, exports, __webpack_require__) {
22034
22035"use strict";
22036
22037Object.defineProperty(exports, "__esModule", { value: true });
22038const utils = __webpack_require__(63);
22039class EntryTransformer {
22040 constructor(_settings) {
22041 this._settings = _settings;
22042 }
22043 getTransformer() {
22044 return (entry) => this._transform(entry);
22045 }
22046 _transform(entry) {
22047 let filepath = entry.path;
22048 if (this._settings.absolute) {
22049 filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
22050 filepath = utils.path.unixify(filepath);
22051 }
22052 if (this._settings.markDirectories && entry.dirent.isDirectory()) {
22053 filepath += '/';
22054 }
22055 if (!this._settings.objectMode) {
22056 return filepath;
22057 }
22058 return Object.assign(Object.assign({}, entry), { path: filepath });
22059 }
22060}
22061exports.default = EntryTransformer;
22062
22063
22064/***/ }),
22065/* 134 */
22066/***/ (function(module, exports, __webpack_require__) {
22067
22068"use strict";
22069
22070Object.defineProperty(exports, "__esModule", { value: true });
22071const stream_1 = __webpack_require__(97);
22072const stream_2 = __webpack_require__(100);
22073const provider_1 = __webpack_require__(127);
22074class ProviderStream extends provider_1.default {
22075 constructor() {
22076 super(...arguments);
22077 this._reader = new stream_2.default(this._settings);
22078 }
22079 read(task) {
22080 const root = this._getRootDirectory(task);
22081 const options = this._getReaderOptions(task);
22082 const source = this.api(root, task, options);
22083 const destination = new stream_1.Readable({ objectMode: true, read: () => { } });
22084 source
22085 .once('error', (error) => destination.emit('error', error))
22086 .on('data', (entry) => destination.emit('data', options.transform(entry)))
22087 .once('end', () => destination.emit('end'));
22088 destination
22089 .once('close', () => source.destroy());
22090 return destination;
22091 }
22092 api(root, task, options) {
22093 if (task.dynamic) {
22094 return this._reader.dynamic(root, options);
22095 }
22096 return this._reader.static(task.patterns, options);
22097 }
22098}
22099exports.default = ProviderStream;
22100
22101
22102/***/ }),
22103/* 135 */
22104/***/ (function(module, exports, __webpack_require__) {
22105
22106"use strict";
22107
22108Object.defineProperty(exports, "__esModule", { value: true });
22109const sync_1 = __webpack_require__(136);
22110const provider_1 = __webpack_require__(127);
22111class ProviderSync extends provider_1.default {
22112 constructor() {
22113 super(...arguments);
22114 this._reader = new sync_1.default(this._settings);
22115 }
22116 read(task) {
22117 const root = this._getRootDirectory(task);
22118 const options = this._getReaderOptions(task);
22119 const entries = this.api(root, task, options);
22120 return entries.map(options.transform);
22121 }
22122 api(root, task, options) {
22123 if (task.dynamic) {
22124 return this._reader.dynamic(root, options);
22125 }
22126 return this._reader.static(task.patterns, options);
22127 }
22128}
22129exports.default = ProviderSync;
22130
22131
22132/***/ }),
22133/* 136 */
22134/***/ (function(module, exports, __webpack_require__) {
22135
22136"use strict";
22137
22138Object.defineProperty(exports, "__esModule", { value: true });
22139const fsStat = __webpack_require__(101);
22140const fsWalk = __webpack_require__(106);
22141const reader_1 = __webpack_require__(126);
22142class ReaderSync extends reader_1.default {
22143 constructor() {
22144 super(...arguments);
22145 this._walkSync = fsWalk.walkSync;
22146 this._statSync = fsStat.statSync;
22147 }
22148 dynamic(root, options) {
22149 return this._walkSync(root, options);
22150 }
22151 static(patterns, options) {
22152 const entries = [];
22153 for (const pattern of patterns) {
22154 const filepath = this._getFullEntryPath(pattern);
22155 const entry = this._getEntry(filepath, pattern, options);
22156 if (entry === null || !options.entryFilter(entry)) {
22157 continue;
22158 }
22159 entries.push(entry);
22160 }
22161 return entries;
22162 }
22163 _getEntry(filepath, pattern, options) {
22164 try {
22165 const stats = this._getStat(filepath);
22166 return this._makeEntry(stats, pattern);
22167 }
22168 catch (error) {
22169 if (options.errorFilter(error)) {
22170 return null;
22171 }
22172 throw error;
22173 }
22174 }
22175 _getStat(filepath) {
22176 return this._statSync(filepath, this._fsStatSettings);
22177 }
22178}
22179exports.default = ReaderSync;
22180
22181
22182/***/ }),
22183/* 137 */
22184/***/ (function(module, exports, __webpack_require__) {
22185
22186"use strict";
22187
22188Object.defineProperty(exports, "__esModule", { value: true });
22189const fs = __webpack_require__(40);
22190const os = __webpack_require__(14);
22191const CPU_COUNT = os.cpus().length;
22192exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
22193 lstat: fs.lstat,
22194 lstatSync: fs.lstatSync,
22195 stat: fs.stat,
22196 statSync: fs.statSync,
22197 readdir: fs.readdir,
22198 readdirSync: fs.readdirSync
22199};
22200class Settings {
22201 constructor(_options = {}) {
22202 this._options = _options;
22203 this.absolute = this._getValue(this._options.absolute, false);
22204 this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
22205 this.braceExpansion = this._getValue(this._options.braceExpansion, true);
22206 this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
22207 this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
22208 this.cwd = this._getValue(this._options.cwd, process.cwd());
22209 this.deep = this._getValue(this._options.deep, Infinity);
22210 this.dot = this._getValue(this._options.dot, false);
22211 this.extglob = this._getValue(this._options.extglob, true);
22212 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
22213 this.fs = this._getFileSystemMethods(this._options.fs);
22214 this.globstar = this._getValue(this._options.globstar, true);
22215 this.ignore = this._getValue(this._options.ignore, []);
22216 this.markDirectories = this._getValue(this._options.markDirectories, false);
22217 this.objectMode = this._getValue(this._options.objectMode, false);
22218 this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
22219 this.onlyFiles = this._getValue(this._options.onlyFiles, true);
22220 this.stats = this._getValue(this._options.stats, false);
22221 this.suppressErrors = this._getValue(this._options.suppressErrors, false);
22222 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
22223 this.unique = this._getValue(this._options.unique, true);
22224 if (this.onlyDirectories) {
22225 this.onlyFiles = false;
22226 }
22227 if (this.stats) {
22228 this.objectMode = true;
22229 }
22230 }
22231 _getValue(option, value) {
22232 return option === undefined ? value : option;
22233 }
22234 _getFileSystemMethods(methods = {}) {
22235 return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
22236 }
22237}
22238exports.default = Settings;
22239
22240
22241/***/ }),
22242/* 138 */,
22243/* 139 */,
22244/* 140 */,
22245/* 141 */,
22246/* 142 */,
22247/* 143 */,
22248/* 144 */,
22249/* 145 */,
22250/* 146 */,
22251/* 147 */,
22252/* 148 */,
22253/* 149 */
22254/***/ (function(module, __webpack_exports__, __webpack_require__) {
22255
22256"use strict";
22257__webpack_require__.r(__webpack_exports__);
22258/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; });
22259/*---------------------------------------------------------------------------------------------
22260 * Copyright (c) Microsoft Corporation. All rights reserved.
22261 * Licensed under the MIT License. See License.txt in the project root for license information.
22262 *--------------------------------------------------------------------------------------------*/
22263
22264var __extends = (undefined && undefined.__extends) || (function () {
22265 var extendStatics = function (d, b) {
22266 extendStatics = Object.setPrototypeOf ||
22267 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22268 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22269 return extendStatics(d, b);
22270 };
22271 return function (d, b) {
22272 extendStatics(d, b);
22273 function __() { this.constructor = d; }
22274 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22275 };
22276})();
22277var _a;
22278var isWindows;
22279if (typeof process === 'object') {
22280 isWindows = process.platform === 'win32';
22281}
22282else if (typeof navigator === 'object') {
22283 var userAgent = navigator.userAgent;
22284 isWindows = userAgent.indexOf('Windows') >= 0;
22285}
22286function isHighSurrogate(charCode) {
22287 return (0xD800 <= charCode && charCode <= 0xDBFF);
22288}
22289function isLowSurrogate(charCode) {
22290 return (0xDC00 <= charCode && charCode <= 0xDFFF);
22291}
22292function isLowerAsciiHex(code) {
22293 return code >= 97 /* a */ && code <= 102 /* f */;
22294}
22295function isLowerAsciiLetter(code) {
22296 return code >= 97 /* a */ && code <= 122 /* z */;
22297}
22298function isUpperAsciiLetter(code) {
22299 return code >= 65 /* A */ && code <= 90 /* Z */;
22300}
22301function isAsciiLetter(code) {
22302 return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
22303}
22304//#endregion
22305var _schemePattern = /^\w[\w\d+.-]*$/;
22306var _singleSlashStart = /^\//;
22307var _doubleSlashStart = /^\/\//;
22308function _validateUri(ret, _strict) {
22309 // scheme, must be set
22310 if (!ret.scheme && _strict) {
22311 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
22312 }
22313 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
22314 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
22315 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
22316 throw new Error('[UriError]: Scheme contains illegal characters.');
22317 }
22318 // path, http://tools.ietf.org/html/rfc3986#section-3.3
22319 // If a URI contains an authority component, then the path component
22320 // must either be empty or begin with a slash ("/") character. If a URI
22321 // does not contain an authority component, then the path cannot begin
22322 // with two slash characters ("//").
22323 if (ret.path) {
22324 if (ret.authority) {
22325 if (!_singleSlashStart.test(ret.path)) {
22326 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');
22327 }
22328 }
22329 else {
22330 if (_doubleSlashStart.test(ret.path)) {
22331 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
22332 }
22333 }
22334 }
22335}
22336// for a while we allowed uris *without* schemes and this is the migration
22337// for them, e.g. an uri without scheme and without strict-mode warns and falls
22338// back to the file-scheme. that should cause the least carnage and still be a
22339// clear warning
22340function _schemeFix(scheme, _strict) {
22341 if (!scheme && !_strict) {
22342 return 'file';
22343 }
22344 return scheme;
22345}
22346// implements a bit of https://tools.ietf.org/html/rfc3986#section-5
22347function _referenceResolution(scheme, path) {
22348 // the slash-character is our 'default base' as we don't
22349 // support constructing URIs relative to other URIs. This
22350 // also means that we alter and potentially break paths.
22351 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
22352 switch (scheme) {
22353 case 'https':
22354 case 'http':
22355 case 'file':
22356 if (!path) {
22357 path = _slash;
22358 }
22359 else if (path[0] !== _slash) {
22360 path = _slash + path;
22361 }
22362 break;
22363 }
22364 return path;
22365}
22366var _empty = '';
22367var _slash = '/';
22368var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
22369/**
22370 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
22371 * This class is a simple parser which creates the basic component parts
22372 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
22373 * and encoding.
22374 *
22375 * foo://example.com:8042/over/there?name=ferret#nose
22376 * \_/ \______________/\_________/ \_________/ \__/
22377 * | | | | |
22378 * scheme authority path query fragment
22379 * | _____________________|__
22380 * / \ / \
22381 * urn:example:animal:ferret:nose
22382 */
22383var URI = /** @class */ (function () {
22384 /**
22385 * @internal
22386 */
22387 function URI(schemeOrData, authority, path, query, fragment, _strict) {
22388 if (_strict === void 0) { _strict = false; }
22389 if (typeof schemeOrData === 'object') {
22390 this.scheme = schemeOrData.scheme || _empty;
22391 this.authority = schemeOrData.authority || _empty;
22392 this.path = schemeOrData.path || _empty;
22393 this.query = schemeOrData.query || _empty;
22394 this.fragment = schemeOrData.fragment || _empty;
22395 // no validation because it's this URI
22396 // that creates uri components.
22397 // _validateUri(this);
22398 }
22399 else {
22400 this.scheme = _schemeFix(schemeOrData, _strict);
22401 this.authority = authority || _empty;
22402 this.path = _referenceResolution(this.scheme, path || _empty);
22403 this.query = query || _empty;
22404 this.fragment = fragment || _empty;
22405 _validateUri(this, _strict);
22406 }
22407 }
22408 URI.isUri = function (thing) {
22409 if (thing instanceof URI) {
22410 return true;
22411 }
22412 if (!thing) {
22413 return false;
22414 }
22415 return typeof thing.authority === 'string'
22416 && typeof thing.fragment === 'string'
22417 && typeof thing.path === 'string'
22418 && typeof thing.query === 'string'
22419 && typeof thing.scheme === 'string'
22420 && typeof thing.fsPath === 'function'
22421 && typeof thing.with === 'function'
22422 && typeof thing.toString === 'function';
22423 };
22424 Object.defineProperty(URI.prototype, "fsPath", {
22425 // ---- filesystem path -----------------------
22426 /**
22427 * Returns a string representing the corresponding file system path of this URI.
22428 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
22429 * platform specific path separator.
22430 *
22431 * * Will *not* validate the path for invalid characters and semantics.
22432 * * Will *not* look at the scheme of this URI.
22433 * * The result shall *not* be used for display purposes but for accessing a file on disk.
22434 *
22435 *
22436 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
22437 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
22438 *
22439 * ```ts
22440 const u = URI.parse('file://server/c$/folder/file.txt')
22441 u.authority === 'server'
22442 u.path === '/shares/c$/file.txt'
22443 u.fsPath === '\\server\c$\folder\file.txt'
22444 ```
22445 *
22446 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
22447 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
22448 * with URIs that represent files on disk (`file` scheme).
22449 */
22450 get: function () {
22451 // if (this.scheme !== 'file') {
22452 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
22453 // }
22454 return _makeFsPath(this);
22455 },
22456 enumerable: true,
22457 configurable: true
22458 });
22459 // ---- modify to new -------------------------
22460 URI.prototype.with = function (change) {
22461 if (!change) {
22462 return this;
22463 }
22464 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
22465 if (scheme === undefined) {
22466 scheme = this.scheme;
22467 }
22468 else if (scheme === null) {
22469 scheme = _empty;
22470 }
22471 if (authority === undefined) {
22472 authority = this.authority;
22473 }
22474 else if (authority === null) {
22475 authority = _empty;
22476 }
22477 if (path === undefined) {
22478 path = this.path;
22479 }
22480 else if (path === null) {
22481 path = _empty;
22482 }
22483 if (query === undefined) {
22484 query = this.query;
22485 }
22486 else if (query === null) {
22487 query = _empty;
22488 }
22489 if (fragment === undefined) {
22490 fragment = this.fragment;
22491 }
22492 else if (fragment === null) {
22493 fragment = _empty;
22494 }
22495 if (scheme === this.scheme
22496 && authority === this.authority
22497 && path === this.path
22498 && query === this.query
22499 && fragment === this.fragment) {
22500 return this;
22501 }
22502 return new _URI(scheme, authority, path, query, fragment);
22503 };
22504 // ---- parse & validate ------------------------
22505 /**
22506 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
22507 * `file:///usr/home`, or `scheme:with/path`.
22508 *
22509 * @param value A string which represents an URI (see `URI#toString`).
22510 */
22511 URI.parse = function (value, _strict) {
22512 if (_strict === void 0) { _strict = false; }
22513 var match = _regexp.exec(value);
22514 if (!match) {
22515 return new _URI(_empty, _empty, _empty, _empty, _empty);
22516 }
22517 return new _URI(match[2] || _empty, decodeURIComponent(match[4] || _empty), decodeURIComponent(match[5] || _empty), decodeURIComponent(match[7] || _empty), decodeURIComponent(match[9] || _empty), _strict);
22518 };
22519 /**
22520 * Creates a new URI from a file system path, e.g. `c:\my\files`,
22521 * `/usr/home`, or `\\server\share\some\path`.
22522 *
22523 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
22524 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
22525 * `URI.parse('file://' + path)` because the path might contain characters that are
22526 * interpreted (# and ?). See the following sample:
22527 * ```ts
22528 const good = URI.file('/coding/c#/project1');
22529 good.scheme === 'file';
22530 good.path === '/coding/c#/project1';
22531 good.fragment === '';
22532 const bad = URI.parse('file://' + '/coding/c#/project1');
22533 bad.scheme === 'file';
22534 bad.path === '/coding/c'; // path is now broken
22535 bad.fragment === '/project1';
22536 ```
22537 *
22538 * @param path A file system path (see `URI#fsPath`)
22539 */
22540 URI.file = function (path) {
22541 var authority = _empty;
22542 // normalize to fwd-slashes on windows,
22543 // on other systems bwd-slashes are valid
22544 // filename character, eg /f\oo/ba\r.txt
22545 if (isWindows) {
22546 path = path.replace(/\\/g, _slash);
22547 }
22548 // check for authority as used in UNC shares
22549 // or use the path as given
22550 if (path[0] === _slash && path[1] === _slash) {
22551 var idx = path.indexOf(_slash, 2);
22552 if (idx === -1) {
22553 authority = path.substring(2);
22554 path = _slash;
22555 }
22556 else {
22557 authority = path.substring(2, idx);
22558 path = path.substring(idx) || _slash;
22559 }
22560 }
22561 return new _URI('file', authority, path, _empty, _empty);
22562 };
22563 URI.from = function (components) {
22564 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
22565 };
22566 // ---- printing/externalize ---------------------------
22567 /**
22568 * Creates a string representation for this URI. It's guaranteed that calling
22569 * `URI.parse` with the result of this function creates an URI which is equal
22570 * to this URI.
22571 *
22572 * * The result shall *not* be used for display purposes but for externalization or transport.
22573 * * The result will be encoded using the percentage encoding and encoding happens mostly
22574 * ignore the scheme-specific encoding rules.
22575 *
22576 * @param skipEncoding Do not encode the result, default is `false`
22577 */
22578 URI.prototype.toString = function (skipEncoding) {
22579 if (skipEncoding === void 0) { skipEncoding = false; }
22580 return _asFormatted(this, skipEncoding);
22581 };
22582 URI.prototype.toJSON = function () {
22583 return this;
22584 };
22585 URI.revive = function (data) {
22586 if (!data) {
22587 return data;
22588 }
22589 else if (data instanceof URI) {
22590 return data;
22591 }
22592 else {
22593 var result = new _URI(data);
22594 result._formatted = data.external;
22595 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
22596 return result;
22597 }
22598 };
22599 return URI;
22600}());
22601
22602var _pathSepMarker = isWindows ? 1 : undefined;
22603// tslint:disable-next-line:class-name
22604var _URI = /** @class */ (function (_super) {
22605 __extends(_URI, _super);
22606 function _URI() {
22607 var _this = _super !== null && _super.apply(this, arguments) || this;
22608 _this._formatted = null;
22609 _this._fsPath = null;
22610 return _this;
22611 }
22612 Object.defineProperty(_URI.prototype, "fsPath", {
22613 get: function () {
22614 if (!this._fsPath) {
22615 this._fsPath = _makeFsPath(this);
22616 }
22617 return this._fsPath;
22618 },
22619 enumerable: true,
22620 configurable: true
22621 });
22622 _URI.prototype.toString = function (skipEncoding) {
22623 if (skipEncoding === void 0) { skipEncoding = false; }
22624 if (!skipEncoding) {
22625 if (!this._formatted) {
22626 this._formatted = _asFormatted(this, false);
22627 }
22628 return this._formatted;
22629 }
22630 else {
22631 // we don't cache that
22632 return _asFormatted(this, true);
22633 }
22634 };
22635 _URI.prototype.toJSON = function () {
22636 var res = {
22637 $mid: 1
22638 };
22639 // cached state
22640 if (this._fsPath) {
22641 res.fsPath = this._fsPath;
22642 res._sep = _pathSepMarker;
22643 }
22644 if (this._formatted) {
22645 res.external = this._formatted;
22646 }
22647 // uri components
22648 if (this.path) {
22649 res.path = this.path;
22650 }
22651 if (this.scheme) {
22652 res.scheme = this.scheme;
22653 }
22654 if (this.authority) {
22655 res.authority = this.authority;
22656 }
22657 if (this.query) {
22658 res.query = this.query;
22659 }
22660 if (this.fragment) {
22661 res.fragment = this.fragment;
22662 }
22663 return res;
22664 };
22665 return _URI;
22666}(URI));
22667// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
22668var encodeTable = (_a = {},
22669 _a[58 /* Colon */] = '%3A',
22670 _a[47 /* Slash */] = '%2F',
22671 _a[63 /* QuestionMark */] = '%3F',
22672 _a[35 /* Hash */] = '%23',
22673 _a[91 /* OpenSquareBracket */] = '%5B',
22674 _a[93 /* CloseSquareBracket */] = '%5D',
22675 _a[64 /* AtSign */] = '%40',
22676 _a[33 /* ExclamationMark */] = '%21',
22677 _a[36 /* DollarSign */] = '%24',
22678 _a[38 /* Ampersand */] = '%26',
22679 _a[39 /* SingleQuote */] = '%27',
22680 _a[40 /* OpenParen */] = '%28',
22681 _a[41 /* CloseParen */] = '%29',
22682 _a[42 /* Asterisk */] = '%2A',
22683 _a[43 /* Plus */] = '%2B',
22684 _a[44 /* Comma */] = '%2C',
22685 _a[59 /* Semicolon */] = '%3B',
22686 _a[61 /* Equals */] = '%3D',
22687 _a[32 /* Space */] = '%20',
22688 _a);
22689function encodeURIComponentFast(uriComponent, allowSlash) {
22690 var res = undefined;
22691 var nativeEncodePos = -1;
22692 for (var pos = 0; pos < uriComponent.length; pos++) {
22693 var code = uriComponent.charCodeAt(pos);
22694 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
22695 if ((code >= 97 /* a */ && code <= 122 /* z */)
22696 || (code >= 65 /* A */ && code <= 90 /* Z */)
22697 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
22698 || code === 45 /* Dash */
22699 || code === 46 /* Period */
22700 || code === 95 /* Underline */
22701 || code === 126 /* Tilde */
22702 || (allowSlash && code === 47 /* Slash */)) {
22703 // check if we are delaying native encode
22704 if (nativeEncodePos !== -1) {
22705 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
22706 nativeEncodePos = -1;
22707 }
22708 // check if we write into a new string (by default we try to return the param)
22709 if (res !== undefined) {
22710 res += uriComponent.charAt(pos);
22711 }
22712 }
22713 else {
22714 // encoding needed, we need to allocate a new string
22715 if (res === undefined) {
22716 res = uriComponent.substr(0, pos);
22717 }
22718 // check with default table first
22719 var escaped = encodeTable[code];
22720 if (escaped !== undefined) {
22721 // check if we are delaying native encode
22722 if (nativeEncodePos !== -1) {
22723 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
22724 nativeEncodePos = -1;
22725 }
22726 // append escaped variant to result
22727 res += escaped;
22728 }
22729 else if (nativeEncodePos === -1) {
22730 // use native encode only when needed
22731 nativeEncodePos = pos;
22732 }
22733 }
22734 }
22735 if (nativeEncodePos !== -1) {
22736 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
22737 }
22738 return res !== undefined ? res : uriComponent;
22739}
22740function encodeURIComponentMinimal(path) {
22741 var res = undefined;
22742 for (var pos = 0; pos < path.length; pos++) {
22743 var code = path.charCodeAt(pos);
22744 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
22745 if (res === undefined) {
22746 res = path.substr(0, pos);
22747 }
22748 res += encodeTable[code];
22749 }
22750 else {
22751 if (res !== undefined) {
22752 res += path[pos];
22753 }
22754 }
22755 }
22756 return res !== undefined ? res : path;
22757}
22758/**
22759 * Compute `fsPath` for the given uri
22760 */
22761function _makeFsPath(uri) {
22762 var value;
22763 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
22764 // unc path: file://shares/c$/far/boo
22765 value = "//" + uri.authority + uri.path;
22766 }
22767 else if (uri.path.charCodeAt(0) === 47 /* Slash */
22768 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
22769 && uri.path.charCodeAt(2) === 58 /* Colon */) {
22770 // windows drive letter: file:///c:/far/boo
22771 value = uri.path[1].toLowerCase() + uri.path.substr(2);
22772 }
22773 else {
22774 // other path
22775 value = uri.path;
22776 }
22777 if (isWindows) {
22778 value = value.replace(/\//g, '\\');
22779 }
22780 return value;
22781}
22782/**
22783 * Create the external version of a uri
22784 */
22785function _asFormatted(uri, skipEncoding) {
22786 var encoder = !skipEncoding
22787 ? encodeURIComponentFast
22788 : encodeURIComponentMinimal;
22789 var res = '';
22790 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
22791 if (scheme) {
22792 res += scheme;
22793 res += ':';
22794 }
22795 if (authority || scheme === 'file') {
22796 res += _slash;
22797 res += _slash;
22798 }
22799 if (authority) {
22800 var idx = authority.indexOf('@');
22801 if (idx !== -1) {
22802 // <user>@<auth>
22803 var userinfo = authority.substr(0, idx);
22804 authority = authority.substr(idx + 1);
22805 idx = userinfo.indexOf(':');
22806 if (idx === -1) {
22807 res += encoder(userinfo, false);
22808 }
22809 else {
22810 // <user>:<pass>@<auth>
22811 res += encoder(userinfo.substr(0, idx), false);
22812 res += ':';
22813 res += encoder(userinfo.substr(idx + 1), false);
22814 }
22815 res += '@';
22816 }
22817 authority = authority.toLowerCase();
22818 idx = authority.indexOf(':');
22819 if (idx === -1) {
22820 res += encoder(authority, false);
22821 }
22822 else {
22823 // <auth>:<port>
22824 res += encoder(authority.substr(0, idx), false);
22825 res += authority.substr(idx);
22826 }
22827 }
22828 if (path) {
22829 // lower-case windows drive letters in /C:/fff or C:/fff
22830 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
22831 var code = path.charCodeAt(1);
22832 if (code >= 65 /* A */ && code <= 90 /* Z */) {
22833 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
22834 }
22835 }
22836 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
22837 var code = path.charCodeAt(0);
22838 if (code >= 65 /* A */ && code <= 90 /* Z */) {
22839 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
22840 }
22841 }
22842 // encode the rest of the path
22843 res += encoder(path, true);
22844 }
22845 if (query) {
22846 res += '?';
22847 res += encoder(query, false);
22848 }
22849 if (fragment) {
22850 res += '#';
22851 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
22852 }
22853 return res;
22854}
22855
22856
22857/***/ }),
22858/* 150 */,
22859/* 151 */,
22860/* 152 */,
22861/* 153 */,
22862/* 154 */,
22863/* 155 */,
22864/* 156 */,
22865/* 157 */,
22866/* 158 */,
22867/* 159 */,
22868/* 160 */,
22869/* 161 */,
22870/* 162 */,
22871/* 163 */,
22872/* 164 */,
22873/* 165 */,
22874/* 166 */
22875/***/ (function(module, __webpack_exports__, __webpack_require__) {
22876
22877"use strict";
22878__webpack_require__.r(__webpack_exports__);
22879/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
22880/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; });
22881
22882/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
22883/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; });
22884
22885/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(189);
22886/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; });
22887
22888/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(181);
22889/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; });
22890
22891/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
22892/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; });
22893
22894/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(190);
22895/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; });
22896
22897/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(191);
22898/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; });
22899
22900/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(208);
22901/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; });
22902
22903/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(209);
22904/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; });
22905
22906/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(213);
22907/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; });
22908
22909/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(192);
22910/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; });
22911
22912/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(214);
22913/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; });
22914
22915/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(217);
22916/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; });
22917
22918/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; });
22919
22920/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(198);
22921/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; });
22922
22923/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(175);
22924/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; });
22925
22926/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(169);
22927/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; });
22928
22929/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(200);
22930/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; });
22931
22932/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"]; });
22933
22934/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(182);
22935/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; });
22936
22937/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(218);
22938/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; });
22939
22940/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(183);
22941/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; });
22942
22943/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(219);
22944/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; });
22945
22946/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(220);
22947/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; });
22948
22949/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(221);
22950/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; });
22951
22952/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(186);
22953/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; });
22954
22955/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(178);
22956/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; });
22957
22958/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(222);
22959/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; });
22960
22961/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(223);
22962/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; });
22963
22964/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(225);
22965/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; });
22966
22967/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(226);
22968/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; });
22969
22970/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(237);
22971/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; });
22972
22973/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(248);
22974/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; });
22975
22976/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(201);
22977/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; });
22978
22979/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(249);
22980/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; });
22981
22982/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(241);
22983/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; });
22984
22985/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(250);
22986/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; });
22987
22988/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(251);
22989/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; });
22990
22991/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(252);
22992/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; });
22993
22994/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(253);
22995/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; });
22996
22997/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(254);
22998/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; });
22999
23000/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(256);
23001/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; });
23002
23003/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(257);
23004/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; });
23005
23006/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(202);
23007/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; });
23008
23009/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(258);
23010/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; });
23011
23012/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(259);
23013/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; });
23014
23015/* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(260);
23016/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"]; });
23017
23018/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(263);
23019/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"]; });
23020
23021/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(264);
23022/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"]; });
23023
23024/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(207);
23025/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"]; });
23026
23027/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(265);
23028/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"]; });
23029
23030/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(266);
23031/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"]; });
23032
23033/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(267);
23034/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"]; });
23035
23036/* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(242);
23037/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"]; });
23038
23039/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; });
23040
23041/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; });
23042
23043/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(173);
23044/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"]; });
23045
23046/** PURE_IMPORTS_START PURE_IMPORTS_END */
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102//# sourceMappingURL=index.js.map
23103
23104
23105/***/ }),
23106/* 167 */
23107/***/ (function(module, __webpack_exports__, __webpack_require__) {
23108
23109"use strict";
23110__webpack_require__.r(__webpack_exports__);
23111/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
23112/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(168);
23113/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(180);
23114/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(181);
23115/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
23116/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(173);
23117/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
23118
23119
23120
23121
23122
23123var Observable = /*@__PURE__*/ (function () {
23124 function Observable(subscribe) {
23125 this._isScalar = false;
23126 if (subscribe) {
23127 this._subscribe = subscribe;
23128 }
23129 }
23130 Observable.prototype.lift = function (operator) {
23131 var observable = new Observable();
23132 observable.source = this;
23133 observable.operator = operator;
23134 return observable;
23135 };
23136 Observable.prototype.subscribe = function (observerOrNext, error, complete) {
23137 var operator = this.operator;
23138 var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete);
23139 if (operator) {
23140 sink.add(operator.call(sink, this.source));
23141 }
23142 else {
23143 sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
23144 this._subscribe(sink) :
23145 this._trySubscribe(sink));
23146 }
23147 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
23148 if (sink.syncErrorThrowable) {
23149 sink.syncErrorThrowable = false;
23150 if (sink.syncErrorThrown) {
23151 throw sink.syncErrorValue;
23152 }
23153 }
23154 }
23155 return sink;
23156 };
23157 Observable.prototype._trySubscribe = function (sink) {
23158 try {
23159 return this._subscribe(sink);
23160 }
23161 catch (err) {
23162 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
23163 sink.syncErrorThrown = true;
23164 sink.syncErrorValue = err;
23165 }
23166 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) {
23167 sink.error(err);
23168 }
23169 else {
23170 console.warn(err);
23171 }
23172 }
23173 };
23174 Observable.prototype.forEach = function (next, promiseCtor) {
23175 var _this = this;
23176 promiseCtor = getPromiseCtor(promiseCtor);
23177 return new promiseCtor(function (resolve, reject) {
23178 var subscription;
23179 subscription = _this.subscribe(function (value) {
23180 try {
23181 next(value);
23182 }
23183 catch (err) {
23184 reject(err);
23185 if (subscription) {
23186 subscription.unsubscribe();
23187 }
23188 }
23189 }, reject, resolve);
23190 });
23191 };
23192 Observable.prototype._subscribe = function (subscriber) {
23193 var source = this.source;
23194 return source && source.subscribe(subscriber);
23195 };
23196 Observable.prototype[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]] = function () {
23197 return this;
23198 };
23199 Observable.prototype.pipe = function () {
23200 var operations = [];
23201 for (var _i = 0; _i < arguments.length; _i++) {
23202 operations[_i] = arguments[_i];
23203 }
23204 if (operations.length === 0) {
23205 return this;
23206 }
23207 return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
23208 };
23209 Observable.prototype.toPromise = function (promiseCtor) {
23210 var _this = this;
23211 promiseCtor = getPromiseCtor(promiseCtor);
23212 return new promiseCtor(function (resolve, reject) {
23213 var value;
23214 _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
23215 });
23216 };
23217 Observable.create = function (subscribe) {
23218 return new Observable(subscribe);
23219 };
23220 return Observable;
23221}());
23222
23223function getPromiseCtor(promiseCtor) {
23224 if (!promiseCtor) {
23225 promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise;
23226 }
23227 if (!promiseCtor) {
23228 throw new Error('no Promise impl found');
23229 }
23230 return promiseCtor;
23231}
23232//# sourceMappingURL=Observable.js.map
23233
23234
23235/***/ }),
23236/* 168 */
23237/***/ (function(module, __webpack_exports__, __webpack_require__) {
23238
23239"use strict";
23240__webpack_require__.r(__webpack_exports__);
23241/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; });
23242/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
23243/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */
23244
23245function canReportError(observer) {
23246 while (observer) {
23247 var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
23248 if (closed_1 || isStopped) {
23249 return false;
23250 }
23251 else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
23252 observer = destination;
23253 }
23254 else {
23255 observer = null;
23256 }
23257 }
23258 return true;
23259}
23260//# sourceMappingURL=canReportError.js.map
23261
23262
23263/***/ }),
23264/* 169 */
23265/***/ (function(module, __webpack_exports__, __webpack_require__) {
23266
23267"use strict";
23268__webpack_require__.r(__webpack_exports__);
23269/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; });
23270/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafeSubscriber", function() { return SafeSubscriber; });
23271/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
23272/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
23273/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
23274/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
23275/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(179);
23276/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(173);
23277/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(174);
23278/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
23279
23280
23281
23282
23283
23284
23285
23286var Subscriber = /*@__PURE__*/ (function (_super) {
23287 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subscriber, _super);
23288 function Subscriber(destinationOrNext, error, complete) {
23289 var _this = _super.call(this) || this;
23290 _this.syncErrorValue = null;
23291 _this.syncErrorThrown = false;
23292 _this.syncErrorThrowable = false;
23293 _this.isStopped = false;
23294 switch (arguments.length) {
23295 case 0:
23296 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
23297 break;
23298 case 1:
23299 if (!destinationOrNext) {
23300 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
23301 break;
23302 }
23303 if (typeof destinationOrNext === 'object') {
23304 if (destinationOrNext instanceof Subscriber) {
23305 _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
23306 _this.destination = destinationOrNext;
23307 destinationOrNext.add(_this);
23308 }
23309 else {
23310 _this.syncErrorThrowable = true;
23311 _this.destination = new SafeSubscriber(_this, destinationOrNext);
23312 }
23313 break;
23314 }
23315 default:
23316 _this.syncErrorThrowable = true;
23317 _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
23318 break;
23319 }
23320 return _this;
23321 }
23322 Subscriber.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__["rxSubscriber"]] = function () { return this; };
23323 Subscriber.create = function (next, error, complete) {
23324 var subscriber = new Subscriber(next, error, complete);
23325 subscriber.syncErrorThrowable = false;
23326 return subscriber;
23327 };
23328 Subscriber.prototype.next = function (value) {
23329 if (!this.isStopped) {
23330 this._next(value);
23331 }
23332 };
23333 Subscriber.prototype.error = function (err) {
23334 if (!this.isStopped) {
23335 this.isStopped = true;
23336 this._error(err);
23337 }
23338 };
23339 Subscriber.prototype.complete = function () {
23340 if (!this.isStopped) {
23341 this.isStopped = true;
23342 this._complete();
23343 }
23344 };
23345 Subscriber.prototype.unsubscribe = function () {
23346 if (this.closed) {
23347 return;
23348 }
23349 this.isStopped = true;
23350 _super.prototype.unsubscribe.call(this);
23351 };
23352 Subscriber.prototype._next = function (value) {
23353 this.destination.next(value);
23354 };
23355 Subscriber.prototype._error = function (err) {
23356 this.destination.error(err);
23357 this.unsubscribe();
23358 };
23359 Subscriber.prototype._complete = function () {
23360 this.destination.complete();
23361 this.unsubscribe();
23362 };
23363 Subscriber.prototype._unsubscribeAndRecycle = function () {
23364 var _parentOrParents = this._parentOrParents;
23365 this._parentOrParents = null;
23366 this.unsubscribe();
23367 this.closed = false;
23368 this.isStopped = false;
23369 this._parentOrParents = _parentOrParents;
23370 return this;
23371 };
23372 return Subscriber;
23373}(_Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"]));
23374
23375var SafeSubscriber = /*@__PURE__*/ (function (_super) {
23376 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SafeSubscriber, _super);
23377 function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
23378 var _this = _super.call(this) || this;
23379 _this._parentSubscriber = _parentSubscriber;
23380 var next;
23381 var context = _this;
23382 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(observerOrNext)) {
23383 next = observerOrNext;
23384 }
23385 else if (observerOrNext) {
23386 next = observerOrNext.next;
23387 error = observerOrNext.error;
23388 complete = observerOrNext.complete;
23389 if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]) {
23390 context = Object.create(observerOrNext);
23391 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(context.unsubscribe)) {
23392 _this.add(context.unsubscribe.bind(context));
23393 }
23394 context.unsubscribe = _this.unsubscribe.bind(_this);
23395 }
23396 }
23397 _this._context = context;
23398 _this._next = next;
23399 _this._error = error;
23400 _this._complete = complete;
23401 return _this;
23402 }
23403 SafeSubscriber.prototype.next = function (value) {
23404 if (!this.isStopped && this._next) {
23405 var _parentSubscriber = this._parentSubscriber;
23406 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23407 this.__tryOrUnsub(this._next, value);
23408 }
23409 else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
23410 this.unsubscribe();
23411 }
23412 }
23413 };
23414 SafeSubscriber.prototype.error = function (err) {
23415 if (!this.isStopped) {
23416 var _parentSubscriber = this._parentSubscriber;
23417 var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling;
23418 if (this._error) {
23419 if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23420 this.__tryOrUnsub(this._error, err);
23421 this.unsubscribe();
23422 }
23423 else {
23424 this.__tryOrSetError(_parentSubscriber, this._error, err);
23425 this.unsubscribe();
23426 }
23427 }
23428 else if (!_parentSubscriber.syncErrorThrowable) {
23429 this.unsubscribe();
23430 if (useDeprecatedSynchronousErrorHandling) {
23431 throw err;
23432 }
23433 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23434 }
23435 else {
23436 if (useDeprecatedSynchronousErrorHandling) {
23437 _parentSubscriber.syncErrorValue = err;
23438 _parentSubscriber.syncErrorThrown = true;
23439 }
23440 else {
23441 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23442 }
23443 this.unsubscribe();
23444 }
23445 }
23446 };
23447 SafeSubscriber.prototype.complete = function () {
23448 var _this = this;
23449 if (!this.isStopped) {
23450 var _parentSubscriber = this._parentSubscriber;
23451 if (this._complete) {
23452 var wrappedComplete = function () { return _this._complete.call(_this._context); };
23453 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23454 this.__tryOrUnsub(wrappedComplete);
23455 this.unsubscribe();
23456 }
23457 else {
23458 this.__tryOrSetError(_parentSubscriber, wrappedComplete);
23459 this.unsubscribe();
23460 }
23461 }
23462 else {
23463 this.unsubscribe();
23464 }
23465 }
23466 };
23467 SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
23468 try {
23469 fn.call(this._context, value);
23470 }
23471 catch (err) {
23472 this.unsubscribe();
23473 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
23474 throw err;
23475 }
23476 else {
23477 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23478 }
23479 }
23480 };
23481 SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
23482 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
23483 throw new Error('bad call');
23484 }
23485 try {
23486 fn.call(this._context, value);
23487 }
23488 catch (err) {
23489 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
23490 parent.syncErrorValue = err;
23491 parent.syncErrorThrown = true;
23492 return true;
23493 }
23494 else {
23495 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
23496 return true;
23497 }
23498 }
23499 return false;
23500 };
23501 SafeSubscriber.prototype._unsubscribe = function () {
23502 var _parentSubscriber = this._parentSubscriber;
23503 this._context = null;
23504 this._parentSubscriber = null;
23505 _parentSubscriber.unsubscribe();
23506 };
23507 return SafeSubscriber;
23508}(Subscriber));
23509
23510//# sourceMappingURL=Subscriber.js.map
23511
23512
23513/***/ }),
23514/* 170 */
23515/***/ (function(module, __webpack_exports__, __webpack_require__) {
23516
23517"use strict";
23518__webpack_require__.r(__webpack_exports__);
23519/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
23520/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
23521/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
23522/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
23523/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
23524/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
23525/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
23526/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
23527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
23528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
23529/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
23530/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
23531/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
23532/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
23533/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
23534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
23535/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
23536/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
23537/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
23538/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
23539/*! *****************************************************************************
23540Copyright (c) Microsoft Corporation. All rights reserved.
23541Licensed under the Apache License, Version 2.0 (the "License"); you may not use
23542this file except in compliance with the License. You may obtain a copy of the
23543License at http://www.apache.org/licenses/LICENSE-2.0
23544
23545THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23546KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
23547WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
23548MERCHANTABLITY OR NON-INFRINGEMENT.
23549
23550See the Apache Version 2.0 License for specific language governing permissions
23551and limitations under the License.
23552***************************************************************************** */
23553/* global Reflect, Promise */
23554
23555var extendStatics = function(d, b) {
23556 extendStatics = Object.setPrototypeOf ||
23557 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23558 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23559 return extendStatics(d, b);
23560};
23561
23562function __extends(d, b) {
23563 extendStatics(d, b);
23564 function __() { this.constructor = d; }
23565 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23566}
23567
23568var __assign = function() {
23569 __assign = Object.assign || function __assign(t) {
23570 for (var s, i = 1, n = arguments.length; i < n; i++) {
23571 s = arguments[i];
23572 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
23573 }
23574 return t;
23575 }
23576 return __assign.apply(this, arguments);
23577}
23578
23579function __rest(s, e) {
23580 var t = {};
23581 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
23582 t[p] = s[p];
23583 if (s != null && typeof Object.getOwnPropertySymbols === "function")
23584 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23585 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23586 t[p[i]] = s[p[i]];
23587 }
23588 return t;
23589}
23590
23591function __decorate(decorators, target, key, desc) {
23592 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23593 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23594 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;
23595 return c > 3 && r && Object.defineProperty(target, key, r), r;
23596}
23597
23598function __param(paramIndex, decorator) {
23599 return function (target, key) { decorator(target, key, paramIndex); }
23600}
23601
23602function __metadata(metadataKey, metadataValue) {
23603 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
23604}
23605
23606function __awaiter(thisArg, _arguments, P, generator) {
23607 return new (P || (P = Promise))(function (resolve, reject) {
23608 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
23609 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
23610 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
23611 step((generator = generator.apply(thisArg, _arguments || [])).next());
23612 });
23613}
23614
23615function __generator(thisArg, body) {
23616 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23617 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23618 function verb(n) { return function (v) { return step([n, v]); }; }
23619 function step(op) {
23620 if (f) throw new TypeError("Generator is already executing.");
23621 while (_) try {
23622 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;
23623 if (y = 0, t) op = [op[0] & 2, t.value];
23624 switch (op[0]) {
23625 case 0: case 1: t = op; break;
23626 case 4: _.label++; return { value: op[1], done: false };
23627 case 5: _.label++; y = op[1]; op = [0]; continue;
23628 case 7: op = _.ops.pop(); _.trys.pop(); continue;
23629 default:
23630 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
23631 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
23632 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
23633 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
23634 if (t[2]) _.ops.pop();
23635 _.trys.pop(); continue;
23636 }
23637 op = body.call(thisArg, _);
23638 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
23639 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
23640 }
23641}
23642
23643function __exportStar(m, exports) {
23644 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
23645}
23646
23647function __values(o) {
23648 var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
23649 if (m) return m.call(o);
23650 return {
23651 next: function () {
23652 if (o && i >= o.length) o = void 0;
23653 return { value: o && o[i++], done: !o };
23654 }
23655 };
23656}
23657
23658function __read(o, n) {
23659 var m = typeof Symbol === "function" && o[Symbol.iterator];
23660 if (!m) return o;
23661 var i = m.call(o), r, ar = [], e;
23662 try {
23663 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23664 }
23665 catch (error) { e = { error: error }; }
23666 finally {
23667 try {
23668 if (r && !r.done && (m = i["return"])) m.call(i);
23669 }
23670 finally { if (e) throw e.error; }
23671 }
23672 return ar;
23673}
23674
23675function __spread() {
23676 for (var ar = [], i = 0; i < arguments.length; i++)
23677 ar = ar.concat(__read(arguments[i]));
23678 return ar;
23679}
23680
23681function __spreadArrays() {
23682 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
23683 for (var r = Array(s), k = 0, i = 0; i < il; i++)
23684 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
23685 r[k] = a[j];
23686 return r;
23687};
23688
23689function __await(v) {
23690 return this instanceof __await ? (this.v = v, this) : new __await(v);
23691}
23692
23693function __asyncGenerator(thisArg, _arguments, generator) {
23694 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
23695 var g = generator.apply(thisArg, _arguments || []), i, q = [];
23696 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
23697 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); }); }; }
23698 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
23699 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
23700 function fulfill(value) { resume("next", value); }
23701 function reject(value) { resume("throw", value); }
23702 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
23703}
23704
23705function __asyncDelegator(o) {
23706 var i, p;
23707 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
23708 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; }
23709}
23710
23711function __asyncValues(o) {
23712 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
23713 var m = o[Symbol.asyncIterator], i;
23714 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);
23715 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); }); }; }
23716 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
23717}
23718
23719function __makeTemplateObject(cooked, raw) {
23720 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
23721 return cooked;
23722};
23723
23724function __importStar(mod) {
23725 if (mod && mod.__esModule) return mod;
23726 var result = {};
23727 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
23728 result.default = mod;
23729 return result;
23730}
23731
23732function __importDefault(mod) {
23733 return (mod && mod.__esModule) ? mod : { default: mod };
23734}
23735
23736
23737/***/ }),
23738/* 171 */
23739/***/ (function(module, __webpack_exports__, __webpack_require__) {
23740
23741"use strict";
23742__webpack_require__.r(__webpack_exports__);
23743/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; });
23744/** PURE_IMPORTS_START PURE_IMPORTS_END */
23745function isFunction(x) {
23746 return typeof x === 'function';
23747}
23748//# sourceMappingURL=isFunction.js.map
23749
23750
23751/***/ }),
23752/* 172 */
23753/***/ (function(module, __webpack_exports__, __webpack_require__) {
23754
23755"use strict";
23756__webpack_require__.r(__webpack_exports__);
23757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
23758/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(173);
23759/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
23760/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
23761
23762
23763var empty = {
23764 closed: true,
23765 next: function (value) { },
23766 error: function (err) {
23767 if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) {
23768 throw err;
23769 }
23770 else {
23771 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err);
23772 }
23773 },
23774 complete: function () { }
23775};
23776//# sourceMappingURL=Observer.js.map
23777
23778
23779/***/ }),
23780/* 173 */
23781/***/ (function(module, __webpack_exports__, __webpack_require__) {
23782
23783"use strict";
23784__webpack_require__.r(__webpack_exports__);
23785/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; });
23786/** PURE_IMPORTS_START PURE_IMPORTS_END */
23787var _enable_super_gross_mode_that_will_cause_bad_things = false;
23788var config = {
23789 Promise: undefined,
23790 set useDeprecatedSynchronousErrorHandling(value) {
23791 if (value) {
23792 var error = /*@__PURE__*/ new Error();
23793 /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
23794 }
23795 else if (_enable_super_gross_mode_that_will_cause_bad_things) {
23796 /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
23797 }
23798 _enable_super_gross_mode_that_will_cause_bad_things = value;
23799 },
23800 get useDeprecatedSynchronousErrorHandling() {
23801 return _enable_super_gross_mode_that_will_cause_bad_things;
23802 },
23803};
23804//# sourceMappingURL=config.js.map
23805
23806
23807/***/ }),
23808/* 174 */
23809/***/ (function(module, __webpack_exports__, __webpack_require__) {
23810
23811"use strict";
23812__webpack_require__.r(__webpack_exports__);
23813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; });
23814/** PURE_IMPORTS_START PURE_IMPORTS_END */
23815function hostReportError(err) {
23816 setTimeout(function () { throw err; }, 0);
23817}
23818//# sourceMappingURL=hostReportError.js.map
23819
23820
23821/***/ }),
23822/* 175 */
23823/***/ (function(module, __webpack_exports__, __webpack_require__) {
23824
23825"use strict";
23826__webpack_require__.r(__webpack_exports__);
23827/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription; });
23828/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
23829/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
23830/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
23831/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(178);
23832/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
23833
23834
23835
23836
23837var Subscription = /*@__PURE__*/ (function () {
23838 function Subscription(unsubscribe) {
23839 this.closed = false;
23840 this._parentOrParents = null;
23841 this._subscriptions = null;
23842 if (unsubscribe) {
23843 this._unsubscribe = unsubscribe;
23844 }
23845 }
23846 Subscription.prototype.unsubscribe = function () {
23847 var errors;
23848 if (this.closed) {
23849 return;
23850 }
23851 var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
23852 this.closed = true;
23853 this._parentOrParents = null;
23854 this._subscriptions = null;
23855 if (_parentOrParents instanceof Subscription) {
23856 _parentOrParents.remove(this);
23857 }
23858 else if (_parentOrParents !== null) {
23859 for (var index = 0; index < _parentOrParents.length; ++index) {
23860 var parent_1 = _parentOrParents[index];
23861 parent_1.remove(this);
23862 }
23863 }
23864 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) {
23865 try {
23866 _unsubscribe.call(this);
23867 }
23868 catch (e) {
23869 errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? flattenUnsubscriptionErrors(e.errors) : [e];
23870 }
23871 }
23872 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) {
23873 var index = -1;
23874 var len = _subscriptions.length;
23875 while (++index < len) {
23876 var sub = _subscriptions[index];
23877 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) {
23878 try {
23879 sub.unsubscribe();
23880 }
23881 catch (e) {
23882 errors = errors || [];
23883 if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) {
23884 errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
23885 }
23886 else {
23887 errors.push(e);
23888 }
23889 }
23890 }
23891 }
23892 }
23893 if (errors) {
23894 throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"](errors);
23895 }
23896 };
23897 Subscription.prototype.add = function (teardown) {
23898 var subscription = teardown;
23899 if (!teardown) {
23900 return Subscription.EMPTY;
23901 }
23902 switch (typeof teardown) {
23903 case 'function':
23904 subscription = new Subscription(teardown);
23905 case 'object':
23906 if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
23907 return subscription;
23908 }
23909 else if (this.closed) {
23910 subscription.unsubscribe();
23911 return subscription;
23912 }
23913 else if (!(subscription instanceof Subscription)) {
23914 var tmp = subscription;
23915 subscription = new Subscription();
23916 subscription._subscriptions = [tmp];
23917 }
23918 break;
23919 default: {
23920 throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
23921 }
23922 }
23923 var _parentOrParents = subscription._parentOrParents;
23924 if (_parentOrParents === null) {
23925 subscription._parentOrParents = this;
23926 }
23927 else if (_parentOrParents instanceof Subscription) {
23928 if (_parentOrParents === this) {
23929 return subscription;
23930 }
23931 subscription._parentOrParents = [_parentOrParents, this];
23932 }
23933 else if (_parentOrParents.indexOf(this) === -1) {
23934 _parentOrParents.push(this);
23935 }
23936 else {
23937 return subscription;
23938 }
23939 var subscriptions = this._subscriptions;
23940 if (subscriptions === null) {
23941 this._subscriptions = [subscription];
23942 }
23943 else {
23944 subscriptions.push(subscription);
23945 }
23946 return subscription;
23947 };
23948 Subscription.prototype.remove = function (subscription) {
23949 var subscriptions = this._subscriptions;
23950 if (subscriptions) {
23951 var subscriptionIndex = subscriptions.indexOf(subscription);
23952 if (subscriptionIndex !== -1) {
23953 subscriptions.splice(subscriptionIndex, 1);
23954 }
23955 }
23956 };
23957 Subscription.EMPTY = (function (empty) {
23958 empty.closed = true;
23959 return empty;
23960 }(new Subscription()));
23961 return Subscription;
23962}());
23963
23964function flattenUnsubscriptionErrors(errors) {
23965 return errors.reduce(function (errs, err) { return errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) ? err.errors : err); }, []);
23966}
23967//# sourceMappingURL=Subscription.js.map
23968
23969
23970/***/ }),
23971/* 176 */
23972/***/ (function(module, __webpack_exports__, __webpack_require__) {
23973
23974"use strict";
23975__webpack_require__.r(__webpack_exports__);
23976/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; });
23977/** PURE_IMPORTS_START PURE_IMPORTS_END */
23978var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();
23979//# sourceMappingURL=isArray.js.map
23980
23981
23982/***/ }),
23983/* 177 */
23984/***/ (function(module, __webpack_exports__, __webpack_require__) {
23985
23986"use strict";
23987__webpack_require__.r(__webpack_exports__);
23988/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
23989/** PURE_IMPORTS_START PURE_IMPORTS_END */
23990function isObject(x) {
23991 return x !== null && typeof x === 'object';
23992}
23993//# sourceMappingURL=isObject.js.map
23994
23995
23996/***/ }),
23997/* 178 */
23998/***/ (function(module, __webpack_exports__, __webpack_require__) {
23999
24000"use strict";
24001__webpack_require__.r(__webpack_exports__);
24002/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; });
24003/** PURE_IMPORTS_START PURE_IMPORTS_END */
24004var UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {
24005 function UnsubscriptionErrorImpl(errors) {
24006 Error.call(this);
24007 this.message = errors ?
24008 errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
24009 this.name = 'UnsubscriptionError';
24010 this.errors = errors;
24011 return this;
24012 }
24013 UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
24014 return UnsubscriptionErrorImpl;
24015})();
24016var UnsubscriptionError = UnsubscriptionErrorImpl;
24017//# sourceMappingURL=UnsubscriptionError.js.map
24018
24019
24020/***/ }),
24021/* 179 */
24022/***/ (function(module, __webpack_exports__, __webpack_require__) {
24023
24024"use strict";
24025__webpack_require__.r(__webpack_exports__);
24026/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rxSubscriber", function() { return rxSubscriber; });
24027/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function() { return $$rxSubscriber; });
24028/** PURE_IMPORTS_START PURE_IMPORTS_END */
24029var rxSubscriber = /*@__PURE__*/ (function () {
24030 return typeof Symbol === 'function'
24031 ? /*@__PURE__*/ Symbol('rxSubscriber')
24032 : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();
24033})();
24034var $$rxSubscriber = rxSubscriber;
24035//# sourceMappingURL=rxSubscriber.js.map
24036
24037
24038/***/ }),
24039/* 180 */
24040/***/ (function(module, __webpack_exports__, __webpack_require__) {
24041
24042"use strict";
24043__webpack_require__.r(__webpack_exports__);
24044/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; });
24045/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24046/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
24047/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172);
24048/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
24049
24050
24051
24052function toSubscriber(nextOrObserver, error, complete) {
24053 if (nextOrObserver) {
24054 if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
24055 return nextOrObserver;
24056 }
24057 if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) {
24058 return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]();
24059 }
24060 }
24061 if (!nextOrObserver && !error && !complete) {
24062 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]);
24063 }
24064 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete);
24065}
24066//# sourceMappingURL=toSubscriber.js.map
24067
24068
24069/***/ }),
24070/* 181 */
24071/***/ (function(module, __webpack_exports__, __webpack_require__) {
24072
24073"use strict";
24074__webpack_require__.r(__webpack_exports__);
24075/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; });
24076/** PURE_IMPORTS_START PURE_IMPORTS_END */
24077var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();
24078//# sourceMappingURL=observable.js.map
24079
24080
24081/***/ }),
24082/* 182 */
24083/***/ (function(module, __webpack_exports__, __webpack_require__) {
24084
24085"use strict";
24086__webpack_require__.r(__webpack_exports__);
24087/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
24088/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; });
24089/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
24090/** PURE_IMPORTS_START _identity PURE_IMPORTS_END */
24091
24092function pipe() {
24093 var fns = [];
24094 for (var _i = 0; _i < arguments.length; _i++) {
24095 fns[_i] = arguments[_i];
24096 }
24097 return pipeFromArray(fns);
24098}
24099function pipeFromArray(fns) {
24100 if (fns.length === 0) {
24101 return _identity__WEBPACK_IMPORTED_MODULE_0__["identity"];
24102 }
24103 if (fns.length === 1) {
24104 return fns[0];
24105 }
24106 return function piped(input) {
24107 return fns.reduce(function (prev, fn) { return fn(prev); }, input);
24108 };
24109}
24110//# sourceMappingURL=pipe.js.map
24111
24112
24113/***/ }),
24114/* 183 */
24115/***/ (function(module, __webpack_exports__, __webpack_require__) {
24116
24117"use strict";
24118__webpack_require__.r(__webpack_exports__);
24119/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
24120/** PURE_IMPORTS_START PURE_IMPORTS_END */
24121function identity(x) {
24122 return x;
24123}
24124//# sourceMappingURL=identity.js.map
24125
24126
24127/***/ }),
24128/* 184 */
24129/***/ (function(module, __webpack_exports__, __webpack_require__) {
24130
24131"use strict";
24132__webpack_require__.r(__webpack_exports__);
24133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; });
24134/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; });
24135/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24136/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24137/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
24138/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
24139/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(175);
24140/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(188);
24141/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
24142
24143
24144
24145
24146
24147
24148var ConnectableObservable = /*@__PURE__*/ (function (_super) {
24149 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableObservable, _super);
24150 function ConnectableObservable(source, subjectFactory) {
24151 var _this = _super.call(this) || this;
24152 _this.source = source;
24153 _this.subjectFactory = subjectFactory;
24154 _this._refCount = 0;
24155 _this._isComplete = false;
24156 return _this;
24157 }
24158 ConnectableObservable.prototype._subscribe = function (subscriber) {
24159 return this.getSubject().subscribe(subscriber);
24160 };
24161 ConnectableObservable.prototype.getSubject = function () {
24162 var subject = this._subject;
24163 if (!subject || subject.isStopped) {
24164 this._subject = this.subjectFactory();
24165 }
24166 return this._subject;
24167 };
24168 ConnectableObservable.prototype.connect = function () {
24169 var connection = this._connection;
24170 if (!connection) {
24171 this._isComplete = false;
24172 connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"]();
24173 connection.add(this.source
24174 .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
24175 if (connection.closed) {
24176 this._connection = null;
24177 connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
24178 }
24179 }
24180 return connection;
24181 };
24182 ConnectableObservable.prototype.refCount = function () {
24183 return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__["refCount"])()(this);
24184 };
24185 return ConnectableObservable;
24186}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
24187
24188var connectableObservableDescriptor = /*@__PURE__*/ (function () {
24189 var connectableProto = ConnectableObservable.prototype;
24190 return {
24191 operator: { value: null },
24192 _refCount: { value: 0, writable: true },
24193 _subject: { value: null, writable: true },
24194 _connection: { value: null, writable: true },
24195 _subscribe: { value: connectableProto._subscribe },
24196 _isComplete: { value: connectableProto._isComplete, writable: true },
24197 getSubject: { value: connectableProto.getSubject },
24198 connect: { value: connectableProto.connect },
24199 refCount: { value: connectableProto.refCount }
24200 };
24201})();
24202var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
24203 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableSubscriber, _super);
24204 function ConnectableSubscriber(destination, connectable) {
24205 var _this = _super.call(this, destination) || this;
24206 _this.connectable = connectable;
24207 return _this;
24208 }
24209 ConnectableSubscriber.prototype._error = function (err) {
24210 this._unsubscribe();
24211 _super.prototype._error.call(this, err);
24212 };
24213 ConnectableSubscriber.prototype._complete = function () {
24214 this.connectable._isComplete = true;
24215 this._unsubscribe();
24216 _super.prototype._complete.call(this);
24217 };
24218 ConnectableSubscriber.prototype._unsubscribe = function () {
24219 var connectable = this.connectable;
24220 if (connectable) {
24221 this.connectable = null;
24222 var connection = connectable._connection;
24223 connectable._refCount = 0;
24224 connectable._subject = null;
24225 connectable._connection = null;
24226 if (connection) {
24227 connection.unsubscribe();
24228 }
24229 }
24230 };
24231 return ConnectableSubscriber;
24232}(_Subject__WEBPACK_IMPORTED_MODULE_1__["SubjectSubscriber"]));
24233var RefCountOperator = /*@__PURE__*/ (function () {
24234 function RefCountOperator(connectable) {
24235 this.connectable = connectable;
24236 }
24237 RefCountOperator.prototype.call = function (subscriber, source) {
24238 var connectable = this.connectable;
24239 connectable._refCount++;
24240 var refCounter = new RefCountSubscriber(subscriber, connectable);
24241 var subscription = source.subscribe(refCounter);
24242 if (!refCounter.closed) {
24243 refCounter.connection = connectable.connect();
24244 }
24245 return subscription;
24246 };
24247 return RefCountOperator;
24248}());
24249var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
24250 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
24251 function RefCountSubscriber(destination, connectable) {
24252 var _this = _super.call(this, destination) || this;
24253 _this.connectable = connectable;
24254 return _this;
24255 }
24256 RefCountSubscriber.prototype._unsubscribe = function () {
24257 var connectable = this.connectable;
24258 if (!connectable) {
24259 this.connection = null;
24260 return;
24261 }
24262 this.connectable = null;
24263 var refCount = connectable._refCount;
24264 if (refCount <= 0) {
24265 this.connection = null;
24266 return;
24267 }
24268 connectable._refCount = refCount - 1;
24269 if (refCount > 1) {
24270 this.connection = null;
24271 return;
24272 }
24273 var connection = this.connection;
24274 var sharedConnection = connectable._connection;
24275 this.connection = null;
24276 if (sharedConnection && (!connection || sharedConnection === connection)) {
24277 sharedConnection.unsubscribe();
24278 }
24279 };
24280 return RefCountSubscriber;
24281}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
24282//# sourceMappingURL=ConnectableObservable.js.map
24283
24284
24285/***/ }),
24286/* 185 */
24287/***/ (function(module, __webpack_exports__, __webpack_require__) {
24288
24289"use strict";
24290__webpack_require__.r(__webpack_exports__);
24291/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; });
24292/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; });
24293/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; });
24294/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24295/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
24296/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
24297/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
24298/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(186);
24299/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(187);
24300/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(179);
24301/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
24302
24303
24304
24305
24306
24307
24308
24309var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
24310 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscriber, _super);
24311 function SubjectSubscriber(destination) {
24312 var _this = _super.call(this, destination) || this;
24313 _this.destination = destination;
24314 return _this;
24315 }
24316 return SubjectSubscriber;
24317}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
24318
24319var Subject = /*@__PURE__*/ (function (_super) {
24320 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subject, _super);
24321 function Subject() {
24322 var _this = _super.call(this) || this;
24323 _this.observers = [];
24324 _this.closed = false;
24325 _this.isStopped = false;
24326 _this.hasError = false;
24327 _this.thrownError = null;
24328 return _this;
24329 }
24330 Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__["rxSubscriber"]] = function () {
24331 return new SubjectSubscriber(this);
24332 };
24333 Subject.prototype.lift = function (operator) {
24334 var subject = new AnonymousSubject(this, this);
24335 subject.operator = operator;
24336 return subject;
24337 };
24338 Subject.prototype.next = function (value) {
24339 if (this.closed) {
24340 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24341 }
24342 if (!this.isStopped) {
24343 var observers = this.observers;
24344 var len = observers.length;
24345 var copy = observers.slice();
24346 for (var i = 0; i < len; i++) {
24347 copy[i].next(value);
24348 }
24349 }
24350 };
24351 Subject.prototype.error = function (err) {
24352 if (this.closed) {
24353 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24354 }
24355 this.hasError = true;
24356 this.thrownError = err;
24357 this.isStopped = true;
24358 var observers = this.observers;
24359 var len = observers.length;
24360 var copy = observers.slice();
24361 for (var i = 0; i < len; i++) {
24362 copy[i].error(err);
24363 }
24364 this.observers.length = 0;
24365 };
24366 Subject.prototype.complete = function () {
24367 if (this.closed) {
24368 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24369 }
24370 this.isStopped = true;
24371 var observers = this.observers;
24372 var len = observers.length;
24373 var copy = observers.slice();
24374 for (var i = 0; i < len; i++) {
24375 copy[i].complete();
24376 }
24377 this.observers.length = 0;
24378 };
24379 Subject.prototype.unsubscribe = function () {
24380 this.isStopped = true;
24381 this.closed = true;
24382 this.observers = null;
24383 };
24384 Subject.prototype._trySubscribe = function (subscriber) {
24385 if (this.closed) {
24386 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24387 }
24388 else {
24389 return _super.prototype._trySubscribe.call(this, subscriber);
24390 }
24391 };
24392 Subject.prototype._subscribe = function (subscriber) {
24393 if (this.closed) {
24394 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
24395 }
24396 else if (this.hasError) {
24397 subscriber.error(this.thrownError);
24398 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24399 }
24400 else if (this.isStopped) {
24401 subscriber.complete();
24402 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24403 }
24404 else {
24405 this.observers.push(subscriber);
24406 return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
24407 }
24408 };
24409 Subject.prototype.asObservable = function () {
24410 var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
24411 observable.source = this;
24412 return observable;
24413 };
24414 Subject.create = function (destination, source) {
24415 return new AnonymousSubject(destination, source);
24416 };
24417 return Subject;
24418}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
24419
24420var AnonymousSubject = /*@__PURE__*/ (function (_super) {
24421 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnonymousSubject, _super);
24422 function AnonymousSubject(destination, source) {
24423 var _this = _super.call(this) || this;
24424 _this.destination = destination;
24425 _this.source = source;
24426 return _this;
24427 }
24428 AnonymousSubject.prototype.next = function (value) {
24429 var destination = this.destination;
24430 if (destination && destination.next) {
24431 destination.next(value);
24432 }
24433 };
24434 AnonymousSubject.prototype.error = function (err) {
24435 var destination = this.destination;
24436 if (destination && destination.error) {
24437 this.destination.error(err);
24438 }
24439 };
24440 AnonymousSubject.prototype.complete = function () {
24441 var destination = this.destination;
24442 if (destination && destination.complete) {
24443 this.destination.complete();
24444 }
24445 };
24446 AnonymousSubject.prototype._subscribe = function (subscriber) {
24447 var source = this.source;
24448 if (source) {
24449 return this.source.subscribe(subscriber);
24450 }
24451 else {
24452 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24453 }
24454 };
24455 return AnonymousSubject;
24456}(Subject));
24457
24458//# sourceMappingURL=Subject.js.map
24459
24460
24461/***/ }),
24462/* 186 */
24463/***/ (function(module, __webpack_exports__, __webpack_require__) {
24464
24465"use strict";
24466__webpack_require__.r(__webpack_exports__);
24467/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
24468/** PURE_IMPORTS_START PURE_IMPORTS_END */
24469var ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {
24470 function ObjectUnsubscribedErrorImpl() {
24471 Error.call(this);
24472 this.message = 'object unsubscribed';
24473 this.name = 'ObjectUnsubscribedError';
24474 return this;
24475 }
24476 ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
24477 return ObjectUnsubscribedErrorImpl;
24478})();
24479var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
24480//# sourceMappingURL=ObjectUnsubscribedError.js.map
24481
24482
24483/***/ }),
24484/* 187 */
24485/***/ (function(module, __webpack_exports__, __webpack_require__) {
24486
24487"use strict";
24488__webpack_require__.r(__webpack_exports__);
24489/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; });
24490/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24491/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
24492/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
24493
24494
24495var SubjectSubscription = /*@__PURE__*/ (function (_super) {
24496 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscription, _super);
24497 function SubjectSubscription(subject, subscriber) {
24498 var _this = _super.call(this) || this;
24499 _this.subject = subject;
24500 _this.subscriber = subscriber;
24501 _this.closed = false;
24502 return _this;
24503 }
24504 SubjectSubscription.prototype.unsubscribe = function () {
24505 if (this.closed) {
24506 return;
24507 }
24508 this.closed = true;
24509 var subject = this.subject;
24510 var observers = subject.observers;
24511 this.subject = null;
24512 if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
24513 return;
24514 }
24515 var subscriberIndex = observers.indexOf(this.subscriber);
24516 if (subscriberIndex !== -1) {
24517 observers.splice(subscriberIndex, 1);
24518 }
24519 };
24520 return SubjectSubscription;
24521}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
24522
24523//# sourceMappingURL=SubjectSubscription.js.map
24524
24525
24526/***/ }),
24527/* 188 */
24528/***/ (function(module, __webpack_exports__, __webpack_require__) {
24529
24530"use strict";
24531__webpack_require__.r(__webpack_exports__);
24532/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; });
24533/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24534/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
24535/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
24536
24537
24538function refCount() {
24539 return function refCountOperatorFunction(source) {
24540 return source.lift(new RefCountOperator(source));
24541 };
24542}
24543var RefCountOperator = /*@__PURE__*/ (function () {
24544 function RefCountOperator(connectable) {
24545 this.connectable = connectable;
24546 }
24547 RefCountOperator.prototype.call = function (subscriber, source) {
24548 var connectable = this.connectable;
24549 connectable._refCount++;
24550 var refCounter = new RefCountSubscriber(subscriber, connectable);
24551 var subscription = source.subscribe(refCounter);
24552 if (!refCounter.closed) {
24553 refCounter.connection = connectable.connect();
24554 }
24555 return subscription;
24556 };
24557 return RefCountOperator;
24558}());
24559var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
24560 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
24561 function RefCountSubscriber(destination, connectable) {
24562 var _this = _super.call(this, destination) || this;
24563 _this.connectable = connectable;
24564 return _this;
24565 }
24566 RefCountSubscriber.prototype._unsubscribe = function () {
24567 var connectable = this.connectable;
24568 if (!connectable) {
24569 this.connection = null;
24570 return;
24571 }
24572 this.connectable = null;
24573 var refCount = connectable._refCount;
24574 if (refCount <= 0) {
24575 this.connection = null;
24576 return;
24577 }
24578 connectable._refCount = refCount - 1;
24579 if (refCount > 1) {
24580 this.connection = null;
24581 return;
24582 }
24583 var connection = this.connection;
24584 var sharedConnection = connectable._connection;
24585 this.connection = null;
24586 if (sharedConnection && (!connection || sharedConnection === connection)) {
24587 sharedConnection.unsubscribe();
24588 }
24589 };
24590 return RefCountSubscriber;
24591}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24592//# sourceMappingURL=refCount.js.map
24593
24594
24595/***/ }),
24596/* 189 */
24597/***/ (function(module, __webpack_exports__, __webpack_require__) {
24598
24599"use strict";
24600__webpack_require__.r(__webpack_exports__);
24601/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
24602/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; });
24603/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24604/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
24605/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
24606/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(167);
24607/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
24608/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
24609
24610
24611
24612
24613
24614function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
24615 return function (source) {
24616 return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
24617 };
24618}
24619var GroupByOperator = /*@__PURE__*/ (function () {
24620 function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
24621 this.keySelector = keySelector;
24622 this.elementSelector = elementSelector;
24623 this.durationSelector = durationSelector;
24624 this.subjectSelector = subjectSelector;
24625 }
24626 GroupByOperator.prototype.call = function (subscriber, source) {
24627 return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
24628 };
24629 return GroupByOperator;
24630}());
24631var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
24632 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupBySubscriber, _super);
24633 function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
24634 var _this = _super.call(this, destination) || this;
24635 _this.keySelector = keySelector;
24636 _this.elementSelector = elementSelector;
24637 _this.durationSelector = durationSelector;
24638 _this.subjectSelector = subjectSelector;
24639 _this.groups = null;
24640 _this.attemptedToUnsubscribe = false;
24641 _this.count = 0;
24642 return _this;
24643 }
24644 GroupBySubscriber.prototype._next = function (value) {
24645 var key;
24646 try {
24647 key = this.keySelector(value);
24648 }
24649 catch (err) {
24650 this.error(err);
24651 return;
24652 }
24653 this._group(value, key);
24654 };
24655 GroupBySubscriber.prototype._group = function (value, key) {
24656 var groups = this.groups;
24657 if (!groups) {
24658 groups = this.groups = new Map();
24659 }
24660 var group = groups.get(key);
24661 var element;
24662 if (this.elementSelector) {
24663 try {
24664 element = this.elementSelector(value);
24665 }
24666 catch (err) {
24667 this.error(err);
24668 }
24669 }
24670 else {
24671 element = value;
24672 }
24673 if (!group) {
24674 group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]());
24675 groups.set(key, group);
24676 var groupedObservable = new GroupedObservable(key, group, this);
24677 this.destination.next(groupedObservable);
24678 if (this.durationSelector) {
24679 var duration = void 0;
24680 try {
24681 duration = this.durationSelector(new GroupedObservable(key, group));
24682 }
24683 catch (err) {
24684 this.error(err);
24685 return;
24686 }
24687 this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
24688 }
24689 }
24690 if (!group.closed) {
24691 group.next(element);
24692 }
24693 };
24694 GroupBySubscriber.prototype._error = function (err) {
24695 var groups = this.groups;
24696 if (groups) {
24697 groups.forEach(function (group, key) {
24698 group.error(err);
24699 });
24700 groups.clear();
24701 }
24702 this.destination.error(err);
24703 };
24704 GroupBySubscriber.prototype._complete = function () {
24705 var groups = this.groups;
24706 if (groups) {
24707 groups.forEach(function (group, key) {
24708 group.complete();
24709 });
24710 groups.clear();
24711 }
24712 this.destination.complete();
24713 };
24714 GroupBySubscriber.prototype.removeGroup = function (key) {
24715 this.groups.delete(key);
24716 };
24717 GroupBySubscriber.prototype.unsubscribe = function () {
24718 if (!this.closed) {
24719 this.attemptedToUnsubscribe = true;
24720 if (this.count === 0) {
24721 _super.prototype.unsubscribe.call(this);
24722 }
24723 }
24724 };
24725 return GroupBySubscriber;
24726}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24727var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
24728 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupDurationSubscriber, _super);
24729 function GroupDurationSubscriber(key, group, parent) {
24730 var _this = _super.call(this, group) || this;
24731 _this.key = key;
24732 _this.group = group;
24733 _this.parent = parent;
24734 return _this;
24735 }
24736 GroupDurationSubscriber.prototype._next = function (value) {
24737 this.complete();
24738 };
24739 GroupDurationSubscriber.prototype._unsubscribe = function () {
24740 var _a = this, parent = _a.parent, key = _a.key;
24741 this.key = this.parent = null;
24742 if (parent) {
24743 parent.removeGroup(key);
24744 }
24745 };
24746 return GroupDurationSubscriber;
24747}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24748var GroupedObservable = /*@__PURE__*/ (function (_super) {
24749 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupedObservable, _super);
24750 function GroupedObservable(key, groupSubject, refCountSubscription) {
24751 var _this = _super.call(this) || this;
24752 _this.key = key;
24753 _this.groupSubject = groupSubject;
24754 _this.refCountSubscription = refCountSubscription;
24755 return _this;
24756 }
24757 GroupedObservable.prototype._subscribe = function (subscriber) {
24758 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
24759 var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
24760 if (refCountSubscription && !refCountSubscription.closed) {
24761 subscription.add(new InnerRefCountSubscription(refCountSubscription));
24762 }
24763 subscription.add(groupSubject.subscribe(subscriber));
24764 return subscription;
24765 };
24766 return GroupedObservable;
24767}(_Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]));
24768
24769var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
24770 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerRefCountSubscription, _super);
24771 function InnerRefCountSubscription(parent) {
24772 var _this = _super.call(this) || this;
24773 _this.parent = parent;
24774 parent.count++;
24775 return _this;
24776 }
24777 InnerRefCountSubscription.prototype.unsubscribe = function () {
24778 var parent = this.parent;
24779 if (!parent.closed && !this.closed) {
24780 _super.prototype.unsubscribe.call(this);
24781 parent.count -= 1;
24782 if (parent.count === 0 && parent.attemptedToUnsubscribe) {
24783 parent.unsubscribe();
24784 }
24785 }
24786 };
24787 return InnerRefCountSubscription;
24788}(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]));
24789//# sourceMappingURL=groupBy.js.map
24790
24791
24792/***/ }),
24793/* 190 */
24794/***/ (function(module, __webpack_exports__, __webpack_require__) {
24795
24796"use strict";
24797__webpack_require__.r(__webpack_exports__);
24798/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; });
24799/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24800/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24801/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(186);
24802/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
24803
24804
24805
24806var BehaviorSubject = /*@__PURE__*/ (function (_super) {
24807 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BehaviorSubject, _super);
24808 function BehaviorSubject(_value) {
24809 var _this = _super.call(this) || this;
24810 _this._value = _value;
24811 return _this;
24812 }
24813 Object.defineProperty(BehaviorSubject.prototype, "value", {
24814 get: function () {
24815 return this.getValue();
24816 },
24817 enumerable: true,
24818 configurable: true
24819 });
24820 BehaviorSubject.prototype._subscribe = function (subscriber) {
24821 var subscription = _super.prototype._subscribe.call(this, subscriber);
24822 if (subscription && !subscription.closed) {
24823 subscriber.next(this._value);
24824 }
24825 return subscription;
24826 };
24827 BehaviorSubject.prototype.getValue = function () {
24828 if (this.hasError) {
24829 throw this.thrownError;
24830 }
24831 else if (this.closed) {
24832 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__["ObjectUnsubscribedError"]();
24833 }
24834 else {
24835 return this._value;
24836 }
24837 };
24838 BehaviorSubject.prototype.next = function (value) {
24839 _super.prototype.next.call(this, this._value = value);
24840 };
24841 return BehaviorSubject;
24842}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
24843
24844//# sourceMappingURL=BehaviorSubject.js.map
24845
24846
24847/***/ }),
24848/* 191 */
24849/***/ (function(module, __webpack_exports__, __webpack_require__) {
24850
24851"use strict";
24852__webpack_require__.r(__webpack_exports__);
24853/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; });
24854/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
24855/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24856/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(192);
24857/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
24858/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(199);
24859/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(186);
24860/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(187);
24861/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
24862
24863
24864
24865
24866
24867
24868
24869var ReplaySubject = /*@__PURE__*/ (function (_super) {
24870 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ReplaySubject, _super);
24871 function ReplaySubject(bufferSize, windowTime, scheduler) {
24872 if (bufferSize === void 0) {
24873 bufferSize = Number.POSITIVE_INFINITY;
24874 }
24875 if (windowTime === void 0) {
24876 windowTime = Number.POSITIVE_INFINITY;
24877 }
24878 var _this = _super.call(this) || this;
24879 _this.scheduler = scheduler;
24880 _this._events = [];
24881 _this._infiniteTimeWindow = false;
24882 _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
24883 _this._windowTime = windowTime < 1 ? 1 : windowTime;
24884 if (windowTime === Number.POSITIVE_INFINITY) {
24885 _this._infiniteTimeWindow = true;
24886 _this.next = _this.nextInfiniteTimeWindow;
24887 }
24888 else {
24889 _this.next = _this.nextTimeWindow;
24890 }
24891 return _this;
24892 }
24893 ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
24894 var _events = this._events;
24895 _events.push(value);
24896 if (_events.length > this._bufferSize) {
24897 _events.shift();
24898 }
24899 _super.prototype.next.call(this, value);
24900 };
24901 ReplaySubject.prototype.nextTimeWindow = function (value) {
24902 this._events.push(new ReplayEvent(this._getNow(), value));
24903 this._trimBufferThenGetEvents();
24904 _super.prototype.next.call(this, value);
24905 };
24906 ReplaySubject.prototype._subscribe = function (subscriber) {
24907 var _infiniteTimeWindow = this._infiniteTimeWindow;
24908 var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
24909 var scheduler = this.scheduler;
24910 var len = _events.length;
24911 var subscription;
24912 if (this.closed) {
24913 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__["ObjectUnsubscribedError"]();
24914 }
24915 else if (this.isStopped || this.hasError) {
24916 subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
24917 }
24918 else {
24919 this.observers.push(subscriber);
24920 subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__["SubjectSubscription"](this, subscriber);
24921 }
24922 if (scheduler) {
24923 subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__["ObserveOnSubscriber"](subscriber, scheduler));
24924 }
24925 if (_infiniteTimeWindow) {
24926 for (var i = 0; i < len && !subscriber.closed; i++) {
24927 subscriber.next(_events[i]);
24928 }
24929 }
24930 else {
24931 for (var i = 0; i < len && !subscriber.closed; i++) {
24932 subscriber.next(_events[i].value);
24933 }
24934 }
24935 if (this.hasError) {
24936 subscriber.error(this.thrownError);
24937 }
24938 else if (this.isStopped) {
24939 subscriber.complete();
24940 }
24941 return subscription;
24942 };
24943 ReplaySubject.prototype._getNow = function () {
24944 return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__["queue"]).now();
24945 };
24946 ReplaySubject.prototype._trimBufferThenGetEvents = function () {
24947 var now = this._getNow();
24948 var _bufferSize = this._bufferSize;
24949 var _windowTime = this._windowTime;
24950 var _events = this._events;
24951 var eventsCount = _events.length;
24952 var spliceCount = 0;
24953 while (spliceCount < eventsCount) {
24954 if ((now - _events[spliceCount].time) < _windowTime) {
24955 break;
24956 }
24957 spliceCount++;
24958 }
24959 if (eventsCount > _bufferSize) {
24960 spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
24961 }
24962 if (spliceCount > 0) {
24963 _events.splice(0, spliceCount);
24964 }
24965 return _events;
24966 };
24967 return ReplaySubject;
24968}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
24969
24970var ReplayEvent = /*@__PURE__*/ (function () {
24971 function ReplayEvent(time, value) {
24972 this.time = time;
24973 this.value = value;
24974 }
24975 return ReplayEvent;
24976}());
24977//# sourceMappingURL=ReplaySubject.js.map
24978
24979
24980/***/ }),
24981/* 192 */
24982/***/ (function(module, __webpack_exports__, __webpack_require__) {
24983
24984"use strict";
24985__webpack_require__.r(__webpack_exports__);
24986/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; });
24987/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
24988/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
24989/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
24990
24991
24992var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
24993//# sourceMappingURL=queue.js.map
24994
24995
24996/***/ }),
24997/* 193 */
24998/***/ (function(module, __webpack_exports__, __webpack_require__) {
24999
25000"use strict";
25001__webpack_require__.r(__webpack_exports__);
25002/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; });
25003/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25004/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
25005/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
25006
25007
25008var QueueAction = /*@__PURE__*/ (function (_super) {
25009 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueAction, _super);
25010 function QueueAction(scheduler, work) {
25011 var _this = _super.call(this, scheduler, work) || this;
25012 _this.scheduler = scheduler;
25013 _this.work = work;
25014 return _this;
25015 }
25016 QueueAction.prototype.schedule = function (state, delay) {
25017 if (delay === void 0) {
25018 delay = 0;
25019 }
25020 if (delay > 0) {
25021 return _super.prototype.schedule.call(this, state, delay);
25022 }
25023 this.delay = delay;
25024 this.state = state;
25025 this.scheduler.flush(this);
25026 return this;
25027 };
25028 QueueAction.prototype.execute = function (state, delay) {
25029 return (delay > 0 || this.closed) ?
25030 _super.prototype.execute.call(this, state, delay) :
25031 this._execute(state, delay);
25032 };
25033 QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25034 if (delay === void 0) {
25035 delay = 0;
25036 }
25037 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25038 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25039 }
25040 return scheduler.flush(this);
25041 };
25042 return QueueAction;
25043}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
25044
25045//# sourceMappingURL=QueueAction.js.map
25046
25047
25048/***/ }),
25049/* 194 */
25050/***/ (function(module, __webpack_exports__, __webpack_require__) {
25051
25052"use strict";
25053__webpack_require__.r(__webpack_exports__);
25054/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; });
25055/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25056/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
25057/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
25058
25059
25060var AsyncAction = /*@__PURE__*/ (function (_super) {
25061 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncAction, _super);
25062 function AsyncAction(scheduler, work) {
25063 var _this = _super.call(this, scheduler, work) || this;
25064 _this.scheduler = scheduler;
25065 _this.work = work;
25066 _this.pending = false;
25067 return _this;
25068 }
25069 AsyncAction.prototype.schedule = function (state, delay) {
25070 if (delay === void 0) {
25071 delay = 0;
25072 }
25073 if (this.closed) {
25074 return this;
25075 }
25076 this.state = state;
25077 var id = this.id;
25078 var scheduler = this.scheduler;
25079 if (id != null) {
25080 this.id = this.recycleAsyncId(scheduler, id, delay);
25081 }
25082 this.pending = true;
25083 this.delay = delay;
25084 this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
25085 return this;
25086 };
25087 AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25088 if (delay === void 0) {
25089 delay = 0;
25090 }
25091 return setInterval(scheduler.flush.bind(scheduler, this), delay);
25092 };
25093 AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25094 if (delay === void 0) {
25095 delay = 0;
25096 }
25097 if (delay !== null && this.delay === delay && this.pending === false) {
25098 return id;
25099 }
25100 clearInterval(id);
25101 return undefined;
25102 };
25103 AsyncAction.prototype.execute = function (state, delay) {
25104 if (this.closed) {
25105 return new Error('executing a cancelled action');
25106 }
25107 this.pending = false;
25108 var error = this._execute(state, delay);
25109 if (error) {
25110 return error;
25111 }
25112 else if (this.pending === false && this.id != null) {
25113 this.id = this.recycleAsyncId(this.scheduler, this.id, null);
25114 }
25115 };
25116 AsyncAction.prototype._execute = function (state, delay) {
25117 var errored = false;
25118 var errorValue = undefined;
25119 try {
25120 this.work(state);
25121 }
25122 catch (e) {
25123 errored = true;
25124 errorValue = !!e && e || new Error(e);
25125 }
25126 if (errored) {
25127 this.unsubscribe();
25128 return errorValue;
25129 }
25130 };
25131 AsyncAction.prototype._unsubscribe = function () {
25132 var id = this.id;
25133 var scheduler = this.scheduler;
25134 var actions = scheduler.actions;
25135 var index = actions.indexOf(this);
25136 this.work = null;
25137 this.state = null;
25138 this.pending = false;
25139 this.scheduler = null;
25140 if (index !== -1) {
25141 actions.splice(index, 1);
25142 }
25143 if (id != null) {
25144 this.id = this.recycleAsyncId(scheduler, id, null);
25145 }
25146 this.delay = null;
25147 };
25148 return AsyncAction;
25149}(_Action__WEBPACK_IMPORTED_MODULE_1__["Action"]));
25150
25151//# sourceMappingURL=AsyncAction.js.map
25152
25153
25154/***/ }),
25155/* 195 */
25156/***/ (function(module, __webpack_exports__, __webpack_require__) {
25157
25158"use strict";
25159__webpack_require__.r(__webpack_exports__);
25160/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
25161/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25162/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
25163/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
25164
25165
25166var Action = /*@__PURE__*/ (function (_super) {
25167 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Action, _super);
25168 function Action(scheduler, work) {
25169 return _super.call(this) || this;
25170 }
25171 Action.prototype.schedule = function (state, delay) {
25172 if (delay === void 0) {
25173 delay = 0;
25174 }
25175 return this;
25176 };
25177 return Action;
25178}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
25179
25180//# sourceMappingURL=Action.js.map
25181
25182
25183/***/ }),
25184/* 196 */
25185/***/ (function(module, __webpack_exports__, __webpack_require__) {
25186
25187"use strict";
25188__webpack_require__.r(__webpack_exports__);
25189/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; });
25190/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25191/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25192/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25193
25194
25195var QueueScheduler = /*@__PURE__*/ (function (_super) {
25196 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueScheduler, _super);
25197 function QueueScheduler() {
25198 return _super !== null && _super.apply(this, arguments) || this;
25199 }
25200 return QueueScheduler;
25201}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
25202
25203//# sourceMappingURL=QueueScheduler.js.map
25204
25205
25206/***/ }),
25207/* 197 */
25208/***/ (function(module, __webpack_exports__, __webpack_require__) {
25209
25210"use strict";
25211__webpack_require__.r(__webpack_exports__);
25212/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; });
25213/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25214/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
25215/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
25216
25217
25218var AsyncScheduler = /*@__PURE__*/ (function (_super) {
25219 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncScheduler, _super);
25220 function AsyncScheduler(SchedulerAction, now) {
25221 if (now === void 0) {
25222 now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"].now;
25223 }
25224 var _this = _super.call(this, SchedulerAction, function () {
25225 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
25226 return AsyncScheduler.delegate.now();
25227 }
25228 else {
25229 return now();
25230 }
25231 }) || this;
25232 _this.actions = [];
25233 _this.active = false;
25234 _this.scheduled = undefined;
25235 return _this;
25236 }
25237 AsyncScheduler.prototype.schedule = function (work, delay, state) {
25238 if (delay === void 0) {
25239 delay = 0;
25240 }
25241 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
25242 return AsyncScheduler.delegate.schedule(work, delay, state);
25243 }
25244 else {
25245 return _super.prototype.schedule.call(this, work, delay, state);
25246 }
25247 };
25248 AsyncScheduler.prototype.flush = function (action) {
25249 var actions = this.actions;
25250 if (this.active) {
25251 actions.push(action);
25252 return;
25253 }
25254 var error;
25255 this.active = true;
25256 do {
25257 if (error = action.execute(action.state, action.delay)) {
25258 break;
25259 }
25260 } while (action = actions.shift());
25261 this.active = false;
25262 if (error) {
25263 while (action = actions.shift()) {
25264 action.unsubscribe();
25265 }
25266 throw error;
25267 }
25268 };
25269 return AsyncScheduler;
25270}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"]));
25271
25272//# sourceMappingURL=AsyncScheduler.js.map
25273
25274
25275/***/ }),
25276/* 198 */
25277/***/ (function(module, __webpack_exports__, __webpack_require__) {
25278
25279"use strict";
25280__webpack_require__.r(__webpack_exports__);
25281/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; });
25282var Scheduler = /*@__PURE__*/ (function () {
25283 function Scheduler(SchedulerAction, now) {
25284 if (now === void 0) {
25285 now = Scheduler.now;
25286 }
25287 this.SchedulerAction = SchedulerAction;
25288 this.now = now;
25289 }
25290 Scheduler.prototype.schedule = function (work, delay, state) {
25291 if (delay === void 0) {
25292 delay = 0;
25293 }
25294 return new this.SchedulerAction(this, work).schedule(state, delay);
25295 };
25296 Scheduler.now = function () { return Date.now(); };
25297 return Scheduler;
25298}());
25299
25300//# sourceMappingURL=Scheduler.js.map
25301
25302
25303/***/ }),
25304/* 199 */
25305/***/ (function(module, __webpack_exports__, __webpack_require__) {
25306
25307"use strict";
25308__webpack_require__.r(__webpack_exports__);
25309/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; });
25310/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; });
25311/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; });
25312/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; });
25313/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25314/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
25315/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
25316/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
25317
25318
25319
25320function observeOn(scheduler, delay) {
25321 if (delay === void 0) {
25322 delay = 0;
25323 }
25324 return function observeOnOperatorFunction(source) {
25325 return source.lift(new ObserveOnOperator(scheduler, delay));
25326 };
25327}
25328var ObserveOnOperator = /*@__PURE__*/ (function () {
25329 function ObserveOnOperator(scheduler, delay) {
25330 if (delay === void 0) {
25331 delay = 0;
25332 }
25333 this.scheduler = scheduler;
25334 this.delay = delay;
25335 }
25336 ObserveOnOperator.prototype.call = function (subscriber, source) {
25337 return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
25338 };
25339 return ObserveOnOperator;
25340}());
25341
25342var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
25343 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObserveOnSubscriber, _super);
25344 function ObserveOnSubscriber(destination, scheduler, delay) {
25345 if (delay === void 0) {
25346 delay = 0;
25347 }
25348 var _this = _super.call(this, destination) || this;
25349 _this.scheduler = scheduler;
25350 _this.delay = delay;
25351 return _this;
25352 }
25353 ObserveOnSubscriber.dispatch = function (arg) {
25354 var notification = arg.notification, destination = arg.destination;
25355 notification.observe(destination);
25356 this.unsubscribe();
25357 };
25358 ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
25359 var destination = this.destination;
25360 destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
25361 };
25362 ObserveOnSubscriber.prototype._next = function (value) {
25363 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
25364 };
25365 ObserveOnSubscriber.prototype._error = function (err) {
25366 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
25367 this.unsubscribe();
25368 };
25369 ObserveOnSubscriber.prototype._complete = function () {
25370 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
25371 this.unsubscribe();
25372 };
25373 return ObserveOnSubscriber;
25374}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
25375
25376var ObserveOnMessage = /*@__PURE__*/ (function () {
25377 function ObserveOnMessage(notification, destination) {
25378 this.notification = notification;
25379 this.destination = destination;
25380 }
25381 return ObserveOnMessage;
25382}());
25383
25384//# sourceMappingURL=observeOn.js.map
25385
25386
25387/***/ }),
25388/* 200 */
25389/***/ (function(module, __webpack_exports__, __webpack_require__) {
25390
25391"use strict";
25392__webpack_require__.r(__webpack_exports__);
25393/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; });
25394/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
25395/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(201);
25396/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
25397/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(207);
25398/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
25399
25400
25401
25402var NotificationKind;
25403/*@__PURE__*/ (function (NotificationKind) {
25404 NotificationKind["NEXT"] = "N";
25405 NotificationKind["ERROR"] = "E";
25406 NotificationKind["COMPLETE"] = "C";
25407})(NotificationKind || (NotificationKind = {}));
25408var Notification = /*@__PURE__*/ (function () {
25409 function Notification(kind, value, error) {
25410 this.kind = kind;
25411 this.value = value;
25412 this.error = error;
25413 this.hasValue = kind === 'N';
25414 }
25415 Notification.prototype.observe = function (observer) {
25416 switch (this.kind) {
25417 case 'N':
25418 return observer.next && observer.next(this.value);
25419 case 'E':
25420 return observer.error && observer.error(this.error);
25421 case 'C':
25422 return observer.complete && observer.complete();
25423 }
25424 };
25425 Notification.prototype.do = function (next, error, complete) {
25426 var kind = this.kind;
25427 switch (kind) {
25428 case 'N':
25429 return next && next(this.value);
25430 case 'E':
25431 return error && error(this.error);
25432 case 'C':
25433 return complete && complete();
25434 }
25435 };
25436 Notification.prototype.accept = function (nextOrObserver, error, complete) {
25437 if (nextOrObserver && typeof nextOrObserver.next === 'function') {
25438 return this.observe(nextOrObserver);
25439 }
25440 else {
25441 return this.do(nextOrObserver, error, complete);
25442 }
25443 };
25444 Notification.prototype.toObservable = function () {
25445 var kind = this.kind;
25446 switch (kind) {
25447 case 'N':
25448 return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value);
25449 case 'E':
25450 return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error);
25451 case 'C':
25452 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])();
25453 }
25454 throw new Error('unexpected notification kind value');
25455 };
25456 Notification.createNext = function (value) {
25457 if (typeof value !== 'undefined') {
25458 return new Notification('N', value);
25459 }
25460 return Notification.undefinedValueNotification;
25461 };
25462 Notification.createError = function (err) {
25463 return new Notification('E', undefined, err);
25464 };
25465 Notification.createComplete = function () {
25466 return Notification.completeNotification;
25467 };
25468 Notification.completeNotification = new Notification('C');
25469 Notification.undefinedValueNotification = new Notification('N', undefined);
25470 return Notification;
25471}());
25472
25473//# sourceMappingURL=Notification.js.map
25474
25475
25476/***/ }),
25477/* 201 */
25478/***/ (function(module, __webpack_exports__, __webpack_require__) {
25479
25480"use strict";
25481__webpack_require__.r(__webpack_exports__);
25482/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; });
25483/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
25484/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25485/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
25486
25487var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.complete(); });
25488function empty(scheduler) {
25489 return scheduler ? emptyScheduled(scheduler) : EMPTY;
25490}
25491function emptyScheduled(scheduler) {
25492 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
25493}
25494//# sourceMappingURL=empty.js.map
25495
25496
25497/***/ }),
25498/* 202 */
25499/***/ (function(module, __webpack_exports__, __webpack_require__) {
25500
25501"use strict";
25502__webpack_require__.r(__webpack_exports__);
25503/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; });
25504/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(203);
25505/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
25506/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
25507/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */
25508
25509
25510
25511function of() {
25512 var args = [];
25513 for (var _i = 0; _i < arguments.length; _i++) {
25514 args[_i] = arguments[_i];
25515 }
25516 var scheduler = args[args.length - 1];
25517 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
25518 args.pop();
25519 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler);
25520 }
25521 else {
25522 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args);
25523 }
25524}
25525//# sourceMappingURL=of.js.map
25526
25527
25528/***/ }),
25529/* 203 */
25530/***/ (function(module, __webpack_exports__, __webpack_require__) {
25531
25532"use strict";
25533__webpack_require__.r(__webpack_exports__);
25534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; });
25535/** PURE_IMPORTS_START PURE_IMPORTS_END */
25536function isScheduler(value) {
25537 return value && typeof value.schedule === 'function';
25538}
25539//# sourceMappingURL=isScheduler.js.map
25540
25541
25542/***/ }),
25543/* 204 */
25544/***/ (function(module, __webpack_exports__, __webpack_require__) {
25545
25546"use strict";
25547__webpack_require__.r(__webpack_exports__);
25548/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; });
25549/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25550/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
25551/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
25552/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */
25553
25554
25555
25556function fromArray(input, scheduler) {
25557 if (!scheduler) {
25558 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input));
25559 }
25560 else {
25561 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
25562 }
25563}
25564//# sourceMappingURL=fromArray.js.map
25565
25566
25567/***/ }),
25568/* 205 */
25569/***/ (function(module, __webpack_exports__, __webpack_require__) {
25570
25571"use strict";
25572__webpack_require__.r(__webpack_exports__);
25573/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; });
25574/** PURE_IMPORTS_START PURE_IMPORTS_END */
25575var subscribeToArray = function (array) {
25576 return function (subscriber) {
25577 for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
25578 subscriber.next(array[i]);
25579 }
25580 subscriber.complete();
25581 };
25582};
25583//# sourceMappingURL=subscribeToArray.js.map
25584
25585
25586/***/ }),
25587/* 206 */
25588/***/ (function(module, __webpack_exports__, __webpack_require__) {
25589
25590"use strict";
25591__webpack_require__.r(__webpack_exports__);
25592/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleArray", function() { return scheduleArray; });
25593/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25594/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
25595/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
25596
25597
25598function scheduleArray(input, scheduler) {
25599 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
25600 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
25601 var i = 0;
25602 sub.add(scheduler.schedule(function () {
25603 if (i === input.length) {
25604 subscriber.complete();
25605 return;
25606 }
25607 subscriber.next(input[i++]);
25608 if (!subscriber.closed) {
25609 sub.add(this.schedule());
25610 }
25611 }));
25612 return sub;
25613 });
25614}
25615//# sourceMappingURL=scheduleArray.js.map
25616
25617
25618/***/ }),
25619/* 207 */
25620/***/ (function(module, __webpack_exports__, __webpack_require__) {
25621
25622"use strict";
25623__webpack_require__.r(__webpack_exports__);
25624/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; });
25625/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
25626/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
25627
25628function throwError(error, scheduler) {
25629 if (!scheduler) {
25630 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.error(error); });
25631 }
25632 else {
25633 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
25634 }
25635}
25636function dispatch(_a) {
25637 var error = _a.error, subscriber = _a.subscriber;
25638 subscriber.error(error);
25639}
25640//# sourceMappingURL=throwError.js.map
25641
25642
25643/***/ }),
25644/* 208 */
25645/***/ (function(module, __webpack_exports__, __webpack_require__) {
25646
25647"use strict";
25648__webpack_require__.r(__webpack_exports__);
25649/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; });
25650/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25651/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
25652/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
25653/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
25654
25655
25656
25657var AsyncSubject = /*@__PURE__*/ (function (_super) {
25658 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncSubject, _super);
25659 function AsyncSubject() {
25660 var _this = _super !== null && _super.apply(this, arguments) || this;
25661 _this.value = null;
25662 _this.hasNext = false;
25663 _this.hasCompleted = false;
25664 return _this;
25665 }
25666 AsyncSubject.prototype._subscribe = function (subscriber) {
25667 if (this.hasError) {
25668 subscriber.error(this.thrownError);
25669 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
25670 }
25671 else if (this.hasCompleted && this.hasNext) {
25672 subscriber.next(this.value);
25673 subscriber.complete();
25674 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
25675 }
25676 return _super.prototype._subscribe.call(this, subscriber);
25677 };
25678 AsyncSubject.prototype.next = function (value) {
25679 if (!this.hasCompleted) {
25680 this.value = value;
25681 this.hasNext = true;
25682 }
25683 };
25684 AsyncSubject.prototype.error = function (error) {
25685 if (!this.hasCompleted) {
25686 _super.prototype.error.call(this, error);
25687 }
25688 };
25689 AsyncSubject.prototype.complete = function () {
25690 this.hasCompleted = true;
25691 if (this.hasNext) {
25692 _super.prototype.next.call(this, this.value);
25693 }
25694 _super.prototype.complete.call(this);
25695 };
25696 return AsyncSubject;
25697}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
25698
25699//# sourceMappingURL=AsyncSubject.js.map
25700
25701
25702/***/ }),
25703/* 209 */
25704/***/ (function(module, __webpack_exports__, __webpack_require__) {
25705
25706"use strict";
25707__webpack_require__.r(__webpack_exports__);
25708/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; });
25709/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(210);
25710/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
25711/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
25712
25713
25714var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
25715//# sourceMappingURL=asap.js.map
25716
25717
25718/***/ }),
25719/* 210 */
25720/***/ (function(module, __webpack_exports__, __webpack_require__) {
25721
25722"use strict";
25723__webpack_require__.r(__webpack_exports__);
25724/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; });
25725/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25726/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
25727/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
25728/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
25729
25730
25731
25732var AsapAction = /*@__PURE__*/ (function (_super) {
25733 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapAction, _super);
25734 function AsapAction(scheduler, work) {
25735 var _this = _super.call(this, scheduler, work) || this;
25736 _this.scheduler = scheduler;
25737 _this.work = work;
25738 return _this;
25739 }
25740 AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25741 if (delay === void 0) {
25742 delay = 0;
25743 }
25744 if (delay !== null && delay > 0) {
25745 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25746 }
25747 scheduler.actions.push(this);
25748 return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
25749 };
25750 AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25751 if (delay === void 0) {
25752 delay = 0;
25753 }
25754 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25755 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
25756 }
25757 if (scheduler.actions.length === 0) {
25758 _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].clearImmediate(id);
25759 scheduler.scheduled = undefined;
25760 }
25761 return undefined;
25762 };
25763 return AsapAction;
25764}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__["AsyncAction"]));
25765
25766//# sourceMappingURL=AsapAction.js.map
25767
25768
25769/***/ }),
25770/* 211 */
25771/***/ (function(module, __webpack_exports__, __webpack_require__) {
25772
25773"use strict";
25774__webpack_require__.r(__webpack_exports__);
25775/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; });
25776/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestTools", function() { return TestTools; });
25777/** PURE_IMPORTS_START PURE_IMPORTS_END */
25778var nextHandle = 1;
25779var RESOLVED = /*@__PURE__*/ (function () { return /*@__PURE__*/ Promise.resolve(); })();
25780var activeHandles = {};
25781function findAndClearHandle(handle) {
25782 if (handle in activeHandles) {
25783 delete activeHandles[handle];
25784 return true;
25785 }
25786 return false;
25787}
25788var Immediate = {
25789 setImmediate: function (cb) {
25790 var handle = nextHandle++;
25791 activeHandles[handle] = true;
25792 RESOLVED.then(function () { return findAndClearHandle(handle) && cb(); });
25793 return handle;
25794 },
25795 clearImmediate: function (handle) {
25796 findAndClearHandle(handle);
25797 },
25798};
25799var TestTools = {
25800 pending: function () {
25801 return Object.keys(activeHandles).length;
25802 }
25803};
25804//# sourceMappingURL=Immediate.js.map
25805
25806
25807/***/ }),
25808/* 212 */
25809/***/ (function(module, __webpack_exports__, __webpack_require__) {
25810
25811"use strict";
25812__webpack_require__.r(__webpack_exports__);
25813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; });
25814/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25815/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25816/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25817
25818
25819var AsapScheduler = /*@__PURE__*/ (function (_super) {
25820 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapScheduler, _super);
25821 function AsapScheduler() {
25822 return _super !== null && _super.apply(this, arguments) || this;
25823 }
25824 AsapScheduler.prototype.flush = function (action) {
25825 this.active = true;
25826 this.scheduled = undefined;
25827 var actions = this.actions;
25828 var error;
25829 var index = -1;
25830 var count = actions.length;
25831 action = action || actions.shift();
25832 do {
25833 if (error = action.execute(action.state, action.delay)) {
25834 break;
25835 }
25836 } while (++index < count && (action = actions.shift()));
25837 this.active = false;
25838 if (error) {
25839 while (++index < count && (action = actions.shift())) {
25840 action.unsubscribe();
25841 }
25842 throw error;
25843 }
25844 };
25845 return AsapScheduler;
25846}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
25847
25848//# sourceMappingURL=AsapScheduler.js.map
25849
25850
25851/***/ }),
25852/* 213 */
25853/***/ (function(module, __webpack_exports__, __webpack_require__) {
25854
25855"use strict";
25856__webpack_require__.r(__webpack_exports__);
25857/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; });
25858/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
25859/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25860/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
25861
25862
25863var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
25864//# sourceMappingURL=async.js.map
25865
25866
25867/***/ }),
25868/* 214 */
25869/***/ (function(module, __webpack_exports__, __webpack_require__) {
25870
25871"use strict";
25872__webpack_require__.r(__webpack_exports__);
25873/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; });
25874/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(215);
25875/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(216);
25876/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
25877
25878
25879var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
25880//# sourceMappingURL=animationFrame.js.map
25881
25882
25883/***/ }),
25884/* 215 */
25885/***/ (function(module, __webpack_exports__, __webpack_require__) {
25886
25887"use strict";
25888__webpack_require__.r(__webpack_exports__);
25889/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; });
25890/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25891/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
25892/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
25893
25894
25895var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
25896 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameAction, _super);
25897 function AnimationFrameAction(scheduler, work) {
25898 var _this = _super.call(this, scheduler, work) || this;
25899 _this.scheduler = scheduler;
25900 _this.work = work;
25901 return _this;
25902 }
25903 AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25904 if (delay === void 0) {
25905 delay = 0;
25906 }
25907 if (delay !== null && delay > 0) {
25908 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25909 }
25910 scheduler.actions.push(this);
25911 return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
25912 };
25913 AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25914 if (delay === void 0) {
25915 delay = 0;
25916 }
25917 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25918 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
25919 }
25920 if (scheduler.actions.length === 0) {
25921 cancelAnimationFrame(id);
25922 scheduler.scheduled = undefined;
25923 }
25924 return undefined;
25925 };
25926 return AnimationFrameAction;
25927}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
25928
25929//# sourceMappingURL=AnimationFrameAction.js.map
25930
25931
25932/***/ }),
25933/* 216 */
25934/***/ (function(module, __webpack_exports__, __webpack_require__) {
25935
25936"use strict";
25937__webpack_require__.r(__webpack_exports__);
25938/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; });
25939/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25940/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25941/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25942
25943
25944var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
25945 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameScheduler, _super);
25946 function AnimationFrameScheduler() {
25947 return _super !== null && _super.apply(this, arguments) || this;
25948 }
25949 AnimationFrameScheduler.prototype.flush = function (action) {
25950 this.active = true;
25951 this.scheduled = undefined;
25952 var actions = this.actions;
25953 var error;
25954 var index = -1;
25955 var count = actions.length;
25956 action = action || actions.shift();
25957 do {
25958 if (error = action.execute(action.state, action.delay)) {
25959 break;
25960 }
25961 } while (++index < count && (action = actions.shift()));
25962 this.active = false;
25963 if (error) {
25964 while (++index < count && (action = actions.shift())) {
25965 action.unsubscribe();
25966 }
25967 throw error;
25968 }
25969 };
25970 return AnimationFrameScheduler;
25971}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
25972
25973//# sourceMappingURL=AnimationFrameScheduler.js.map
25974
25975
25976/***/ }),
25977/* 217 */
25978/***/ (function(module, __webpack_exports__, __webpack_require__) {
25979
25980"use strict";
25981__webpack_require__.r(__webpack_exports__);
25982/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; });
25983/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; });
25984/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
25985/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
25986/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(197);
25987/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
25988
25989
25990
25991var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
25992 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualTimeScheduler, _super);
25993 function VirtualTimeScheduler(SchedulerAction, maxFrames) {
25994 if (SchedulerAction === void 0) {
25995 SchedulerAction = VirtualAction;
25996 }
25997 if (maxFrames === void 0) {
25998 maxFrames = Number.POSITIVE_INFINITY;
25999 }
26000 var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
26001 _this.maxFrames = maxFrames;
26002 _this.frame = 0;
26003 _this.index = -1;
26004 return _this;
26005 }
26006 VirtualTimeScheduler.prototype.flush = function () {
26007 var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
26008 var error, action;
26009 while ((action = actions[0]) && action.delay <= maxFrames) {
26010 actions.shift();
26011 this.frame = action.delay;
26012 if (error = action.execute(action.state, action.delay)) {
26013 break;
26014 }
26015 }
26016 if (error) {
26017 while (action = actions.shift()) {
26018 action.unsubscribe();
26019 }
26020 throw error;
26021 }
26022 };
26023 VirtualTimeScheduler.frameTimeFactor = 10;
26024 return VirtualTimeScheduler;
26025}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__["AsyncScheduler"]));
26026
26027var VirtualAction = /*@__PURE__*/ (function (_super) {
26028 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualAction, _super);
26029 function VirtualAction(scheduler, work, index) {
26030 if (index === void 0) {
26031 index = scheduler.index += 1;
26032 }
26033 var _this = _super.call(this, scheduler, work) || this;
26034 _this.scheduler = scheduler;
26035 _this.work = work;
26036 _this.index = index;
26037 _this.active = true;
26038 _this.index = scheduler.index = index;
26039 return _this;
26040 }
26041 VirtualAction.prototype.schedule = function (state, delay) {
26042 if (delay === void 0) {
26043 delay = 0;
26044 }
26045 if (!this.id) {
26046 return _super.prototype.schedule.call(this, state, delay);
26047 }
26048 this.active = false;
26049 var action = new VirtualAction(this.scheduler, this.work);
26050 this.add(action);
26051 return action.schedule(state, delay);
26052 };
26053 VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
26054 if (delay === void 0) {
26055 delay = 0;
26056 }
26057 this.delay = scheduler.frame + delay;
26058 var actions = scheduler.actions;
26059 actions.push(this);
26060 actions.sort(VirtualAction.sortActions);
26061 return true;
26062 };
26063 VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
26064 if (delay === void 0) {
26065 delay = 0;
26066 }
26067 return undefined;
26068 };
26069 VirtualAction.prototype._execute = function (state, delay) {
26070 if (this.active === true) {
26071 return _super.prototype._execute.call(this, state, delay);
26072 }
26073 };
26074 VirtualAction.sortActions = function (a, b) {
26075 if (a.delay === b.delay) {
26076 if (a.index === b.index) {
26077 return 0;
26078 }
26079 else if (a.index > b.index) {
26080 return 1;
26081 }
26082 else {
26083 return -1;
26084 }
26085 }
26086 else if (a.delay > b.delay) {
26087 return 1;
26088 }
26089 else {
26090 return -1;
26091 }
26092 };
26093 return VirtualAction;
26094}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
26095
26096//# sourceMappingURL=VirtualTimeScheduler.js.map
26097
26098
26099/***/ }),
26100/* 218 */
26101/***/ (function(module, __webpack_exports__, __webpack_require__) {
26102
26103"use strict";
26104__webpack_require__.r(__webpack_exports__);
26105/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
26106/** PURE_IMPORTS_START PURE_IMPORTS_END */
26107function noop() { }
26108//# sourceMappingURL=noop.js.map
26109
26110
26111/***/ }),
26112/* 219 */
26113/***/ (function(module, __webpack_exports__, __webpack_require__) {
26114
26115"use strict";
26116__webpack_require__.r(__webpack_exports__);
26117/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
26118/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
26119/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
26120
26121function isObservable(obj) {
26122 return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
26123}
26124//# sourceMappingURL=isObservable.js.map
26125
26126
26127/***/ }),
26128/* 220 */
26129/***/ (function(module, __webpack_exports__, __webpack_require__) {
26130
26131"use strict";
26132__webpack_require__.r(__webpack_exports__);
26133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
26134/** PURE_IMPORTS_START PURE_IMPORTS_END */
26135var ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {
26136 function ArgumentOutOfRangeErrorImpl() {
26137 Error.call(this);
26138 this.message = 'argument out of range';
26139 this.name = 'ArgumentOutOfRangeError';
26140 return this;
26141 }
26142 ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26143 return ArgumentOutOfRangeErrorImpl;
26144})();
26145var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
26146//# sourceMappingURL=ArgumentOutOfRangeError.js.map
26147
26148
26149/***/ }),
26150/* 221 */
26151/***/ (function(module, __webpack_exports__, __webpack_require__) {
26152
26153"use strict";
26154__webpack_require__.r(__webpack_exports__);
26155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
26156/** PURE_IMPORTS_START PURE_IMPORTS_END */
26157var EmptyErrorImpl = /*@__PURE__*/ (function () {
26158 function EmptyErrorImpl() {
26159 Error.call(this);
26160 this.message = 'no elements in sequence';
26161 this.name = 'EmptyError';
26162 return this;
26163 }
26164 EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26165 return EmptyErrorImpl;
26166})();
26167var EmptyError = EmptyErrorImpl;
26168//# sourceMappingURL=EmptyError.js.map
26169
26170
26171/***/ }),
26172/* 222 */
26173/***/ (function(module, __webpack_exports__, __webpack_require__) {
26174
26175"use strict";
26176__webpack_require__.r(__webpack_exports__);
26177/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
26178/** PURE_IMPORTS_START PURE_IMPORTS_END */
26179var TimeoutErrorImpl = /*@__PURE__*/ (function () {
26180 function TimeoutErrorImpl() {
26181 Error.call(this);
26182 this.message = 'Timeout has occurred';
26183 this.name = 'TimeoutError';
26184 return this;
26185 }
26186 TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26187 return TimeoutErrorImpl;
26188})();
26189var TimeoutError = TimeoutErrorImpl;
26190//# sourceMappingURL=TimeoutError.js.map
26191
26192
26193/***/ }),
26194/* 223 */
26195/***/ (function(module, __webpack_exports__, __webpack_require__) {
26196
26197"use strict";
26198__webpack_require__.r(__webpack_exports__);
26199/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
26200/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
26201/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
26202/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
26203/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
26204/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(176);
26205/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(203);
26206/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
26207
26208
26209
26210
26211
26212
26213function bindCallback(callbackFunc, resultSelector, scheduler) {
26214 if (resultSelector) {
26215 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) {
26216 scheduler = resultSelector;
26217 }
26218 else {
26219 return function () {
26220 var args = [];
26221 for (var _i = 0; _i < arguments.length; _i++) {
26222 args[_i] = arguments[_i];
26223 }
26224 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); }));
26225 };
26226 }
26227 }
26228 return function () {
26229 var args = [];
26230 for (var _i = 0; _i < arguments.length; _i++) {
26231 args[_i] = arguments[_i];
26232 }
26233 var context = this;
26234 var subject;
26235 var params = {
26236 context: context,
26237 subject: subject,
26238 callbackFunc: callbackFunc,
26239 scheduler: scheduler,
26240 };
26241 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
26242 if (!scheduler) {
26243 if (!subject) {
26244 subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26245 var handler = function () {
26246 var innerArgs = [];
26247 for (var _i = 0; _i < arguments.length; _i++) {
26248 innerArgs[_i] = arguments[_i];
26249 }
26250 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
26251 subject.complete();
26252 };
26253 try {
26254 callbackFunc.apply(context, args.concat([handler]));
26255 }
26256 catch (err) {
26257 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
26258 subject.error(err);
26259 }
26260 else {
26261 console.warn(err);
26262 }
26263 }
26264 }
26265 return subject.subscribe(subscriber);
26266 }
26267 else {
26268 var state = {
26269 args: args, subscriber: subscriber, params: params,
26270 };
26271 return scheduler.schedule(dispatch, 0, state);
26272 }
26273 });
26274 };
26275}
26276function dispatch(state) {
26277 var _this = this;
26278 var self = this;
26279 var args = state.args, subscriber = state.subscriber, params = state.params;
26280 var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
26281 var subject = params.subject;
26282 if (!subject) {
26283 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26284 var handler = function () {
26285 var innerArgs = [];
26286 for (var _i = 0; _i < arguments.length; _i++) {
26287 innerArgs[_i] = arguments[_i];
26288 }
26289 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
26290 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
26291 };
26292 try {
26293 callbackFunc.apply(context, args.concat([handler]));
26294 }
26295 catch (err) {
26296 subject.error(err);
26297 }
26298 }
26299 this.add(subject.subscribe(subscriber));
26300}
26301function dispatchNext(state) {
26302 var value = state.value, subject = state.subject;
26303 subject.next(value);
26304 subject.complete();
26305}
26306function dispatchError(state) {
26307 var err = state.err, subject = state.subject;
26308 subject.error(err);
26309}
26310//# sourceMappingURL=bindCallback.js.map
26311
26312
26313/***/ }),
26314/* 224 */
26315/***/ (function(module, __webpack_exports__, __webpack_require__) {
26316
26317"use strict";
26318__webpack_require__.r(__webpack_exports__);
26319/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
26320/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; });
26321/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26322/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
26323/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26324
26325
26326function map(project, thisArg) {
26327 return function mapOperation(source) {
26328 if (typeof project !== 'function') {
26329 throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
26330 }
26331 return source.lift(new MapOperator(project, thisArg));
26332 };
26333}
26334var MapOperator = /*@__PURE__*/ (function () {
26335 function MapOperator(project, thisArg) {
26336 this.project = project;
26337 this.thisArg = thisArg;
26338 }
26339 MapOperator.prototype.call = function (subscriber, source) {
26340 return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
26341 };
26342 return MapOperator;
26343}());
26344
26345var MapSubscriber = /*@__PURE__*/ (function (_super) {
26346 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapSubscriber, _super);
26347 function MapSubscriber(destination, project, thisArg) {
26348 var _this = _super.call(this, destination) || this;
26349 _this.project = project;
26350 _this.count = 0;
26351 _this.thisArg = thisArg || _this;
26352 return _this;
26353 }
26354 MapSubscriber.prototype._next = function (value) {
26355 var result;
26356 try {
26357 result = this.project.call(this.thisArg, value, this.count++);
26358 }
26359 catch (err) {
26360 this.destination.error(err);
26361 return;
26362 }
26363 this.destination.next(result);
26364 };
26365 return MapSubscriber;
26366}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26367//# sourceMappingURL=map.js.map
26368
26369
26370/***/ }),
26371/* 225 */
26372/***/ (function(module, __webpack_exports__, __webpack_require__) {
26373
26374"use strict";
26375__webpack_require__.r(__webpack_exports__);
26376/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
26377/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
26378/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
26379/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
26380/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
26381/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(203);
26382/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(176);
26383/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
26384
26385
26386
26387
26388
26389
26390function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
26391 if (resultSelector) {
26392 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
26393 scheduler = resultSelector;
26394 }
26395 else {
26396 return function () {
26397 var args = [];
26398 for (var _i = 0; _i < arguments.length; _i++) {
26399 args[_i] = arguments[_i];
26400 }
26401 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); }));
26402 };
26403 }
26404 }
26405 return function () {
26406 var args = [];
26407 for (var _i = 0; _i < arguments.length; _i++) {
26408 args[_i] = arguments[_i];
26409 }
26410 var params = {
26411 subject: undefined,
26412 args: args,
26413 callbackFunc: callbackFunc,
26414 scheduler: scheduler,
26415 context: this,
26416 };
26417 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
26418 var context = params.context;
26419 var subject = params.subject;
26420 if (!scheduler) {
26421 if (!subject) {
26422 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26423 var handler = function () {
26424 var innerArgs = [];
26425 for (var _i = 0; _i < arguments.length; _i++) {
26426 innerArgs[_i] = arguments[_i];
26427 }
26428 var err = innerArgs.shift();
26429 if (err) {
26430 subject.error(err);
26431 return;
26432 }
26433 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
26434 subject.complete();
26435 };
26436 try {
26437 callbackFunc.apply(context, args.concat([handler]));
26438 }
26439 catch (err) {
26440 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
26441 subject.error(err);
26442 }
26443 else {
26444 console.warn(err);
26445 }
26446 }
26447 }
26448 return subject.subscribe(subscriber);
26449 }
26450 else {
26451 return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
26452 }
26453 });
26454 };
26455}
26456function dispatch(state) {
26457 var _this = this;
26458 var params = state.params, subscriber = state.subscriber, context = state.context;
26459 var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
26460 var subject = params.subject;
26461 if (!subject) {
26462 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
26463 var handler = function () {
26464 var innerArgs = [];
26465 for (var _i = 0; _i < arguments.length; _i++) {
26466 innerArgs[_i] = arguments[_i];
26467 }
26468 var err = innerArgs.shift();
26469 if (err) {
26470 _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
26471 }
26472 else {
26473 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
26474 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
26475 }
26476 };
26477 try {
26478 callbackFunc.apply(context, args.concat([handler]));
26479 }
26480 catch (err) {
26481 this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
26482 }
26483 }
26484 this.add(subject.subscribe(subscriber));
26485}
26486function dispatchNext(arg) {
26487 var value = arg.value, subject = arg.subject;
26488 subject.next(value);
26489 subject.complete();
26490}
26491function dispatchError(arg) {
26492 var err = arg.err, subject = arg.subject;
26493 subject.error(err);
26494}
26495//# sourceMappingURL=bindNodeCallback.js.map
26496
26497
26498/***/ }),
26499/* 226 */
26500/***/ (function(module, __webpack_exports__, __webpack_require__) {
26501
26502"use strict";
26503__webpack_require__.r(__webpack_exports__);
26504/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
26505/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; });
26506/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; });
26507/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26508/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
26509/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
26510/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
26511/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
26512/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(204);
26513/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
26514
26515
26516
26517
26518
26519
26520var NONE = {};
26521function combineLatest() {
26522 var observables = [];
26523 for (var _i = 0; _i < arguments.length; _i++) {
26524 observables[_i] = arguments[_i];
26525 }
26526 var resultSelector = null;
26527 var scheduler = null;
26528 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(observables[observables.length - 1])) {
26529 scheduler = observables.pop();
26530 }
26531 if (typeof observables[observables.length - 1] === 'function') {
26532 resultSelector = observables.pop();
26533 }
26534 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(observables[0])) {
26535 observables = observables[0];
26536 }
26537 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
26538}
26539var CombineLatestOperator = /*@__PURE__*/ (function () {
26540 function CombineLatestOperator(resultSelector) {
26541 this.resultSelector = resultSelector;
26542 }
26543 CombineLatestOperator.prototype.call = function (subscriber, source) {
26544 return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
26545 };
26546 return CombineLatestOperator;
26547}());
26548
26549var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
26550 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CombineLatestSubscriber, _super);
26551 function CombineLatestSubscriber(destination, resultSelector) {
26552 var _this = _super.call(this, destination) || this;
26553 _this.resultSelector = resultSelector;
26554 _this.active = 0;
26555 _this.values = [];
26556 _this.observables = [];
26557 return _this;
26558 }
26559 CombineLatestSubscriber.prototype._next = function (observable) {
26560 this.values.push(NONE);
26561 this.observables.push(observable);
26562 };
26563 CombineLatestSubscriber.prototype._complete = function () {
26564 var observables = this.observables;
26565 var len = observables.length;
26566 if (len === 0) {
26567 this.destination.complete();
26568 }
26569 else {
26570 this.active = len;
26571 this.toRespond = len;
26572 for (var i = 0; i < len; i++) {
26573 var observable = observables[i];
26574 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i));
26575 }
26576 }
26577 };
26578 CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
26579 if ((this.active -= 1) === 0) {
26580 this.destination.complete();
26581 }
26582 };
26583 CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26584 var values = this.values;
26585 var oldVal = values[outerIndex];
26586 var toRespond = !this.toRespond
26587 ? 0
26588 : oldVal === NONE ? --this.toRespond : this.toRespond;
26589 values[outerIndex] = innerValue;
26590 if (toRespond === 0) {
26591 if (this.resultSelector) {
26592 this._tryResultSelector(values);
26593 }
26594 else {
26595 this.destination.next(values.slice());
26596 }
26597 }
26598 };
26599 CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
26600 var result;
26601 try {
26602 result = this.resultSelector.apply(this, values);
26603 }
26604 catch (err) {
26605 this.destination.error(err);
26606 return;
26607 }
26608 this.destination.next(result);
26609 };
26610 return CombineLatestSubscriber;
26611}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
26612
26613//# sourceMappingURL=combineLatest.js.map
26614
26615
26616/***/ }),
26617/* 227 */
26618/***/ (function(module, __webpack_exports__, __webpack_require__) {
26619
26620"use strict";
26621__webpack_require__.r(__webpack_exports__);
26622/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; });
26623/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26624/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
26625/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26626
26627
26628var OuterSubscriber = /*@__PURE__*/ (function (_super) {
26629 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OuterSubscriber, _super);
26630 function OuterSubscriber() {
26631 return _super !== null && _super.apply(this, arguments) || this;
26632 }
26633 OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26634 this.destination.next(innerValue);
26635 };
26636 OuterSubscriber.prototype.notifyError = function (error, innerSub) {
26637 this.destination.error(error);
26638 };
26639 OuterSubscriber.prototype.notifyComplete = function (innerSub) {
26640 this.destination.complete();
26641 };
26642 return OuterSubscriber;
26643}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26644
26645//# sourceMappingURL=OuterSubscriber.js.map
26646
26647
26648/***/ }),
26649/* 228 */
26650/***/ (function(module, __webpack_exports__, __webpack_require__) {
26651
26652"use strict";
26653__webpack_require__.r(__webpack_exports__);
26654/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; });
26655/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(229);
26656/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
26657/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
26658/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */
26659
26660
26661
26662function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber) {
26663 if (innerSubscriber === void 0) {
26664 innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);
26665 }
26666 if (innerSubscriber.closed) {
26667 return undefined;
26668 }
26669 if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
26670 return result.subscribe(innerSubscriber);
26671 }
26672 return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(innerSubscriber);
26673}
26674//# sourceMappingURL=subscribeToResult.js.map
26675
26676
26677/***/ }),
26678/* 229 */
26679/***/ (function(module, __webpack_exports__, __webpack_require__) {
26680
26681"use strict";
26682__webpack_require__.r(__webpack_exports__);
26683/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; });
26684/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26685/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
26686/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26687
26688
26689var InnerSubscriber = /*@__PURE__*/ (function (_super) {
26690 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerSubscriber, _super);
26691 function InnerSubscriber(parent, outerValue, outerIndex) {
26692 var _this = _super.call(this) || this;
26693 _this.parent = parent;
26694 _this.outerValue = outerValue;
26695 _this.outerIndex = outerIndex;
26696 _this.index = 0;
26697 return _this;
26698 }
26699 InnerSubscriber.prototype._next = function (value) {
26700 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
26701 };
26702 InnerSubscriber.prototype._error = function (error) {
26703 this.parent.notifyError(error, this);
26704 this.unsubscribe();
26705 };
26706 InnerSubscriber.prototype._complete = function () {
26707 this.parent.notifyComplete(this);
26708 this.unsubscribe();
26709 };
26710 return InnerSubscriber;
26711}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26712
26713//# sourceMappingURL=InnerSubscriber.js.map
26714
26715
26716/***/ }),
26717/* 230 */
26718/***/ (function(module, __webpack_exports__, __webpack_require__) {
26719
26720"use strict";
26721__webpack_require__.r(__webpack_exports__);
26722/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; });
26723/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
26724/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(231);
26725/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(232);
26726/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(234);
26727/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(235);
26728/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(236);
26729/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(177);
26730/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(233);
26731/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(181);
26732/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742var subscribeTo = function (result) {
26743 if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') {
26744 return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result);
26745 }
26746 else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) {
26747 return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result);
26748 }
26749 else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) {
26750 return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result);
26751 }
26752 else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') {
26753 return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result);
26754 }
26755 else {
26756 var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : "'" + result + "'";
26757 var msg = "You provided " + value + " where a stream was expected."
26758 + ' You can provide an Observable, Promise, Array, or Iterable.';
26759 throw new TypeError(msg);
26760 }
26761};
26762//# sourceMappingURL=subscribeTo.js.map
26763
26764
26765/***/ }),
26766/* 231 */
26767/***/ (function(module, __webpack_exports__, __webpack_require__) {
26768
26769"use strict";
26770__webpack_require__.r(__webpack_exports__);
26771/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; });
26772/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(174);
26773/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
26774
26775var subscribeToPromise = function (promise) {
26776 return function (subscriber) {
26777 promise.then(function (value) {
26778 if (!subscriber.closed) {
26779 subscriber.next(value);
26780 subscriber.complete();
26781 }
26782 }, function (err) { return subscriber.error(err); })
26783 .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]);
26784 return subscriber;
26785 };
26786};
26787//# sourceMappingURL=subscribeToPromise.js.map
26788
26789
26790/***/ }),
26791/* 232 */
26792/***/ (function(module, __webpack_exports__, __webpack_require__) {
26793
26794"use strict";
26795__webpack_require__.r(__webpack_exports__);
26796/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; });
26797/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
26798/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
26799
26800var subscribeToIterable = function (iterable) {
26801 return function (subscriber) {
26802 var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();
26803 do {
26804 var item = iterator.next();
26805 if (item.done) {
26806 subscriber.complete();
26807 break;
26808 }
26809 subscriber.next(item.value);
26810 if (subscriber.closed) {
26811 break;
26812 }
26813 } while (true);
26814 if (typeof iterator.return === 'function') {
26815 subscriber.add(function () {
26816 if (iterator.return) {
26817 iterator.return();
26818 }
26819 });
26820 }
26821 return subscriber;
26822 };
26823};
26824//# sourceMappingURL=subscribeToIterable.js.map
26825
26826
26827/***/ }),
26828/* 233 */
26829/***/ (function(module, __webpack_exports__, __webpack_require__) {
26830
26831"use strict";
26832__webpack_require__.r(__webpack_exports__);
26833/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; });
26834/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; });
26835/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; });
26836/** PURE_IMPORTS_START PURE_IMPORTS_END */
26837function getSymbolIterator() {
26838 if (typeof Symbol !== 'function' || !Symbol.iterator) {
26839 return '@@iterator';
26840 }
26841 return Symbol.iterator;
26842}
26843var iterator = /*@__PURE__*/ getSymbolIterator();
26844var $$iterator = iterator;
26845//# sourceMappingURL=iterator.js.map
26846
26847
26848/***/ }),
26849/* 234 */
26850/***/ (function(module, __webpack_exports__, __webpack_require__) {
26851
26852"use strict";
26853__webpack_require__.r(__webpack_exports__);
26854/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; });
26855/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(181);
26856/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
26857
26858var subscribeToObservable = function (obj) {
26859 return function (subscriber) {
26860 var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]]();
26861 if (typeof obs.subscribe !== 'function') {
26862 throw new TypeError('Provided object does not correctly implement Symbol.observable');
26863 }
26864 else {
26865 return obs.subscribe(subscriber);
26866 }
26867 };
26868};
26869//# sourceMappingURL=subscribeToObservable.js.map
26870
26871
26872/***/ }),
26873/* 235 */
26874/***/ (function(module, __webpack_exports__, __webpack_require__) {
26875
26876"use strict";
26877__webpack_require__.r(__webpack_exports__);
26878/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; });
26879/** PURE_IMPORTS_START PURE_IMPORTS_END */
26880var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
26881//# sourceMappingURL=isArrayLike.js.map
26882
26883
26884/***/ }),
26885/* 236 */
26886/***/ (function(module, __webpack_exports__, __webpack_require__) {
26887
26888"use strict";
26889__webpack_require__.r(__webpack_exports__);
26890/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; });
26891/** PURE_IMPORTS_START PURE_IMPORTS_END */
26892function isPromise(value) {
26893 return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
26894}
26895//# sourceMappingURL=isPromise.js.map
26896
26897
26898/***/ }),
26899/* 237 */
26900/***/ (function(module, __webpack_exports__, __webpack_require__) {
26901
26902"use strict";
26903__webpack_require__.r(__webpack_exports__);
26904/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
26905/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(202);
26906/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(238);
26907/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */
26908
26909
26910function concat() {
26911 var observables = [];
26912 for (var _i = 0; _i < arguments.length; _i++) {
26913 observables[_i] = arguments[_i];
26914 }
26915 return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(_of__WEBPACK_IMPORTED_MODULE_0__["of"].apply(void 0, observables));
26916}
26917//# sourceMappingURL=concat.js.map
26918
26919
26920/***/ }),
26921/* 238 */
26922/***/ (function(module, __webpack_exports__, __webpack_require__) {
26923
26924"use strict";
26925__webpack_require__.r(__webpack_exports__);
26926/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; });
26927/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
26928/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
26929
26930function concatAll() {
26931 return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
26932}
26933//# sourceMappingURL=concatAll.js.map
26934
26935
26936/***/ }),
26937/* 239 */
26938/***/ (function(module, __webpack_exports__, __webpack_require__) {
26939
26940"use strict";
26941__webpack_require__.r(__webpack_exports__);
26942/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; });
26943/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
26944/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
26945/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
26946
26947
26948function mergeAll(concurrent) {
26949 if (concurrent === void 0) {
26950 concurrent = Number.POSITIVE_INFINITY;
26951 }
26952 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent);
26953}
26954//# sourceMappingURL=mergeAll.js.map
26955
26956
26957/***/ }),
26958/* 240 */
26959/***/ (function(module, __webpack_exports__, __webpack_require__) {
26960
26961"use strict";
26962__webpack_require__.r(__webpack_exports__);
26963/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; });
26964/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; });
26965/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; });
26966/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
26967/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
26968/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
26969/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
26970/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
26971/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
26972/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
26973
26974
26975
26976
26977
26978
26979function mergeMap(project, resultSelector, concurrent) {
26980 if (concurrent === void 0) {
26981 concurrent = Number.POSITIVE_INFINITY;
26982 }
26983 if (typeof resultSelector === 'function') {
26984 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)); };
26985 }
26986 else if (typeof resultSelector === 'number') {
26987 concurrent = resultSelector;
26988 }
26989 return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
26990}
26991var MergeMapOperator = /*@__PURE__*/ (function () {
26992 function MergeMapOperator(project, concurrent) {
26993 if (concurrent === void 0) {
26994 concurrent = Number.POSITIVE_INFINITY;
26995 }
26996 this.project = project;
26997 this.concurrent = concurrent;
26998 }
26999 MergeMapOperator.prototype.call = function (observer, source) {
27000 return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
27001 };
27002 return MergeMapOperator;
27003}());
27004
27005var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
27006 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeMapSubscriber, _super);
27007 function MergeMapSubscriber(destination, project, concurrent) {
27008 if (concurrent === void 0) {
27009 concurrent = Number.POSITIVE_INFINITY;
27010 }
27011 var _this = _super.call(this, destination) || this;
27012 _this.project = project;
27013 _this.concurrent = concurrent;
27014 _this.hasCompleted = false;
27015 _this.buffer = [];
27016 _this.active = 0;
27017 _this.index = 0;
27018 return _this;
27019 }
27020 MergeMapSubscriber.prototype._next = function (value) {
27021 if (this.active < this.concurrent) {
27022 this._tryNext(value);
27023 }
27024 else {
27025 this.buffer.push(value);
27026 }
27027 };
27028 MergeMapSubscriber.prototype._tryNext = function (value) {
27029 var result;
27030 var index = this.index++;
27031 try {
27032 result = this.project(value, index);
27033 }
27034 catch (err) {
27035 this.destination.error(err);
27036 return;
27037 }
27038 this.active++;
27039 this._innerSub(result, value, index);
27040 };
27041 MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
27042 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, value, index);
27043 var destination = this.destination;
27044 destination.add(innerSubscriber);
27045 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, undefined, undefined, innerSubscriber);
27046 if (innerSubscription !== innerSubscriber) {
27047 destination.add(innerSubscription);
27048 }
27049 };
27050 MergeMapSubscriber.prototype._complete = function () {
27051 this.hasCompleted = true;
27052 if (this.active === 0 && this.buffer.length === 0) {
27053 this.destination.complete();
27054 }
27055 this.unsubscribe();
27056 };
27057 MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27058 this.destination.next(innerValue);
27059 };
27060 MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
27061 var buffer = this.buffer;
27062 this.remove(innerSub);
27063 this.active--;
27064 if (buffer.length > 0) {
27065 this._next(buffer.shift());
27066 }
27067 else if (this.active === 0 && this.hasCompleted) {
27068 this.destination.complete();
27069 }
27070 };
27071 return MergeMapSubscriber;
27072}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
27073
27074//# sourceMappingURL=mergeMap.js.map
27075
27076
27077/***/ }),
27078/* 241 */
27079/***/ (function(module, __webpack_exports__, __webpack_require__) {
27080
27081"use strict";
27082__webpack_require__.r(__webpack_exports__);
27083/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; });
27084/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27085/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
27086/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(242);
27087/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */
27088
27089
27090
27091function from(input, scheduler) {
27092 if (!scheduler) {
27093 if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
27094 return input;
27095 }
27096 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input));
27097 }
27098 else {
27099 return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler);
27100 }
27101}
27102//# sourceMappingURL=from.js.map
27103
27104
27105/***/ }),
27106/* 242 */
27107/***/ (function(module, __webpack_exports__, __webpack_require__) {
27108
27109"use strict";
27110__webpack_require__.r(__webpack_exports__);
27111/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return scheduled; });
27112/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(243);
27113/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
27114/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206);
27115/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(245);
27116/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(246);
27117/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(236);
27118/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(235);
27119/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(247);
27120/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */
27121
27122
27123
27124
27125
27126
27127
27128
27129function scheduled(input, scheduler) {
27130 if (input != null) {
27131 if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) {
27132 return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler);
27133 }
27134 else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) {
27135 return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler);
27136 }
27137 else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) {
27138 return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
27139 }
27140 else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') {
27141 return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler);
27142 }
27143 }
27144 throw new TypeError((input !== null && typeof input || input) + ' is not observable');
27145}
27146//# sourceMappingURL=scheduled.js.map
27147
27148
27149/***/ }),
27150/* 243 */
27151/***/ (function(module, __webpack_exports__, __webpack_require__) {
27152
27153"use strict";
27154__webpack_require__.r(__webpack_exports__);
27155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; });
27156/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27157/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27158/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(181);
27159/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
27160
27161
27162
27163function scheduleObservable(input, scheduler) {
27164 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27165 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27166 sub.add(scheduler.schedule(function () {
27167 var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]();
27168 sub.add(observable.subscribe({
27169 next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
27170 error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
27171 complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
27172 }));
27173 }));
27174 return sub;
27175 });
27176}
27177//# sourceMappingURL=scheduleObservable.js.map
27178
27179
27180/***/ }),
27181/* 244 */
27182/***/ (function(module, __webpack_exports__, __webpack_require__) {
27183
27184"use strict";
27185__webpack_require__.r(__webpack_exports__);
27186/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; });
27187/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27188/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27189/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
27190
27191
27192function schedulePromise(input, scheduler) {
27193 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27194 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27195 sub.add(scheduler.schedule(function () {
27196 return input.then(function (value) {
27197 sub.add(scheduler.schedule(function () {
27198 subscriber.next(value);
27199 sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
27200 }));
27201 }, function (err) {
27202 sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
27203 });
27204 }));
27205 return sub;
27206 });
27207}
27208//# sourceMappingURL=schedulePromise.js.map
27209
27210
27211/***/ }),
27212/* 245 */
27213/***/ (function(module, __webpack_exports__, __webpack_require__) {
27214
27215"use strict";
27216__webpack_require__.r(__webpack_exports__);
27217/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; });
27218/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27219/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27220/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(233);
27221/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */
27222
27223
27224
27225function scheduleIterable(input, scheduler) {
27226 if (!input) {
27227 throw new Error('Iterable cannot be null');
27228 }
27229 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27230 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27231 var iterator;
27232 sub.add(function () {
27233 if (iterator && typeof iterator.return === 'function') {
27234 iterator.return();
27235 }
27236 });
27237 sub.add(scheduler.schedule(function () {
27238 iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]]();
27239 sub.add(scheduler.schedule(function () {
27240 if (subscriber.closed) {
27241 return;
27242 }
27243 var value;
27244 var done;
27245 try {
27246 var result = iterator.next();
27247 value = result.value;
27248 done = result.done;
27249 }
27250 catch (err) {
27251 subscriber.error(err);
27252 return;
27253 }
27254 if (done) {
27255 subscriber.complete();
27256 }
27257 else {
27258 subscriber.next(value);
27259 this.schedule();
27260 }
27261 }));
27262 }));
27263 return sub;
27264 });
27265}
27266//# sourceMappingURL=scheduleIterable.js.map
27267
27268
27269/***/ }),
27270/* 246 */
27271/***/ (function(module, __webpack_exports__, __webpack_require__) {
27272
27273"use strict";
27274__webpack_require__.r(__webpack_exports__);
27275/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; });
27276/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(181);
27277/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
27278
27279function isInteropObservable(input) {
27280 return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
27281}
27282//# sourceMappingURL=isInteropObservable.js.map
27283
27284
27285/***/ }),
27286/* 247 */
27287/***/ (function(module, __webpack_exports__, __webpack_require__) {
27288
27289"use strict";
27290__webpack_require__.r(__webpack_exports__);
27291/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; });
27292/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
27293/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
27294
27295function isIterable(input) {
27296 return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
27297}
27298//# sourceMappingURL=isIterable.js.map
27299
27300
27301/***/ }),
27302/* 248 */
27303/***/ (function(module, __webpack_exports__, __webpack_require__) {
27304
27305"use strict";
27306__webpack_require__.r(__webpack_exports__);
27307/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
27308/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27309/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
27310/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
27311/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
27312
27313
27314
27315function defer(observableFactory) {
27316 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27317 var input;
27318 try {
27319 input = observableFactory();
27320 }
27321 catch (err) {
27322 subscriber.error(err);
27323 return undefined;
27324 }
27325 var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
27326 return source.subscribe(subscriber);
27327 });
27328}
27329//# sourceMappingURL=defer.js.map
27330
27331
27332/***/ }),
27333/* 249 */
27334/***/ (function(module, __webpack_exports__, __webpack_require__) {
27335
27336"use strict";
27337__webpack_require__.r(__webpack_exports__);
27338/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
27339/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27340/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
27341/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(224);
27342/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(177);
27343/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(241);
27344/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */
27345
27346
27347
27348
27349
27350function forkJoin() {
27351 var sources = [];
27352 for (var _i = 0; _i < arguments.length; _i++) {
27353 sources[_i] = arguments[_i];
27354 }
27355 if (sources.length === 1) {
27356 var first_1 = sources[0];
27357 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first_1)) {
27358 return forkJoinInternal(first_1, null);
27359 }
27360 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
27361 var keys = Object.keys(first_1);
27362 return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
27363 }
27364 }
27365 if (typeof sources[sources.length - 1] === 'function') {
27366 var resultSelector_1 = sources.pop();
27367 sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources;
27368 return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return resultSelector_1.apply(void 0, args); }));
27369 }
27370 return forkJoinInternal(sources, null);
27371}
27372function forkJoinInternal(sources, keys) {
27373 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27374 var len = sources.length;
27375 if (len === 0) {
27376 subscriber.complete();
27377 return;
27378 }
27379 var values = new Array(len);
27380 var completed = 0;
27381 var emitted = 0;
27382 var _loop_1 = function (i) {
27383 var source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]);
27384 var hasValue = false;
27385 subscriber.add(source.subscribe({
27386 next: function (value) {
27387 if (!hasValue) {
27388 hasValue = true;
27389 emitted++;
27390 }
27391 values[i] = value;
27392 },
27393 error: function (err) { return subscriber.error(err); },
27394 complete: function () {
27395 completed++;
27396 if (completed === len || !hasValue) {
27397 if (emitted === len) {
27398 subscriber.next(keys ?
27399 keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
27400 values);
27401 }
27402 subscriber.complete();
27403 }
27404 }
27405 }));
27406 };
27407 for (var i = 0; i < len; i++) {
27408 _loop_1(i);
27409 }
27410 });
27411}
27412//# sourceMappingURL=forkJoin.js.map
27413
27414
27415/***/ }),
27416/* 250 */
27417/***/ (function(module, __webpack_exports__, __webpack_require__) {
27418
27419"use strict";
27420__webpack_require__.r(__webpack_exports__);
27421/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
27422/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27423/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
27424/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
27425/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(224);
27426/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
27427
27428
27429
27430
27431var toString = /*@__PURE__*/ (function () { return Object.prototype.toString; })();
27432function fromEvent(target, eventName, options, resultSelector) {
27433 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) {
27434 resultSelector = options;
27435 options = undefined;
27436 }
27437 if (resultSelector) {
27438 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); }));
27439 }
27440 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27441 function handler(e) {
27442 if (arguments.length > 1) {
27443 subscriber.next(Array.prototype.slice.call(arguments));
27444 }
27445 else {
27446 subscriber.next(e);
27447 }
27448 }
27449 setupSubscription(target, eventName, handler, subscriber, options);
27450 });
27451}
27452function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
27453 var unsubscribe;
27454 if (isEventTarget(sourceObj)) {
27455 var source_1 = sourceObj;
27456 sourceObj.addEventListener(eventName, handler, options);
27457 unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
27458 }
27459 else if (isJQueryStyleEventEmitter(sourceObj)) {
27460 var source_2 = sourceObj;
27461 sourceObj.on(eventName, handler);
27462 unsubscribe = function () { return source_2.off(eventName, handler); };
27463 }
27464 else if (isNodeStyleEventEmitter(sourceObj)) {
27465 var source_3 = sourceObj;
27466 sourceObj.addListener(eventName, handler);
27467 unsubscribe = function () { return source_3.removeListener(eventName, handler); };
27468 }
27469 else if (sourceObj && sourceObj.length) {
27470 for (var i = 0, len = sourceObj.length; i < len; i++) {
27471 setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
27472 }
27473 }
27474 else {
27475 throw new TypeError('Invalid event target');
27476 }
27477 subscriber.add(unsubscribe);
27478}
27479function isNodeStyleEventEmitter(sourceObj) {
27480 return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
27481}
27482function isJQueryStyleEventEmitter(sourceObj) {
27483 return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
27484}
27485function isEventTarget(sourceObj) {
27486 return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
27487}
27488//# sourceMappingURL=fromEvent.js.map
27489
27490
27491/***/ }),
27492/* 251 */
27493/***/ (function(module, __webpack_exports__, __webpack_require__) {
27494
27495"use strict";
27496__webpack_require__.r(__webpack_exports__);
27497/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
27498/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27499/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
27500/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
27501/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(224);
27502/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
27503
27504
27505
27506
27507function fromEventPattern(addHandler, removeHandler, resultSelector) {
27508 if (resultSelector) {
27509 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); }));
27510 }
27511 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27512 var handler = function () {
27513 var e = [];
27514 for (var _i = 0; _i < arguments.length; _i++) {
27515 e[_i] = arguments[_i];
27516 }
27517 return subscriber.next(e.length === 1 ? e[0] : e);
27518 };
27519 var retValue;
27520 try {
27521 retValue = addHandler(handler);
27522 }
27523 catch (err) {
27524 subscriber.error(err);
27525 return undefined;
27526 }
27527 if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) {
27528 return undefined;
27529 }
27530 return function () { return removeHandler(handler, retValue); };
27531 });
27532}
27533//# sourceMappingURL=fromEventPattern.js.map
27534
27535
27536/***/ }),
27537/* 252 */
27538/***/ (function(module, __webpack_exports__, __webpack_require__) {
27539
27540"use strict";
27541__webpack_require__.r(__webpack_exports__);
27542/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
27543/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27544/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
27545/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(203);
27546/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
27547
27548
27549
27550function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
27551 var resultSelector;
27552 var initialState;
27553 if (arguments.length == 1) {
27554 var options = initialStateOrOptions;
27555 initialState = options.initialState;
27556 condition = options.condition;
27557 iterate = options.iterate;
27558 resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
27559 scheduler = options.scheduler;
27560 }
27561 else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) {
27562 initialState = initialStateOrOptions;
27563 resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
27564 scheduler = resultSelectorOrObservable;
27565 }
27566 else {
27567 initialState = initialStateOrOptions;
27568 resultSelector = resultSelectorOrObservable;
27569 }
27570 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27571 var state = initialState;
27572 if (scheduler) {
27573 return scheduler.schedule(dispatch, 0, {
27574 subscriber: subscriber,
27575 iterate: iterate,
27576 condition: condition,
27577 resultSelector: resultSelector,
27578 state: state
27579 });
27580 }
27581 do {
27582 if (condition) {
27583 var conditionResult = void 0;
27584 try {
27585 conditionResult = condition(state);
27586 }
27587 catch (err) {
27588 subscriber.error(err);
27589 return undefined;
27590 }
27591 if (!conditionResult) {
27592 subscriber.complete();
27593 break;
27594 }
27595 }
27596 var value = void 0;
27597 try {
27598 value = resultSelector(state);
27599 }
27600 catch (err) {
27601 subscriber.error(err);
27602 return undefined;
27603 }
27604 subscriber.next(value);
27605 if (subscriber.closed) {
27606 break;
27607 }
27608 try {
27609 state = iterate(state);
27610 }
27611 catch (err) {
27612 subscriber.error(err);
27613 return undefined;
27614 }
27615 } while (true);
27616 return undefined;
27617 });
27618}
27619function dispatch(state) {
27620 var subscriber = state.subscriber, condition = state.condition;
27621 if (subscriber.closed) {
27622 return undefined;
27623 }
27624 if (state.needIterate) {
27625 try {
27626 state.state = state.iterate(state.state);
27627 }
27628 catch (err) {
27629 subscriber.error(err);
27630 return undefined;
27631 }
27632 }
27633 else {
27634 state.needIterate = true;
27635 }
27636 if (condition) {
27637 var conditionResult = void 0;
27638 try {
27639 conditionResult = condition(state.state);
27640 }
27641 catch (err) {
27642 subscriber.error(err);
27643 return undefined;
27644 }
27645 if (!conditionResult) {
27646 subscriber.complete();
27647 return undefined;
27648 }
27649 if (subscriber.closed) {
27650 return undefined;
27651 }
27652 }
27653 var value;
27654 try {
27655 value = state.resultSelector(state.state);
27656 }
27657 catch (err) {
27658 subscriber.error(err);
27659 return undefined;
27660 }
27661 if (subscriber.closed) {
27662 return undefined;
27663 }
27664 subscriber.next(value);
27665 if (subscriber.closed) {
27666 return undefined;
27667 }
27668 return this.schedule(state);
27669}
27670//# sourceMappingURL=generate.js.map
27671
27672
27673/***/ }),
27674/* 253 */
27675/***/ (function(module, __webpack_exports__, __webpack_require__) {
27676
27677"use strict";
27678__webpack_require__.r(__webpack_exports__);
27679/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
27680/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(248);
27681/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(201);
27682/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
27683
27684
27685function iif(condition, trueResult, falseResult) {
27686 if (trueResult === void 0) {
27687 trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
27688 }
27689 if (falseResult === void 0) {
27690 falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
27691 }
27692 return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(function () { return condition() ? trueResult : falseResult; });
27693}
27694//# sourceMappingURL=iif.js.map
27695
27696
27697/***/ }),
27698/* 254 */
27699/***/ (function(module, __webpack_exports__, __webpack_require__) {
27700
27701"use strict";
27702__webpack_require__.r(__webpack_exports__);
27703/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
27704/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27705/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
27706/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(255);
27707/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
27708
27709
27710
27711function interval(period, scheduler) {
27712 if (period === void 0) {
27713 period = 0;
27714 }
27715 if (scheduler === void 0) {
27716 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
27717 }
27718 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) {
27719 period = 0;
27720 }
27721 if (!scheduler || typeof scheduler.schedule !== 'function') {
27722 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
27723 }
27724 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27725 subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
27726 return subscriber;
27727 });
27728}
27729function dispatch(state) {
27730 var subscriber = state.subscriber, counter = state.counter, period = state.period;
27731 subscriber.next(counter);
27732 this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
27733}
27734//# sourceMappingURL=interval.js.map
27735
27736
27737/***/ }),
27738/* 255 */
27739/***/ (function(module, __webpack_exports__, __webpack_require__) {
27740
27741"use strict";
27742__webpack_require__.r(__webpack_exports__);
27743/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
27744/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
27745/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
27746
27747function isNumeric(val) {
27748 return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0;
27749}
27750//# sourceMappingURL=isNumeric.js.map
27751
27752
27753/***/ }),
27754/* 256 */
27755/***/ (function(module, __webpack_exports__, __webpack_require__) {
27756
27757"use strict";
27758__webpack_require__.r(__webpack_exports__);
27759/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
27760/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27761/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
27762/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(239);
27763/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(204);
27764/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
27765
27766
27767
27768
27769function merge() {
27770 var observables = [];
27771 for (var _i = 0; _i < arguments.length; _i++) {
27772 observables[_i] = arguments[_i];
27773 }
27774 var concurrent = Number.POSITIVE_INFINITY;
27775 var scheduler = null;
27776 var last = observables[observables.length - 1];
27777 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) {
27778 scheduler = observables.pop();
27779 if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
27780 concurrent = observables.pop();
27781 }
27782 }
27783 else if (typeof last === 'number') {
27784 concurrent = observables.pop();
27785 }
27786 if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
27787 return observables[0];
27788 }
27789 return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler));
27790}
27791//# sourceMappingURL=merge.js.map
27792
27793
27794/***/ }),
27795/* 257 */
27796/***/ (function(module, __webpack_exports__, __webpack_require__) {
27797
27798"use strict";
27799__webpack_require__.r(__webpack_exports__);
27800/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; });
27801/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; });
27802/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27803/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(218);
27804/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
27805
27806
27807var NEVER = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);
27808function never() {
27809 return NEVER;
27810}
27811//# sourceMappingURL=never.js.map
27812
27813
27814/***/ }),
27815/* 258 */
27816/***/ (function(module, __webpack_exports__, __webpack_require__) {
27817
27818"use strict";
27819__webpack_require__.r(__webpack_exports__);
27820/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
27821/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27822/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
27823/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
27824/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
27825/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
27826
27827
27828
27829
27830function onErrorResumeNext() {
27831 var sources = [];
27832 for (var _i = 0; _i < arguments.length; _i++) {
27833 sources[_i] = arguments[_i];
27834 }
27835 if (sources.length === 0) {
27836 return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
27837 }
27838 var first = sources[0], remainder = sources.slice(1);
27839 if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) {
27840 return onErrorResumeNext.apply(void 0, first);
27841 }
27842 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27843 var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
27844 return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
27845 next: function (value) { subscriber.next(value); },
27846 error: subNext,
27847 complete: subNext,
27848 });
27849 });
27850}
27851//# sourceMappingURL=onErrorResumeNext.js.map
27852
27853
27854/***/ }),
27855/* 259 */
27856/***/ (function(module, __webpack_exports__, __webpack_require__) {
27857
27858"use strict";
27859__webpack_require__.r(__webpack_exports__);
27860/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
27861/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
27862/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
27863/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
27864/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
27865
27866
27867function pairs(obj, scheduler) {
27868 if (!scheduler) {
27869 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27870 var keys = Object.keys(obj);
27871 for (var i = 0; i < keys.length && !subscriber.closed; i++) {
27872 var key = keys[i];
27873 if (obj.hasOwnProperty(key)) {
27874 subscriber.next([key, obj[key]]);
27875 }
27876 }
27877 subscriber.complete();
27878 });
27879 }
27880 else {
27881 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
27882 var keys = Object.keys(obj);
27883 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
27884 subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
27885 return subscription;
27886 });
27887 }
27888}
27889function dispatch(state) {
27890 var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
27891 if (!subscriber.closed) {
27892 if (index < keys.length) {
27893 var key = keys[index];
27894 subscriber.next([key, obj[key]]);
27895 subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
27896 }
27897 else {
27898 subscriber.complete();
27899 }
27900 }
27901}
27902//# sourceMappingURL=pairs.js.map
27903
27904
27905/***/ }),
27906/* 260 */
27907/***/ (function(module, __webpack_exports__, __webpack_require__) {
27908
27909"use strict";
27910__webpack_require__.r(__webpack_exports__);
27911/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
27912/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(261);
27913/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(230);
27914/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(262);
27915/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(167);
27916/** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */
27917
27918
27919
27920
27921function partition(source, predicate, thisArg) {
27922 return [
27923 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))),
27924 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)))
27925 ];
27926}
27927//# sourceMappingURL=partition.js.map
27928
27929
27930/***/ }),
27931/* 261 */
27932/***/ (function(module, __webpack_exports__, __webpack_require__) {
27933
27934"use strict";
27935__webpack_require__.r(__webpack_exports__);
27936/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; });
27937/** PURE_IMPORTS_START PURE_IMPORTS_END */
27938function not(pred, thisArg) {
27939 function notPred() {
27940 return !(notPred.pred.apply(notPred.thisArg, arguments));
27941 }
27942 notPred.pred = pred;
27943 notPred.thisArg = thisArg;
27944 return notPred;
27945}
27946//# sourceMappingURL=not.js.map
27947
27948
27949/***/ }),
27950/* 262 */
27951/***/ (function(module, __webpack_exports__, __webpack_require__) {
27952
27953"use strict";
27954__webpack_require__.r(__webpack_exports__);
27955/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
27956/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
27957/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
27958/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27959
27960
27961function filter(predicate, thisArg) {
27962 return function filterOperatorFunction(source) {
27963 return source.lift(new FilterOperator(predicate, thisArg));
27964 };
27965}
27966var FilterOperator = /*@__PURE__*/ (function () {
27967 function FilterOperator(predicate, thisArg) {
27968 this.predicate = predicate;
27969 this.thisArg = thisArg;
27970 }
27971 FilterOperator.prototype.call = function (subscriber, source) {
27972 return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
27973 };
27974 return FilterOperator;
27975}());
27976var FilterSubscriber = /*@__PURE__*/ (function (_super) {
27977 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FilterSubscriber, _super);
27978 function FilterSubscriber(destination, predicate, thisArg) {
27979 var _this = _super.call(this, destination) || this;
27980 _this.predicate = predicate;
27981 _this.thisArg = thisArg;
27982 _this.count = 0;
27983 return _this;
27984 }
27985 FilterSubscriber.prototype._next = function (value) {
27986 var result;
27987 try {
27988 result = this.predicate.call(this.thisArg, value, this.count++);
27989 }
27990 catch (err) {
27991 this.destination.error(err);
27992 return;
27993 }
27994 if (result) {
27995 this.destination.next(value);
27996 }
27997 };
27998 return FilterSubscriber;
27999}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28000//# sourceMappingURL=filter.js.map
28001
28002
28003/***/ }),
28004/* 263 */
28005/***/ (function(module, __webpack_exports__, __webpack_require__) {
28006
28007"use strict";
28008__webpack_require__.r(__webpack_exports__);
28009/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
28010/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; });
28011/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; });
28012/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
28013/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
28014/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(204);
28015/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
28016/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
28017/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28018
28019
28020
28021
28022
28023function race() {
28024 var observables = [];
28025 for (var _i = 0; _i < arguments.length; _i++) {
28026 observables[_i] = arguments[_i];
28027 }
28028 if (observables.length === 1) {
28029 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
28030 observables = observables[0];
28031 }
28032 else {
28033 return observables[0];
28034 }
28035 }
28036 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__["fromArray"])(observables, undefined).lift(new RaceOperator());
28037}
28038var RaceOperator = /*@__PURE__*/ (function () {
28039 function RaceOperator() {
28040 }
28041 RaceOperator.prototype.call = function (subscriber, source) {
28042 return source.subscribe(new RaceSubscriber(subscriber));
28043 };
28044 return RaceOperator;
28045}());
28046
28047var RaceSubscriber = /*@__PURE__*/ (function (_super) {
28048 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RaceSubscriber, _super);
28049 function RaceSubscriber(destination) {
28050 var _this = _super.call(this, destination) || this;
28051 _this.hasFirst = false;
28052 _this.observables = [];
28053 _this.subscriptions = [];
28054 return _this;
28055 }
28056 RaceSubscriber.prototype._next = function (observable) {
28057 this.observables.push(observable);
28058 };
28059 RaceSubscriber.prototype._complete = function () {
28060 var observables = this.observables;
28061 var len = observables.length;
28062 if (len === 0) {
28063 this.destination.complete();
28064 }
28065 else {
28066 for (var i = 0; i < len && !this.hasFirst; i++) {
28067 var observable = observables[i];
28068 var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i);
28069 if (this.subscriptions) {
28070 this.subscriptions.push(subscription);
28071 }
28072 this.add(subscription);
28073 }
28074 this.observables = null;
28075 }
28076 };
28077 RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28078 if (!this.hasFirst) {
28079 this.hasFirst = true;
28080 for (var i = 0; i < this.subscriptions.length; i++) {
28081 if (i !== outerIndex) {
28082 var subscription = this.subscriptions[i];
28083 subscription.unsubscribe();
28084 this.remove(subscription);
28085 }
28086 }
28087 this.subscriptions = null;
28088 }
28089 this.destination.next(innerValue);
28090 };
28091 return RaceSubscriber;
28092}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
28093
28094//# sourceMappingURL=race.js.map
28095
28096
28097/***/ }),
28098/* 264 */
28099/***/ (function(module, __webpack_exports__, __webpack_require__) {
28100
28101"use strict";
28102__webpack_require__.r(__webpack_exports__);
28103/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; });
28104/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
28105/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28106/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
28107
28108function range(start, count, scheduler) {
28109 if (start === void 0) {
28110 start = 0;
28111 }
28112 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
28113 if (count === undefined) {
28114 count = start;
28115 start = 0;
28116 }
28117 var index = 0;
28118 var current = start;
28119 if (scheduler) {
28120 return scheduler.schedule(dispatch, 0, {
28121 index: index, count: count, start: start, subscriber: subscriber
28122 });
28123 }
28124 else {
28125 do {
28126 if (index++ >= count) {
28127 subscriber.complete();
28128 break;
28129 }
28130 subscriber.next(current++);
28131 if (subscriber.closed) {
28132 break;
28133 }
28134 } while (true);
28135 }
28136 return undefined;
28137 });
28138}
28139function dispatch(state) {
28140 var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
28141 if (index >= count) {
28142 subscriber.complete();
28143 return;
28144 }
28145 subscriber.next(start);
28146 if (subscriber.closed) {
28147 return;
28148 }
28149 state.index = index + 1;
28150 state.start = start + 1;
28151 this.schedule(state);
28152}
28153//# sourceMappingURL=range.js.map
28154
28155
28156/***/ }),
28157/* 265 */
28158/***/ (function(module, __webpack_exports__, __webpack_require__) {
28159
28160"use strict";
28161__webpack_require__.r(__webpack_exports__);
28162/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
28163/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28164/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
28165/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(255);
28166/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
28167/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
28168
28169
28170
28171
28172function timer(dueTime, periodOrScheduler, scheduler) {
28173 if (dueTime === void 0) {
28174 dueTime = 0;
28175 }
28176 var period = -1;
28177 if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) {
28178 period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
28179 }
28180 else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) {
28181 scheduler = periodOrScheduler;
28182 }
28183 if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) {
28184 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
28185 }
28186 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
28187 var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime)
28188 ? dueTime
28189 : (+dueTime - scheduler.now());
28190 return scheduler.schedule(dispatch, due, {
28191 index: 0, period: period, subscriber: subscriber
28192 });
28193 });
28194}
28195function dispatch(state) {
28196 var index = state.index, period = state.period, subscriber = state.subscriber;
28197 subscriber.next(index);
28198 if (subscriber.closed) {
28199 return;
28200 }
28201 else if (period === -1) {
28202 return subscriber.complete();
28203 }
28204 state.index = index + 1;
28205 this.schedule(state, period);
28206}
28207//# sourceMappingURL=timer.js.map
28208
28209
28210/***/ }),
28211/* 266 */
28212/***/ (function(module, __webpack_exports__, __webpack_require__) {
28213
28214"use strict";
28215__webpack_require__.r(__webpack_exports__);
28216/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; });
28217/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
28218/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
28219/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
28220/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
28221
28222
28223
28224function using(resourceFactory, observableFactory) {
28225 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
28226 var resource;
28227 try {
28228 resource = resourceFactory();
28229 }
28230 catch (err) {
28231 subscriber.error(err);
28232 return undefined;
28233 }
28234 var result;
28235 try {
28236 result = observableFactory(resource);
28237 }
28238 catch (err) {
28239 subscriber.error(err);
28240 return undefined;
28241 }
28242 var source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
28243 var subscription = source.subscribe(subscriber);
28244 return function () {
28245 subscription.unsubscribe();
28246 if (resource) {
28247 resource.unsubscribe();
28248 }
28249 };
28250 });
28251}
28252//# sourceMappingURL=using.js.map
28253
28254
28255/***/ }),
28256/* 267 */
28257/***/ (function(module, __webpack_exports__, __webpack_require__) {
28258
28259"use strict";
28260__webpack_require__.r(__webpack_exports__);
28261/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
28262/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; });
28263/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; });
28264/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
28265/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
28266/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
28267/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
28268/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(227);
28269/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(228);
28270/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(233);
28271/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
28272
28273
28274
28275
28276
28277
28278
28279function zip() {
28280 var observables = [];
28281 for (var _i = 0; _i < arguments.length; _i++) {
28282 observables[_i] = arguments[_i];
28283 }
28284 var resultSelector = observables[observables.length - 1];
28285 if (typeof resultSelector === 'function') {
28286 observables.pop();
28287 }
28288 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
28289}
28290var ZipOperator = /*@__PURE__*/ (function () {
28291 function ZipOperator(resultSelector) {
28292 this.resultSelector = resultSelector;
28293 }
28294 ZipOperator.prototype.call = function (subscriber, source) {
28295 return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
28296 };
28297 return ZipOperator;
28298}());
28299
28300var ZipSubscriber = /*@__PURE__*/ (function (_super) {
28301 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipSubscriber, _super);
28302 function ZipSubscriber(destination, resultSelector, values) {
28303 if (values === void 0) {
28304 values = Object.create(null);
28305 }
28306 var _this = _super.call(this, destination) || this;
28307 _this.iterators = [];
28308 _this.active = 0;
28309 _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
28310 _this.values = values;
28311 return _this;
28312 }
28313 ZipSubscriber.prototype._next = function (value) {
28314 var iterators = this.iterators;
28315 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
28316 iterators.push(new StaticArrayIterator(value));
28317 }
28318 else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] === 'function') {
28319 iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]]()));
28320 }
28321 else {
28322 iterators.push(new ZipBufferIterator(this.destination, this, value));
28323 }
28324 };
28325 ZipSubscriber.prototype._complete = function () {
28326 var iterators = this.iterators;
28327 var len = iterators.length;
28328 this.unsubscribe();
28329 if (len === 0) {
28330 this.destination.complete();
28331 return;
28332 }
28333 this.active = len;
28334 for (var i = 0; i < len; i++) {
28335 var iterator = iterators[i];
28336 if (iterator.stillUnsubscribed) {
28337 var destination = this.destination;
28338 destination.add(iterator.subscribe(iterator, i));
28339 }
28340 else {
28341 this.active--;
28342 }
28343 }
28344 };
28345 ZipSubscriber.prototype.notifyInactive = function () {
28346 this.active--;
28347 if (this.active === 0) {
28348 this.destination.complete();
28349 }
28350 };
28351 ZipSubscriber.prototype.checkIterators = function () {
28352 var iterators = this.iterators;
28353 var len = iterators.length;
28354 var destination = this.destination;
28355 for (var i = 0; i < len; i++) {
28356 var iterator = iterators[i];
28357 if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
28358 return;
28359 }
28360 }
28361 var shouldComplete = false;
28362 var args = [];
28363 for (var i = 0; i < len; i++) {
28364 var iterator = iterators[i];
28365 var result = iterator.next();
28366 if (iterator.hasCompleted()) {
28367 shouldComplete = true;
28368 }
28369 if (result.done) {
28370 destination.complete();
28371 return;
28372 }
28373 args.push(result.value);
28374 }
28375 if (this.resultSelector) {
28376 this._tryresultSelector(args);
28377 }
28378 else {
28379 destination.next(args);
28380 }
28381 if (shouldComplete) {
28382 destination.complete();
28383 }
28384 };
28385 ZipSubscriber.prototype._tryresultSelector = function (args) {
28386 var result;
28387 try {
28388 result = this.resultSelector.apply(this, args);
28389 }
28390 catch (err) {
28391 this.destination.error(err);
28392 return;
28393 }
28394 this.destination.next(result);
28395 };
28396 return ZipSubscriber;
28397}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
28398
28399var StaticIterator = /*@__PURE__*/ (function () {
28400 function StaticIterator(iterator) {
28401 this.iterator = iterator;
28402 this.nextResult = iterator.next();
28403 }
28404 StaticIterator.prototype.hasValue = function () {
28405 return true;
28406 };
28407 StaticIterator.prototype.next = function () {
28408 var result = this.nextResult;
28409 this.nextResult = this.iterator.next();
28410 return result;
28411 };
28412 StaticIterator.prototype.hasCompleted = function () {
28413 var nextResult = this.nextResult;
28414 return nextResult && nextResult.done;
28415 };
28416 return StaticIterator;
28417}());
28418var StaticArrayIterator = /*@__PURE__*/ (function () {
28419 function StaticArrayIterator(array) {
28420 this.array = array;
28421 this.index = 0;
28422 this.length = 0;
28423 this.length = array.length;
28424 }
28425 StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
28426 return this;
28427 };
28428 StaticArrayIterator.prototype.next = function (value) {
28429 var i = this.index++;
28430 var array = this.array;
28431 return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
28432 };
28433 StaticArrayIterator.prototype.hasValue = function () {
28434 return this.array.length > this.index;
28435 };
28436 StaticArrayIterator.prototype.hasCompleted = function () {
28437 return this.array.length === this.index;
28438 };
28439 return StaticArrayIterator;
28440}());
28441var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
28442 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipBufferIterator, _super);
28443 function ZipBufferIterator(destination, parent, observable) {
28444 var _this = _super.call(this, destination) || this;
28445 _this.parent = parent;
28446 _this.observable = observable;
28447 _this.stillUnsubscribed = true;
28448 _this.buffer = [];
28449 _this.isComplete = false;
28450 return _this;
28451 }
28452 ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
28453 return this;
28454 };
28455 ZipBufferIterator.prototype.next = function () {
28456 var buffer = this.buffer;
28457 if (buffer.length === 0 && this.isComplete) {
28458 return { value: null, done: true };
28459 }
28460 else {
28461 return { value: buffer.shift(), done: false };
28462 }
28463 };
28464 ZipBufferIterator.prototype.hasValue = function () {
28465 return this.buffer.length > 0;
28466 };
28467 ZipBufferIterator.prototype.hasCompleted = function () {
28468 return this.buffer.length === 0 && this.isComplete;
28469 };
28470 ZipBufferIterator.prototype.notifyComplete = function () {
28471 if (this.buffer.length > 0) {
28472 this.isComplete = true;
28473 this.parent.notifyInactive();
28474 }
28475 else {
28476 this.destination.complete();
28477 }
28478 };
28479 ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28480 this.buffer.push(innerValue);
28481 this.parent.checkIterators();
28482 };
28483 ZipBufferIterator.prototype.subscribe = function (value, index) {
28484 return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, this.observable, this, index);
28485 };
28486 return ZipBufferIterator;
28487}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
28488//# sourceMappingURL=zip.js.map
28489
28490
28491/***/ }),
28492/* 268 */,
28493/* 269 */
28494/***/ (function(module, __webpack_exports__, __webpack_require__) {
28495
28496"use strict";
28497__webpack_require__.r(__webpack_exports__);
28498/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(270);
28499/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; });
28500
28501/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(271);
28502/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; });
28503
28504/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(272);
28505/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; });
28506
28507/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(273);
28508/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; });
28509
28510/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(274);
28511/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; });
28512
28513/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(275);
28514/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; });
28515
28516/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(276);
28517/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; });
28518
28519/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(277);
28520/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; });
28521
28522/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(278);
28523/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; });
28524
28525/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(279);
28526/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; });
28527
28528/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(280);
28529/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; });
28530
28531/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(238);
28532/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; });
28533
28534/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(281);
28535/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; });
28536
28537/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(282);
28538/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; });
28539
28540/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(283);
28541/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; });
28542
28543/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(284);
28544/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; });
28545
28546/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(285);
28547/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; });
28548
28549/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(286);
28550/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; });
28551
28552/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(287);
28553/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; });
28554
28555/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(289);
28556/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; });
28557
28558/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(290);
28559/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; });
28560
28561/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(291);
28562/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; });
28563
28564/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(292);
28565/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; });
28566
28567/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(293);
28568/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; });
28569
28570/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(294);
28571/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; });
28572
28573/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(297);
28574/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; });
28575
28576/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(298);
28577/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; });
28578
28579/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(299);
28580/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; });
28581
28582/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(300);
28583/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; });
28584
28585/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(301);
28586/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; });
28587
28588/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(262);
28589/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; });
28590
28591/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(302);
28592/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; });
28593
28594/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(303);
28595/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; });
28596
28597/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(304);
28598/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; });
28599
28600/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(305);
28601/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; });
28602
28603/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(189);
28604/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; });
28605
28606/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(306);
28607/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; });
28608
28609/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(307);
28610/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; });
28611
28612/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(308);
28613/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; });
28614
28615/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(224);
28616/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; });
28617
28618/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(310);
28619/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; });
28620
28621/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(311);
28622/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; });
28623
28624/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(312);
28625/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; });
28626
28627/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(315);
28628/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; });
28629
28630/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(239);
28631/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; });
28632
28633/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(240);
28634/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
28635
28636/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
28637
28638/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(316);
28639/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; });
28640
28641/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(317);
28642/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; });
28643
28644/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(318);
28645/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; });
28646
28647/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(319);
28648/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; });
28649
28650/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(199);
28651/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; });
28652
28653/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(320);
28654/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; });
28655
28656/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(321);
28657/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; });
28658
28659/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(322);
28660/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; });
28661
28662/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(323);
28663/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; });
28664
28665/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(324);
28666/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; });
28667
28668/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(325);
28669/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; });
28670
28671/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(326);
28672/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; });
28673
28674/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(327);
28675/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; });
28676
28677/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(328);
28678/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; });
28679
28680/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(313);
28681/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; });
28682
28683/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(329);
28684/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; });
28685
28686/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(330);
28687/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; });
28688
28689/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(331);
28690/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; });
28691
28692/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(332);
28693/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; });
28694
28695/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(188);
28696/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; });
28697
28698/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(333);
28699/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; });
28700
28701/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(334);
28702/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; });
28703
28704/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(314);
28705/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; });
28706
28707/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(335);
28708/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; });
28709
28710/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(336);
28711/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; });
28712
28713/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(337);
28714/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; });
28715
28716/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(338);
28717/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; });
28718
28719/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(339);
28720/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; });
28721
28722/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(340);
28723/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; });
28724
28725/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(341);
28726/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; });
28727
28728/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(342);
28729/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; });
28730
28731/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(343);
28732/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; });
28733
28734/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(344);
28735/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; });
28736
28737/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(346);
28738/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; });
28739
28740/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(347);
28741/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; });
28742
28743/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(348);
28744/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; });
28745
28746/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(296);
28747/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; });
28748
28749/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(309);
28750/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; });
28751
28752/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(349);
28753/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; });
28754
28755/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(350);
28756/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; });
28757
28758/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(351);
28759/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; });
28760
28761/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(352);
28762/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; });
28763
28764/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(353);
28765/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; });
28766
28767/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(295);
28768/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; });
28769
28770/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(354);
28771/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; });
28772
28773/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(355);
28774/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; });
28775
28776/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(356);
28777/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; });
28778
28779/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(357);
28780/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; });
28781
28782/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(358);
28783/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; });
28784
28785/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(359);
28786/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; });
28787
28788/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(360);
28789/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; });
28790
28791/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(361);
28792/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; });
28793
28794/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(362);
28795/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; });
28796
28797/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(363);
28798/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; });
28799
28800/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(364);
28801/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; });
28802
28803/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(365);
28804/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; });
28805
28806/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(366);
28807/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; });
28808
28809/** PURE_IMPORTS_START PURE_IMPORTS_END */
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914//# sourceMappingURL=index.js.map
28915
28916
28917/***/ }),
28918/* 270 */
28919/***/ (function(module, __webpack_exports__, __webpack_require__) {
28920
28921"use strict";
28922__webpack_require__.r(__webpack_exports__);
28923/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
28924/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
28925/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
28926/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
28927/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28928
28929
28930
28931function audit(durationSelector) {
28932 return function auditOperatorFunction(source) {
28933 return source.lift(new AuditOperator(durationSelector));
28934 };
28935}
28936var AuditOperator = /*@__PURE__*/ (function () {
28937 function AuditOperator(durationSelector) {
28938 this.durationSelector = durationSelector;
28939 }
28940 AuditOperator.prototype.call = function (subscriber, source) {
28941 return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
28942 };
28943 return AuditOperator;
28944}());
28945var AuditSubscriber = /*@__PURE__*/ (function (_super) {
28946 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AuditSubscriber, _super);
28947 function AuditSubscriber(destination, durationSelector) {
28948 var _this = _super.call(this, destination) || this;
28949 _this.durationSelector = durationSelector;
28950 _this.hasValue = false;
28951 return _this;
28952 }
28953 AuditSubscriber.prototype._next = function (value) {
28954 this.value = value;
28955 this.hasValue = true;
28956 if (!this.throttled) {
28957 var duration = void 0;
28958 try {
28959 var durationSelector = this.durationSelector;
28960 duration = durationSelector(value);
28961 }
28962 catch (err) {
28963 return this.destination.error(err);
28964 }
28965 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
28966 if (!innerSubscription || innerSubscription.closed) {
28967 this.clearThrottle();
28968 }
28969 else {
28970 this.add(this.throttled = innerSubscription);
28971 }
28972 }
28973 };
28974 AuditSubscriber.prototype.clearThrottle = function () {
28975 var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
28976 if (throttled) {
28977 this.remove(throttled);
28978 this.throttled = null;
28979 throttled.unsubscribe();
28980 }
28981 if (hasValue) {
28982 this.value = null;
28983 this.hasValue = false;
28984 this.destination.next(value);
28985 }
28986 };
28987 AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
28988 this.clearThrottle();
28989 };
28990 AuditSubscriber.prototype.notifyComplete = function () {
28991 this.clearThrottle();
28992 };
28993 return AuditSubscriber;
28994}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
28995//# sourceMappingURL=audit.js.map
28996
28997
28998/***/ }),
28999/* 271 */
29000/***/ (function(module, __webpack_exports__, __webpack_require__) {
29001
29002"use strict";
29003__webpack_require__.r(__webpack_exports__);
29004/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
29005/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
29006/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(270);
29007/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(265);
29008/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
29009
29010
29011
29012function auditTime(duration, scheduler) {
29013 if (scheduler === void 0) {
29014 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
29015 }
29016 return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(function () { return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler); });
29017}
29018//# sourceMappingURL=auditTime.js.map
29019
29020
29021/***/ }),
29022/* 272 */
29023/***/ (function(module, __webpack_exports__, __webpack_require__) {
29024
29025"use strict";
29026__webpack_require__.r(__webpack_exports__);
29027/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; });
29028/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29029/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29030/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29031/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29032
29033
29034
29035function buffer(closingNotifier) {
29036 return function bufferOperatorFunction(source) {
29037 return source.lift(new BufferOperator(closingNotifier));
29038 };
29039}
29040var BufferOperator = /*@__PURE__*/ (function () {
29041 function BufferOperator(closingNotifier) {
29042 this.closingNotifier = closingNotifier;
29043 }
29044 BufferOperator.prototype.call = function (subscriber, source) {
29045 return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
29046 };
29047 return BufferOperator;
29048}());
29049var BufferSubscriber = /*@__PURE__*/ (function (_super) {
29050 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSubscriber, _super);
29051 function BufferSubscriber(destination, closingNotifier) {
29052 var _this = _super.call(this, destination) || this;
29053 _this.buffer = [];
29054 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, closingNotifier));
29055 return _this;
29056 }
29057 BufferSubscriber.prototype._next = function (value) {
29058 this.buffer.push(value);
29059 };
29060 BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29061 var buffer = this.buffer;
29062 this.buffer = [];
29063 this.destination.next(buffer);
29064 };
29065 return BufferSubscriber;
29066}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29067//# sourceMappingURL=buffer.js.map
29068
29069
29070/***/ }),
29071/* 273 */
29072/***/ (function(module, __webpack_exports__, __webpack_require__) {
29073
29074"use strict";
29075__webpack_require__.r(__webpack_exports__);
29076/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
29077/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29078/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29079/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29080
29081
29082function bufferCount(bufferSize, startBufferEvery) {
29083 if (startBufferEvery === void 0) {
29084 startBufferEvery = null;
29085 }
29086 return function bufferCountOperatorFunction(source) {
29087 return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
29088 };
29089}
29090var BufferCountOperator = /*@__PURE__*/ (function () {
29091 function BufferCountOperator(bufferSize, startBufferEvery) {
29092 this.bufferSize = bufferSize;
29093 this.startBufferEvery = startBufferEvery;
29094 if (!startBufferEvery || bufferSize === startBufferEvery) {
29095 this.subscriberClass = BufferCountSubscriber;
29096 }
29097 else {
29098 this.subscriberClass = BufferSkipCountSubscriber;
29099 }
29100 }
29101 BufferCountOperator.prototype.call = function (subscriber, source) {
29102 return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
29103 };
29104 return BufferCountOperator;
29105}());
29106var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
29107 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferCountSubscriber, _super);
29108 function BufferCountSubscriber(destination, bufferSize) {
29109 var _this = _super.call(this, destination) || this;
29110 _this.bufferSize = bufferSize;
29111 _this.buffer = [];
29112 return _this;
29113 }
29114 BufferCountSubscriber.prototype._next = function (value) {
29115 var buffer = this.buffer;
29116 buffer.push(value);
29117 if (buffer.length == this.bufferSize) {
29118 this.destination.next(buffer);
29119 this.buffer = [];
29120 }
29121 };
29122 BufferCountSubscriber.prototype._complete = function () {
29123 var buffer = this.buffer;
29124 if (buffer.length > 0) {
29125 this.destination.next(buffer);
29126 }
29127 _super.prototype._complete.call(this);
29128 };
29129 return BufferCountSubscriber;
29130}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29131var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
29132 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSkipCountSubscriber, _super);
29133 function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
29134 var _this = _super.call(this, destination) || this;
29135 _this.bufferSize = bufferSize;
29136 _this.startBufferEvery = startBufferEvery;
29137 _this.buffers = [];
29138 _this.count = 0;
29139 return _this;
29140 }
29141 BufferSkipCountSubscriber.prototype._next = function (value) {
29142 var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
29143 this.count++;
29144 if (count % startBufferEvery === 0) {
29145 buffers.push([]);
29146 }
29147 for (var i = buffers.length; i--;) {
29148 var buffer = buffers[i];
29149 buffer.push(value);
29150 if (buffer.length === bufferSize) {
29151 buffers.splice(i, 1);
29152 this.destination.next(buffer);
29153 }
29154 }
29155 };
29156 BufferSkipCountSubscriber.prototype._complete = function () {
29157 var _a = this, buffers = _a.buffers, destination = _a.destination;
29158 while (buffers.length > 0) {
29159 var buffer = buffers.shift();
29160 if (buffer.length > 0) {
29161 destination.next(buffer);
29162 }
29163 }
29164 _super.prototype._complete.call(this);
29165 };
29166 return BufferSkipCountSubscriber;
29167}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29168//# sourceMappingURL=bufferCount.js.map
29169
29170
29171/***/ }),
29172/* 274 */
29173/***/ (function(module, __webpack_exports__, __webpack_require__) {
29174
29175"use strict";
29176__webpack_require__.r(__webpack_exports__);
29177/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
29178/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29179/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
29180/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
29181/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
29182/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
29183
29184
29185
29186
29187function bufferTime(bufferTimeSpan) {
29188 var length = arguments.length;
29189 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
29190 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(arguments[arguments.length - 1])) {
29191 scheduler = arguments[arguments.length - 1];
29192 length--;
29193 }
29194 var bufferCreationInterval = null;
29195 if (length >= 2) {
29196 bufferCreationInterval = arguments[1];
29197 }
29198 var maxBufferSize = Number.POSITIVE_INFINITY;
29199 if (length >= 3) {
29200 maxBufferSize = arguments[2];
29201 }
29202 return function bufferTimeOperatorFunction(source) {
29203 return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
29204 };
29205}
29206var BufferTimeOperator = /*@__PURE__*/ (function () {
29207 function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
29208 this.bufferTimeSpan = bufferTimeSpan;
29209 this.bufferCreationInterval = bufferCreationInterval;
29210 this.maxBufferSize = maxBufferSize;
29211 this.scheduler = scheduler;
29212 }
29213 BufferTimeOperator.prototype.call = function (subscriber, source) {
29214 return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
29215 };
29216 return BufferTimeOperator;
29217}());
29218var Context = /*@__PURE__*/ (function () {
29219 function Context() {
29220 this.buffer = [];
29221 }
29222 return Context;
29223}());
29224var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
29225 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferTimeSubscriber, _super);
29226 function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
29227 var _this = _super.call(this, destination) || this;
29228 _this.bufferTimeSpan = bufferTimeSpan;
29229 _this.bufferCreationInterval = bufferCreationInterval;
29230 _this.maxBufferSize = maxBufferSize;
29231 _this.scheduler = scheduler;
29232 _this.contexts = [];
29233 var context = _this.openContext();
29234 _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
29235 if (_this.timespanOnly) {
29236 var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
29237 _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
29238 }
29239 else {
29240 var closeState = { subscriber: _this, context: context };
29241 var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
29242 _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
29243 _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
29244 }
29245 return _this;
29246 }
29247 BufferTimeSubscriber.prototype._next = function (value) {
29248 var contexts = this.contexts;
29249 var len = contexts.length;
29250 var filledBufferContext;
29251 for (var i = 0; i < len; i++) {
29252 var context_1 = contexts[i];
29253 var buffer = context_1.buffer;
29254 buffer.push(value);
29255 if (buffer.length == this.maxBufferSize) {
29256 filledBufferContext = context_1;
29257 }
29258 }
29259 if (filledBufferContext) {
29260 this.onBufferFull(filledBufferContext);
29261 }
29262 };
29263 BufferTimeSubscriber.prototype._error = function (err) {
29264 this.contexts.length = 0;
29265 _super.prototype._error.call(this, err);
29266 };
29267 BufferTimeSubscriber.prototype._complete = function () {
29268 var _a = this, contexts = _a.contexts, destination = _a.destination;
29269 while (contexts.length > 0) {
29270 var context_2 = contexts.shift();
29271 destination.next(context_2.buffer);
29272 }
29273 _super.prototype._complete.call(this);
29274 };
29275 BufferTimeSubscriber.prototype._unsubscribe = function () {
29276 this.contexts = null;
29277 };
29278 BufferTimeSubscriber.prototype.onBufferFull = function (context) {
29279 this.closeContext(context);
29280 var closeAction = context.closeAction;
29281 closeAction.unsubscribe();
29282 this.remove(closeAction);
29283 if (!this.closed && this.timespanOnly) {
29284 context = this.openContext();
29285 var bufferTimeSpan = this.bufferTimeSpan;
29286 var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
29287 this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
29288 }
29289 };
29290 BufferTimeSubscriber.prototype.openContext = function () {
29291 var context = new Context();
29292 this.contexts.push(context);
29293 return context;
29294 };
29295 BufferTimeSubscriber.prototype.closeContext = function (context) {
29296 this.destination.next(context.buffer);
29297 var contexts = this.contexts;
29298 var spliceIndex = contexts ? contexts.indexOf(context) : -1;
29299 if (spliceIndex >= 0) {
29300 contexts.splice(contexts.indexOf(context), 1);
29301 }
29302 };
29303 return BufferTimeSubscriber;
29304}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
29305function dispatchBufferTimeSpanOnly(state) {
29306 var subscriber = state.subscriber;
29307 var prevContext = state.context;
29308 if (prevContext) {
29309 subscriber.closeContext(prevContext);
29310 }
29311 if (!subscriber.closed) {
29312 state.context = subscriber.openContext();
29313 state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
29314 }
29315}
29316function dispatchBufferCreation(state) {
29317 var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
29318 var context = subscriber.openContext();
29319 var action = this;
29320 if (!subscriber.closed) {
29321 subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
29322 action.schedule(state, bufferCreationInterval);
29323 }
29324}
29325function dispatchBufferClose(arg) {
29326 var subscriber = arg.subscriber, context = arg.context;
29327 subscriber.closeContext(context);
29328}
29329//# sourceMappingURL=bufferTime.js.map
29330
29331
29332/***/ }),
29333/* 275 */
29334/***/ (function(module, __webpack_exports__, __webpack_require__) {
29335
29336"use strict";
29337__webpack_require__.r(__webpack_exports__);
29338/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
29339/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29340/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
29341/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29342/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
29343/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
29344
29345
29346
29347
29348function bufferToggle(openings, closingSelector) {
29349 return function bufferToggleOperatorFunction(source) {
29350 return source.lift(new BufferToggleOperator(openings, closingSelector));
29351 };
29352}
29353var BufferToggleOperator = /*@__PURE__*/ (function () {
29354 function BufferToggleOperator(openings, closingSelector) {
29355 this.openings = openings;
29356 this.closingSelector = closingSelector;
29357 }
29358 BufferToggleOperator.prototype.call = function (subscriber, source) {
29359 return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
29360 };
29361 return BufferToggleOperator;
29362}());
29363var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
29364 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferToggleSubscriber, _super);
29365 function BufferToggleSubscriber(destination, openings, closingSelector) {
29366 var _this = _super.call(this, destination) || this;
29367 _this.openings = openings;
29368 _this.closingSelector = closingSelector;
29369 _this.contexts = [];
29370 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, openings));
29371 return _this;
29372 }
29373 BufferToggleSubscriber.prototype._next = function (value) {
29374 var contexts = this.contexts;
29375 var len = contexts.length;
29376 for (var i = 0; i < len; i++) {
29377 contexts[i].buffer.push(value);
29378 }
29379 };
29380 BufferToggleSubscriber.prototype._error = function (err) {
29381 var contexts = this.contexts;
29382 while (contexts.length > 0) {
29383 var context_1 = contexts.shift();
29384 context_1.subscription.unsubscribe();
29385 context_1.buffer = null;
29386 context_1.subscription = null;
29387 }
29388 this.contexts = null;
29389 _super.prototype._error.call(this, err);
29390 };
29391 BufferToggleSubscriber.prototype._complete = function () {
29392 var contexts = this.contexts;
29393 while (contexts.length > 0) {
29394 var context_2 = contexts.shift();
29395 this.destination.next(context_2.buffer);
29396 context_2.subscription.unsubscribe();
29397 context_2.buffer = null;
29398 context_2.subscription = null;
29399 }
29400 this.contexts = null;
29401 _super.prototype._complete.call(this);
29402 };
29403 BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29404 outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
29405 };
29406 BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
29407 this.closeBuffer(innerSub.context);
29408 };
29409 BufferToggleSubscriber.prototype.openBuffer = function (value) {
29410 try {
29411 var closingSelector = this.closingSelector;
29412 var closingNotifier = closingSelector.call(this, value);
29413 if (closingNotifier) {
29414 this.trySubscribe(closingNotifier);
29415 }
29416 }
29417 catch (err) {
29418 this._error(err);
29419 }
29420 };
29421 BufferToggleSubscriber.prototype.closeBuffer = function (context) {
29422 var contexts = this.contexts;
29423 if (contexts && context) {
29424 var buffer = context.buffer, subscription = context.subscription;
29425 this.destination.next(buffer);
29426 contexts.splice(contexts.indexOf(context), 1);
29427 this.remove(subscription);
29428 subscription.unsubscribe();
29429 }
29430 };
29431 BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
29432 var contexts = this.contexts;
29433 var buffer = [];
29434 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
29435 var context = { buffer: buffer, subscription: subscription };
29436 contexts.push(context);
29437 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier, context);
29438 if (!innerSubscription || innerSubscription.closed) {
29439 this.closeBuffer(context);
29440 }
29441 else {
29442 innerSubscription.context = context;
29443 this.add(innerSubscription);
29444 subscription.add(innerSubscription);
29445 }
29446 };
29447 return BufferToggleSubscriber;
29448}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
29449//# sourceMappingURL=bufferToggle.js.map
29450
29451
29452/***/ }),
29453/* 276 */
29454/***/ (function(module, __webpack_exports__, __webpack_require__) {
29455
29456"use strict";
29457__webpack_require__.r(__webpack_exports__);
29458/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
29459/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29460/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
29461/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
29462/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
29463/** PURE_IMPORTS_START tslib,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29464
29465
29466
29467
29468function bufferWhen(closingSelector) {
29469 return function (source) {
29470 return source.lift(new BufferWhenOperator(closingSelector));
29471 };
29472}
29473var BufferWhenOperator = /*@__PURE__*/ (function () {
29474 function BufferWhenOperator(closingSelector) {
29475 this.closingSelector = closingSelector;
29476 }
29477 BufferWhenOperator.prototype.call = function (subscriber, source) {
29478 return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
29479 };
29480 return BufferWhenOperator;
29481}());
29482var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
29483 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferWhenSubscriber, _super);
29484 function BufferWhenSubscriber(destination, closingSelector) {
29485 var _this = _super.call(this, destination) || this;
29486 _this.closingSelector = closingSelector;
29487 _this.subscribing = false;
29488 _this.openBuffer();
29489 return _this;
29490 }
29491 BufferWhenSubscriber.prototype._next = function (value) {
29492 this.buffer.push(value);
29493 };
29494 BufferWhenSubscriber.prototype._complete = function () {
29495 var buffer = this.buffer;
29496 if (buffer) {
29497 this.destination.next(buffer);
29498 }
29499 _super.prototype._complete.call(this);
29500 };
29501 BufferWhenSubscriber.prototype._unsubscribe = function () {
29502 this.buffer = null;
29503 this.subscribing = false;
29504 };
29505 BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29506 this.openBuffer();
29507 };
29508 BufferWhenSubscriber.prototype.notifyComplete = function () {
29509 if (this.subscribing) {
29510 this.complete();
29511 }
29512 else {
29513 this.openBuffer();
29514 }
29515 };
29516 BufferWhenSubscriber.prototype.openBuffer = function () {
29517 var closingSubscription = this.closingSubscription;
29518 if (closingSubscription) {
29519 this.remove(closingSubscription);
29520 closingSubscription.unsubscribe();
29521 }
29522 var buffer = this.buffer;
29523 if (this.buffer) {
29524 this.destination.next(buffer);
29525 }
29526 this.buffer = [];
29527 var closingNotifier;
29528 try {
29529 var closingSelector = this.closingSelector;
29530 closingNotifier = closingSelector();
29531 }
29532 catch (err) {
29533 return this.error(err);
29534 }
29535 closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
29536 this.closingSubscription = closingSubscription;
29537 this.add(closingSubscription);
29538 this.subscribing = true;
29539 closingSubscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
29540 this.subscribing = false;
29541 };
29542 return BufferWhenSubscriber;
29543}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
29544//# sourceMappingURL=bufferWhen.js.map
29545
29546
29547/***/ }),
29548/* 277 */
29549/***/ (function(module, __webpack_exports__, __webpack_require__) {
29550
29551"use strict";
29552__webpack_require__.r(__webpack_exports__);
29553/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
29554/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29555/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29556/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
29557/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
29558/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29559
29560
29561
29562
29563function catchError(selector) {
29564 return function catchErrorOperatorFunction(source) {
29565 var operator = new CatchOperator(selector);
29566 var caught = source.lift(operator);
29567 return (operator.caught = caught);
29568 };
29569}
29570var CatchOperator = /*@__PURE__*/ (function () {
29571 function CatchOperator(selector) {
29572 this.selector = selector;
29573 }
29574 CatchOperator.prototype.call = function (subscriber, source) {
29575 return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
29576 };
29577 return CatchOperator;
29578}());
29579var CatchSubscriber = /*@__PURE__*/ (function (_super) {
29580 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CatchSubscriber, _super);
29581 function CatchSubscriber(destination, selector, caught) {
29582 var _this = _super.call(this, destination) || this;
29583 _this.selector = selector;
29584 _this.caught = caught;
29585 return _this;
29586 }
29587 CatchSubscriber.prototype.error = function (err) {
29588 if (!this.isStopped) {
29589 var result = void 0;
29590 try {
29591 result = this.selector(err, this.caught);
29592 }
29593 catch (err2) {
29594 _super.prototype.error.call(this, err2);
29595 return;
29596 }
29597 this._unsubscribeAndRecycle();
29598 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
29599 this.add(innerSubscriber);
29600 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
29601 if (innerSubscription !== innerSubscriber) {
29602 this.add(innerSubscription);
29603 }
29604 }
29605 };
29606 return CatchSubscriber;
29607}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29608//# sourceMappingURL=catchError.js.map
29609
29610
29611/***/ }),
29612/* 278 */
29613/***/ (function(module, __webpack_exports__, __webpack_require__) {
29614
29615"use strict";
29616__webpack_require__.r(__webpack_exports__);
29617/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
29618/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(226);
29619/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
29620
29621function combineAll(project) {
29622 return function (source) { return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); };
29623}
29624//# sourceMappingURL=combineAll.js.map
29625
29626
29627/***/ }),
29628/* 279 */
29629/***/ (function(module, __webpack_exports__, __webpack_require__) {
29630
29631"use strict";
29632__webpack_require__.r(__webpack_exports__);
29633/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
29634/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
29635/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
29636/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(241);
29637/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
29638
29639
29640
29641var none = {};
29642function combineLatest() {
29643 var observables = [];
29644 for (var _i = 0; _i < arguments.length; _i++) {
29645 observables[_i] = arguments[_i];
29646 }
29647 var project = null;
29648 if (typeof observables[observables.length - 1] === 'function') {
29649 project = observables.pop();
29650 }
29651 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
29652 observables = observables[0].slice();
29653 }
29654 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)); };
29655}
29656//# sourceMappingURL=combineLatest.js.map
29657
29658
29659/***/ }),
29660/* 280 */
29661/***/ (function(module, __webpack_exports__, __webpack_require__) {
29662
29663"use strict";
29664__webpack_require__.r(__webpack_exports__);
29665/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
29666/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
29667/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
29668
29669function concat() {
29670 var observables = [];
29671 for (var _i = 0; _i < arguments.length; _i++) {
29672 observables[_i] = arguments[_i];
29673 }
29674 return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"].apply(void 0, [source].concat(observables))); };
29675}
29676//# sourceMappingURL=concat.js.map
29677
29678
29679/***/ }),
29680/* 281 */
29681/***/ (function(module, __webpack_exports__, __webpack_require__) {
29682
29683"use strict";
29684__webpack_require__.r(__webpack_exports__);
29685/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
29686/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
29687/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
29688
29689function concatMap(project, resultSelector) {
29690 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
29691}
29692//# sourceMappingURL=concatMap.js.map
29693
29694
29695/***/ }),
29696/* 282 */
29697/***/ (function(module, __webpack_exports__, __webpack_require__) {
29698
29699"use strict";
29700__webpack_require__.r(__webpack_exports__);
29701/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
29702/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(281);
29703/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
29704
29705function concatMapTo(innerObservable, resultSelector) {
29706 return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () { return innerObservable; }, resultSelector);
29707}
29708//# sourceMappingURL=concatMapTo.js.map
29709
29710
29711/***/ }),
29712/* 283 */
29713/***/ (function(module, __webpack_exports__, __webpack_require__) {
29714
29715"use strict";
29716__webpack_require__.r(__webpack_exports__);
29717/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
29718/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29719/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29720/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29721
29722
29723function count(predicate) {
29724 return function (source) { return source.lift(new CountOperator(predicate, source)); };
29725}
29726var CountOperator = /*@__PURE__*/ (function () {
29727 function CountOperator(predicate, source) {
29728 this.predicate = predicate;
29729 this.source = source;
29730 }
29731 CountOperator.prototype.call = function (subscriber, source) {
29732 return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
29733 };
29734 return CountOperator;
29735}());
29736var CountSubscriber = /*@__PURE__*/ (function (_super) {
29737 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountSubscriber, _super);
29738 function CountSubscriber(destination, predicate, source) {
29739 var _this = _super.call(this, destination) || this;
29740 _this.predicate = predicate;
29741 _this.source = source;
29742 _this.count = 0;
29743 _this.index = 0;
29744 return _this;
29745 }
29746 CountSubscriber.prototype._next = function (value) {
29747 if (this.predicate) {
29748 this._tryPredicate(value);
29749 }
29750 else {
29751 this.count++;
29752 }
29753 };
29754 CountSubscriber.prototype._tryPredicate = function (value) {
29755 var result;
29756 try {
29757 result = this.predicate(value, this.index++, this.source);
29758 }
29759 catch (err) {
29760 this.destination.error(err);
29761 return;
29762 }
29763 if (result) {
29764 this.count++;
29765 }
29766 };
29767 CountSubscriber.prototype._complete = function () {
29768 this.destination.next(this.count);
29769 this.destination.complete();
29770 };
29771 return CountSubscriber;
29772}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29773//# sourceMappingURL=count.js.map
29774
29775
29776/***/ }),
29777/* 284 */
29778/***/ (function(module, __webpack_exports__, __webpack_require__) {
29779
29780"use strict";
29781__webpack_require__.r(__webpack_exports__);
29782/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
29783/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29784/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29785/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
29786/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29787
29788
29789
29790function debounce(durationSelector) {
29791 return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
29792}
29793var DebounceOperator = /*@__PURE__*/ (function () {
29794 function DebounceOperator(durationSelector) {
29795 this.durationSelector = durationSelector;
29796 }
29797 DebounceOperator.prototype.call = function (subscriber, source) {
29798 return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
29799 };
29800 return DebounceOperator;
29801}());
29802var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
29803 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceSubscriber, _super);
29804 function DebounceSubscriber(destination, durationSelector) {
29805 var _this = _super.call(this, destination) || this;
29806 _this.durationSelector = durationSelector;
29807 _this.hasValue = false;
29808 _this.durationSubscription = null;
29809 return _this;
29810 }
29811 DebounceSubscriber.prototype._next = function (value) {
29812 try {
29813 var result = this.durationSelector.call(this, value);
29814 if (result) {
29815 this._tryNext(value, result);
29816 }
29817 }
29818 catch (err) {
29819 this.destination.error(err);
29820 }
29821 };
29822 DebounceSubscriber.prototype._complete = function () {
29823 this.emitValue();
29824 this.destination.complete();
29825 };
29826 DebounceSubscriber.prototype._tryNext = function (value, duration) {
29827 var subscription = this.durationSubscription;
29828 this.value = value;
29829 this.hasValue = true;
29830 if (subscription) {
29831 subscription.unsubscribe();
29832 this.remove(subscription);
29833 }
29834 subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
29835 if (subscription && !subscription.closed) {
29836 this.add(this.durationSubscription = subscription);
29837 }
29838 };
29839 DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29840 this.emitValue();
29841 };
29842 DebounceSubscriber.prototype.notifyComplete = function () {
29843 this.emitValue();
29844 };
29845 DebounceSubscriber.prototype.emitValue = function () {
29846 if (this.hasValue) {
29847 var value = this.value;
29848 var subscription = this.durationSubscription;
29849 if (subscription) {
29850 this.durationSubscription = null;
29851 subscription.unsubscribe();
29852 this.remove(subscription);
29853 }
29854 this.value = null;
29855 this.hasValue = false;
29856 _super.prototype._next.call(this, value);
29857 }
29858 };
29859 return DebounceSubscriber;
29860}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29861//# sourceMappingURL=debounce.js.map
29862
29863
29864/***/ }),
29865/* 285 */
29866/***/ (function(module, __webpack_exports__, __webpack_require__) {
29867
29868"use strict";
29869__webpack_require__.r(__webpack_exports__);
29870/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
29871/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29872/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29873/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
29874/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
29875
29876
29877
29878function debounceTime(dueTime, scheduler) {
29879 if (scheduler === void 0) {
29880 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
29881 }
29882 return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
29883}
29884var DebounceTimeOperator = /*@__PURE__*/ (function () {
29885 function DebounceTimeOperator(dueTime, scheduler) {
29886 this.dueTime = dueTime;
29887 this.scheduler = scheduler;
29888 }
29889 DebounceTimeOperator.prototype.call = function (subscriber, source) {
29890 return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
29891 };
29892 return DebounceTimeOperator;
29893}());
29894var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
29895 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceTimeSubscriber, _super);
29896 function DebounceTimeSubscriber(destination, dueTime, scheduler) {
29897 var _this = _super.call(this, destination) || this;
29898 _this.dueTime = dueTime;
29899 _this.scheduler = scheduler;
29900 _this.debouncedSubscription = null;
29901 _this.lastValue = null;
29902 _this.hasValue = false;
29903 return _this;
29904 }
29905 DebounceTimeSubscriber.prototype._next = function (value) {
29906 this.clearDebounce();
29907 this.lastValue = value;
29908 this.hasValue = true;
29909 this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
29910 };
29911 DebounceTimeSubscriber.prototype._complete = function () {
29912 this.debouncedNext();
29913 this.destination.complete();
29914 };
29915 DebounceTimeSubscriber.prototype.debouncedNext = function () {
29916 this.clearDebounce();
29917 if (this.hasValue) {
29918 var lastValue = this.lastValue;
29919 this.lastValue = null;
29920 this.hasValue = false;
29921 this.destination.next(lastValue);
29922 }
29923 };
29924 DebounceTimeSubscriber.prototype.clearDebounce = function () {
29925 var debouncedSubscription = this.debouncedSubscription;
29926 if (debouncedSubscription !== null) {
29927 this.remove(debouncedSubscription);
29928 debouncedSubscription.unsubscribe();
29929 this.debouncedSubscription = null;
29930 }
29931 };
29932 return DebounceTimeSubscriber;
29933}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29934function dispatchNext(subscriber) {
29935 subscriber.debouncedNext();
29936}
29937//# sourceMappingURL=debounceTime.js.map
29938
29939
29940/***/ }),
29941/* 286 */
29942/***/ (function(module, __webpack_exports__, __webpack_require__) {
29943
29944"use strict";
29945__webpack_require__.r(__webpack_exports__);
29946/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
29947/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29948/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29949/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29950
29951
29952function defaultIfEmpty(defaultValue) {
29953 if (defaultValue === void 0) {
29954 defaultValue = null;
29955 }
29956 return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
29957}
29958var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
29959 function DefaultIfEmptyOperator(defaultValue) {
29960 this.defaultValue = defaultValue;
29961 }
29962 DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
29963 return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
29964 };
29965 return DefaultIfEmptyOperator;
29966}());
29967var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
29968 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DefaultIfEmptySubscriber, _super);
29969 function DefaultIfEmptySubscriber(destination, defaultValue) {
29970 var _this = _super.call(this, destination) || this;
29971 _this.defaultValue = defaultValue;
29972 _this.isEmpty = true;
29973 return _this;
29974 }
29975 DefaultIfEmptySubscriber.prototype._next = function (value) {
29976 this.isEmpty = false;
29977 this.destination.next(value);
29978 };
29979 DefaultIfEmptySubscriber.prototype._complete = function () {
29980 if (this.isEmpty) {
29981 this.destination.next(this.defaultValue);
29982 }
29983 this.destination.complete();
29984 };
29985 return DefaultIfEmptySubscriber;
29986}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29987//# sourceMappingURL=defaultIfEmpty.js.map
29988
29989
29990/***/ }),
29991/* 287 */
29992/***/ (function(module, __webpack_exports__, __webpack_require__) {
29993
29994"use strict";
29995__webpack_require__.r(__webpack_exports__);
29996/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
29997/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
29998/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
29999/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(288);
30000/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
30001/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(200);
30002/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
30003
30004
30005
30006
30007
30008function delay(delay, scheduler) {
30009 if (scheduler === void 0) {
30010 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
30011 }
30012 var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(delay);
30013 var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
30014 return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
30015}
30016var DelayOperator = /*@__PURE__*/ (function () {
30017 function DelayOperator(delay, scheduler) {
30018 this.delay = delay;
30019 this.scheduler = scheduler;
30020 }
30021 DelayOperator.prototype.call = function (subscriber, source) {
30022 return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
30023 };
30024 return DelayOperator;
30025}());
30026var DelaySubscriber = /*@__PURE__*/ (function (_super) {
30027 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelaySubscriber, _super);
30028 function DelaySubscriber(destination, delay, scheduler) {
30029 var _this = _super.call(this, destination) || this;
30030 _this.delay = delay;
30031 _this.scheduler = scheduler;
30032 _this.queue = [];
30033 _this.active = false;
30034 _this.errored = false;
30035 return _this;
30036 }
30037 DelaySubscriber.dispatch = function (state) {
30038 var source = state.source;
30039 var queue = source.queue;
30040 var scheduler = state.scheduler;
30041 var destination = state.destination;
30042 while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
30043 queue.shift().notification.observe(destination);
30044 }
30045 if (queue.length > 0) {
30046 var delay_1 = Math.max(0, queue[0].time - scheduler.now());
30047 this.schedule(state, delay_1);
30048 }
30049 else {
30050 this.unsubscribe();
30051 source.active = false;
30052 }
30053 };
30054 DelaySubscriber.prototype._schedule = function (scheduler) {
30055 this.active = true;
30056 var destination = this.destination;
30057 destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
30058 source: this, destination: this.destination, scheduler: scheduler
30059 }));
30060 };
30061 DelaySubscriber.prototype.scheduleNotification = function (notification) {
30062 if (this.errored === true) {
30063 return;
30064 }
30065 var scheduler = this.scheduler;
30066 var message = new DelayMessage(scheduler.now() + this.delay, notification);
30067 this.queue.push(message);
30068 if (this.active === false) {
30069 this._schedule(scheduler);
30070 }
30071 };
30072 DelaySubscriber.prototype._next = function (value) {
30073 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createNext(value));
30074 };
30075 DelaySubscriber.prototype._error = function (err) {
30076 this.errored = true;
30077 this.queue = [];
30078 this.destination.error(err);
30079 this.unsubscribe();
30080 };
30081 DelaySubscriber.prototype._complete = function () {
30082 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createComplete());
30083 this.unsubscribe();
30084 };
30085 return DelaySubscriber;
30086}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
30087var DelayMessage = /*@__PURE__*/ (function () {
30088 function DelayMessage(time, notification) {
30089 this.time = time;
30090 this.notification = notification;
30091 }
30092 return DelayMessage;
30093}());
30094//# sourceMappingURL=delay.js.map
30095
30096
30097/***/ }),
30098/* 288 */
30099/***/ (function(module, __webpack_exports__, __webpack_require__) {
30100
30101"use strict";
30102__webpack_require__.r(__webpack_exports__);
30103/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
30104/** PURE_IMPORTS_START PURE_IMPORTS_END */
30105function isDate(value) {
30106 return value instanceof Date && !isNaN(+value);
30107}
30108//# sourceMappingURL=isDate.js.map
30109
30110
30111/***/ }),
30112/* 289 */
30113/***/ (function(module, __webpack_exports__, __webpack_require__) {
30114
30115"use strict";
30116__webpack_require__.r(__webpack_exports__);
30117/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
30118/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30119/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30120/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
30121/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
30122/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
30123/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30124
30125
30126
30127
30128
30129function delayWhen(delayDurationSelector, subscriptionDelay) {
30130 if (subscriptionDelay) {
30131 return function (source) {
30132 return new SubscriptionDelayObservable(source, subscriptionDelay)
30133 .lift(new DelayWhenOperator(delayDurationSelector));
30134 };
30135 }
30136 return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
30137}
30138var DelayWhenOperator = /*@__PURE__*/ (function () {
30139 function DelayWhenOperator(delayDurationSelector) {
30140 this.delayDurationSelector = delayDurationSelector;
30141 }
30142 DelayWhenOperator.prototype.call = function (subscriber, source) {
30143 return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
30144 };
30145 return DelayWhenOperator;
30146}());
30147var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
30148 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelayWhenSubscriber, _super);
30149 function DelayWhenSubscriber(destination, delayDurationSelector) {
30150 var _this = _super.call(this, destination) || this;
30151 _this.delayDurationSelector = delayDurationSelector;
30152 _this.completed = false;
30153 _this.delayNotifierSubscriptions = [];
30154 _this.index = 0;
30155 return _this;
30156 }
30157 DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30158 this.destination.next(outerValue);
30159 this.removeSubscription(innerSub);
30160 this.tryComplete();
30161 };
30162 DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
30163 this._error(error);
30164 };
30165 DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
30166 var value = this.removeSubscription(innerSub);
30167 if (value) {
30168 this.destination.next(value);
30169 }
30170 this.tryComplete();
30171 };
30172 DelayWhenSubscriber.prototype._next = function (value) {
30173 var index = this.index++;
30174 try {
30175 var delayNotifier = this.delayDurationSelector(value, index);
30176 if (delayNotifier) {
30177 this.tryDelay(delayNotifier, value);
30178 }
30179 }
30180 catch (err) {
30181 this.destination.error(err);
30182 }
30183 };
30184 DelayWhenSubscriber.prototype._complete = function () {
30185 this.completed = true;
30186 this.tryComplete();
30187 this.unsubscribe();
30188 };
30189 DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
30190 subscription.unsubscribe();
30191 var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
30192 if (subscriptionIdx !== -1) {
30193 this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
30194 }
30195 return subscription.outerValue;
30196 };
30197 DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
30198 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, delayNotifier, value);
30199 if (notifierSubscription && !notifierSubscription.closed) {
30200 var destination = this.destination;
30201 destination.add(notifierSubscription);
30202 this.delayNotifierSubscriptions.push(notifierSubscription);
30203 }
30204 };
30205 DelayWhenSubscriber.prototype.tryComplete = function () {
30206 if (this.completed && this.delayNotifierSubscriptions.length === 0) {
30207 this.destination.complete();
30208 }
30209 };
30210 return DelayWhenSubscriber;
30211}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
30212var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
30213 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelayObservable, _super);
30214 function SubscriptionDelayObservable(source, subscriptionDelay) {
30215 var _this = _super.call(this) || this;
30216 _this.source = source;
30217 _this.subscriptionDelay = subscriptionDelay;
30218 return _this;
30219 }
30220 SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
30221 this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
30222 };
30223 return SubscriptionDelayObservable;
30224}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
30225var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
30226 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelaySubscriber, _super);
30227 function SubscriptionDelaySubscriber(parent, source) {
30228 var _this = _super.call(this) || this;
30229 _this.parent = parent;
30230 _this.source = source;
30231 _this.sourceSubscribed = false;
30232 return _this;
30233 }
30234 SubscriptionDelaySubscriber.prototype._next = function (unused) {
30235 this.subscribeToSource();
30236 };
30237 SubscriptionDelaySubscriber.prototype._error = function (err) {
30238 this.unsubscribe();
30239 this.parent.error(err);
30240 };
30241 SubscriptionDelaySubscriber.prototype._complete = function () {
30242 this.unsubscribe();
30243 this.subscribeToSource();
30244 };
30245 SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
30246 if (!this.sourceSubscribed) {
30247 this.sourceSubscribed = true;
30248 this.unsubscribe();
30249 this.source.subscribe(this.parent);
30250 }
30251 };
30252 return SubscriptionDelaySubscriber;
30253}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30254//# sourceMappingURL=delayWhen.js.map
30255
30256
30257/***/ }),
30258/* 290 */
30259/***/ (function(module, __webpack_exports__, __webpack_require__) {
30260
30261"use strict";
30262__webpack_require__.r(__webpack_exports__);
30263/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
30264/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30265/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30266/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30267
30268
30269function dematerialize() {
30270 return function dematerializeOperatorFunction(source) {
30271 return source.lift(new DeMaterializeOperator());
30272 };
30273}
30274var DeMaterializeOperator = /*@__PURE__*/ (function () {
30275 function DeMaterializeOperator() {
30276 }
30277 DeMaterializeOperator.prototype.call = function (subscriber, source) {
30278 return source.subscribe(new DeMaterializeSubscriber(subscriber));
30279 };
30280 return DeMaterializeOperator;
30281}());
30282var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
30283 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DeMaterializeSubscriber, _super);
30284 function DeMaterializeSubscriber(destination) {
30285 return _super.call(this, destination) || this;
30286 }
30287 DeMaterializeSubscriber.prototype._next = function (value) {
30288 value.observe(this.destination);
30289 };
30290 return DeMaterializeSubscriber;
30291}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30292//# sourceMappingURL=dematerialize.js.map
30293
30294
30295/***/ }),
30296/* 291 */
30297/***/ (function(module, __webpack_exports__, __webpack_require__) {
30298
30299"use strict";
30300__webpack_require__.r(__webpack_exports__);
30301/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
30302/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; });
30303/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30304/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30305/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
30306/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30307
30308
30309
30310function distinct(keySelector, flushes) {
30311 return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
30312}
30313var DistinctOperator = /*@__PURE__*/ (function () {
30314 function DistinctOperator(keySelector, flushes) {
30315 this.keySelector = keySelector;
30316 this.flushes = flushes;
30317 }
30318 DistinctOperator.prototype.call = function (subscriber, source) {
30319 return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
30320 };
30321 return DistinctOperator;
30322}());
30323var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
30324 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctSubscriber, _super);
30325 function DistinctSubscriber(destination, keySelector, flushes) {
30326 var _this = _super.call(this, destination) || this;
30327 _this.keySelector = keySelector;
30328 _this.values = new Set();
30329 if (flushes) {
30330 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, flushes));
30331 }
30332 return _this;
30333 }
30334 DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30335 this.values.clear();
30336 };
30337 DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
30338 this._error(error);
30339 };
30340 DistinctSubscriber.prototype._next = function (value) {
30341 if (this.keySelector) {
30342 this._useKeySelector(value);
30343 }
30344 else {
30345 this._finalizeNext(value, value);
30346 }
30347 };
30348 DistinctSubscriber.prototype._useKeySelector = function (value) {
30349 var key;
30350 var destination = this.destination;
30351 try {
30352 key = this.keySelector(value);
30353 }
30354 catch (err) {
30355 destination.error(err);
30356 return;
30357 }
30358 this._finalizeNext(key, value);
30359 };
30360 DistinctSubscriber.prototype._finalizeNext = function (key, value) {
30361 var values = this.values;
30362 if (!values.has(key)) {
30363 values.add(key);
30364 this.destination.next(value);
30365 }
30366 };
30367 return DistinctSubscriber;
30368}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30369
30370//# sourceMappingURL=distinct.js.map
30371
30372
30373/***/ }),
30374/* 292 */
30375/***/ (function(module, __webpack_exports__, __webpack_require__) {
30376
30377"use strict";
30378__webpack_require__.r(__webpack_exports__);
30379/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
30380/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30381/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30382/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30383
30384
30385function distinctUntilChanged(compare, keySelector) {
30386 return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
30387}
30388var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
30389 function DistinctUntilChangedOperator(compare, keySelector) {
30390 this.compare = compare;
30391 this.keySelector = keySelector;
30392 }
30393 DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
30394 return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
30395 };
30396 return DistinctUntilChangedOperator;
30397}());
30398var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
30399 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctUntilChangedSubscriber, _super);
30400 function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
30401 var _this = _super.call(this, destination) || this;
30402 _this.keySelector = keySelector;
30403 _this.hasKey = false;
30404 if (typeof compare === 'function') {
30405 _this.compare = compare;
30406 }
30407 return _this;
30408 }
30409 DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
30410 return x === y;
30411 };
30412 DistinctUntilChangedSubscriber.prototype._next = function (value) {
30413 var key;
30414 try {
30415 var keySelector = this.keySelector;
30416 key = keySelector ? keySelector(value) : value;
30417 }
30418 catch (err) {
30419 return this.destination.error(err);
30420 }
30421 var result = false;
30422 if (this.hasKey) {
30423 try {
30424 var compare = this.compare;
30425 result = compare(this.key, key);
30426 }
30427 catch (err) {
30428 return this.destination.error(err);
30429 }
30430 }
30431 else {
30432 this.hasKey = true;
30433 }
30434 if (!result) {
30435 this.key = key;
30436 this.destination.next(value);
30437 }
30438 };
30439 return DistinctUntilChangedSubscriber;
30440}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30441//# sourceMappingURL=distinctUntilChanged.js.map
30442
30443
30444/***/ }),
30445/* 293 */
30446/***/ (function(module, __webpack_exports__, __webpack_require__) {
30447
30448"use strict";
30449__webpack_require__.r(__webpack_exports__);
30450/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
30451/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(292);
30452/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
30453
30454function distinctUntilKeyChanged(key, compare) {
30455 return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
30456}
30457//# sourceMappingURL=distinctUntilKeyChanged.js.map
30458
30459
30460/***/ }),
30461/* 294 */
30462/***/ (function(module, __webpack_exports__, __webpack_require__) {
30463
30464"use strict";
30465__webpack_require__.r(__webpack_exports__);
30466/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
30467/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(220);
30468/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
30469/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(295);
30470/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(286);
30471/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(296);
30472/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
30473
30474
30475
30476
30477
30478function elementAt(index, defaultValue) {
30479 if (index < 0) {
30480 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
30481 }
30482 var hasDefaultValue = arguments.length >= 2;
30483 return function (source) {
30484 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
30485 ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
30486 : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
30487 };
30488}
30489//# sourceMappingURL=elementAt.js.map
30490
30491
30492/***/ }),
30493/* 295 */
30494/***/ (function(module, __webpack_exports__, __webpack_require__) {
30495
30496"use strict";
30497__webpack_require__.r(__webpack_exports__);
30498/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
30499/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30500/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(221);
30501/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(169);
30502/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */
30503
30504
30505
30506function throwIfEmpty(errorFactory) {
30507 if (errorFactory === void 0) {
30508 errorFactory = defaultErrorFactory;
30509 }
30510 return function (source) {
30511 return source.lift(new ThrowIfEmptyOperator(errorFactory));
30512 };
30513}
30514var ThrowIfEmptyOperator = /*@__PURE__*/ (function () {
30515 function ThrowIfEmptyOperator(errorFactory) {
30516 this.errorFactory = errorFactory;
30517 }
30518 ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {
30519 return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
30520 };
30521 return ThrowIfEmptyOperator;
30522}());
30523var ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
30524 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrowIfEmptySubscriber, _super);
30525 function ThrowIfEmptySubscriber(destination, errorFactory) {
30526 var _this = _super.call(this, destination) || this;
30527 _this.errorFactory = errorFactory;
30528 _this.hasValue = false;
30529 return _this;
30530 }
30531 ThrowIfEmptySubscriber.prototype._next = function (value) {
30532 this.hasValue = true;
30533 this.destination.next(value);
30534 };
30535 ThrowIfEmptySubscriber.prototype._complete = function () {
30536 if (!this.hasValue) {
30537 var err = void 0;
30538 try {
30539 err = this.errorFactory();
30540 }
30541 catch (e) {
30542 err = e;
30543 }
30544 this.destination.error(err);
30545 }
30546 else {
30547 return this.destination.complete();
30548 }
30549 };
30550 return ThrowIfEmptySubscriber;
30551}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
30552function defaultErrorFactory() {
30553 return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
30554}
30555//# sourceMappingURL=throwIfEmpty.js.map
30556
30557
30558/***/ }),
30559/* 296 */
30560/***/ (function(module, __webpack_exports__, __webpack_require__) {
30561
30562"use strict";
30563__webpack_require__.r(__webpack_exports__);
30564/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; });
30565/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30566/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30567/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
30568/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
30569/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
30570
30571
30572
30573
30574function take(count) {
30575 return function (source) {
30576 if (count === 0) {
30577 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
30578 }
30579 else {
30580 return source.lift(new TakeOperator(count));
30581 }
30582 };
30583}
30584var TakeOperator = /*@__PURE__*/ (function () {
30585 function TakeOperator(total) {
30586 this.total = total;
30587 if (this.total < 0) {
30588 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
30589 }
30590 }
30591 TakeOperator.prototype.call = function (subscriber, source) {
30592 return source.subscribe(new TakeSubscriber(subscriber, this.total));
30593 };
30594 return TakeOperator;
30595}());
30596var TakeSubscriber = /*@__PURE__*/ (function (_super) {
30597 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeSubscriber, _super);
30598 function TakeSubscriber(destination, total) {
30599 var _this = _super.call(this, destination) || this;
30600 _this.total = total;
30601 _this.count = 0;
30602 return _this;
30603 }
30604 TakeSubscriber.prototype._next = function (value) {
30605 var total = this.total;
30606 var count = ++this.count;
30607 if (count <= total) {
30608 this.destination.next(value);
30609 if (count === total) {
30610 this.destination.complete();
30611 this.unsubscribe();
30612 }
30613 }
30614 };
30615 return TakeSubscriber;
30616}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30617//# sourceMappingURL=take.js.map
30618
30619
30620/***/ }),
30621/* 297 */
30622/***/ (function(module, __webpack_exports__, __webpack_require__) {
30623
30624"use strict";
30625__webpack_require__.r(__webpack_exports__);
30626/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; });
30627/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
30628/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
30629/** PURE_IMPORTS_START _observable_concat,_observable_of PURE_IMPORTS_END */
30630
30631
30632function endWith() {
30633 var array = [];
30634 for (var _i = 0; _i < arguments.length; _i++) {
30635 array[_i] = arguments[_i];
30636 }
30637 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, _observable_of__WEBPACK_IMPORTED_MODULE_1__["of"].apply(void 0, array)); };
30638}
30639//# sourceMappingURL=endWith.js.map
30640
30641
30642/***/ }),
30643/* 298 */
30644/***/ (function(module, __webpack_exports__, __webpack_require__) {
30645
30646"use strict";
30647__webpack_require__.r(__webpack_exports__);
30648/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; });
30649/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30650/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30651/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30652
30653
30654function every(predicate, thisArg) {
30655 return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
30656}
30657var EveryOperator = /*@__PURE__*/ (function () {
30658 function EveryOperator(predicate, thisArg, source) {
30659 this.predicate = predicate;
30660 this.thisArg = thisArg;
30661 this.source = source;
30662 }
30663 EveryOperator.prototype.call = function (observer, source) {
30664 return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
30665 };
30666 return EveryOperator;
30667}());
30668var EverySubscriber = /*@__PURE__*/ (function (_super) {
30669 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EverySubscriber, _super);
30670 function EverySubscriber(destination, predicate, thisArg, source) {
30671 var _this = _super.call(this, destination) || this;
30672 _this.predicate = predicate;
30673 _this.thisArg = thisArg;
30674 _this.source = source;
30675 _this.index = 0;
30676 _this.thisArg = thisArg || _this;
30677 return _this;
30678 }
30679 EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
30680 this.destination.next(everyValueMatch);
30681 this.destination.complete();
30682 };
30683 EverySubscriber.prototype._next = function (value) {
30684 var result = false;
30685 try {
30686 result = this.predicate.call(this.thisArg, value, this.index++, this.source);
30687 }
30688 catch (err) {
30689 this.destination.error(err);
30690 return;
30691 }
30692 if (!result) {
30693 this.notifyComplete(false);
30694 }
30695 };
30696 EverySubscriber.prototype._complete = function () {
30697 this.notifyComplete(true);
30698 };
30699 return EverySubscriber;
30700}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30701//# sourceMappingURL=every.js.map
30702
30703
30704/***/ }),
30705/* 299 */
30706/***/ (function(module, __webpack_exports__, __webpack_require__) {
30707
30708"use strict";
30709__webpack_require__.r(__webpack_exports__);
30710/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
30711/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30712/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30713/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
30714/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30715
30716
30717
30718function exhaust() {
30719 return function (source) { return source.lift(new SwitchFirstOperator()); };
30720}
30721var SwitchFirstOperator = /*@__PURE__*/ (function () {
30722 function SwitchFirstOperator() {
30723 }
30724 SwitchFirstOperator.prototype.call = function (subscriber, source) {
30725 return source.subscribe(new SwitchFirstSubscriber(subscriber));
30726 };
30727 return SwitchFirstOperator;
30728}());
30729var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
30730 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchFirstSubscriber, _super);
30731 function SwitchFirstSubscriber(destination) {
30732 var _this = _super.call(this, destination) || this;
30733 _this.hasCompleted = false;
30734 _this.hasSubscription = false;
30735 return _this;
30736 }
30737 SwitchFirstSubscriber.prototype._next = function (value) {
30738 if (!this.hasSubscription) {
30739 this.hasSubscription = true;
30740 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, value));
30741 }
30742 };
30743 SwitchFirstSubscriber.prototype._complete = function () {
30744 this.hasCompleted = true;
30745 if (!this.hasSubscription) {
30746 this.destination.complete();
30747 }
30748 };
30749 SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
30750 this.remove(innerSub);
30751 this.hasSubscription = false;
30752 if (this.hasCompleted) {
30753 this.destination.complete();
30754 }
30755 };
30756 return SwitchFirstSubscriber;
30757}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30758//# sourceMappingURL=exhaust.js.map
30759
30760
30761/***/ }),
30762/* 300 */
30763/***/ (function(module, __webpack_exports__, __webpack_require__) {
30764
30765"use strict";
30766__webpack_require__.r(__webpack_exports__);
30767/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
30768/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30769/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30770/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
30771/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
30772/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
30773/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
30774/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
30775
30776
30777
30778
30779
30780
30781function exhaustMap(project, resultSelector) {
30782 if (resultSelector) {
30783 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); })); })); };
30784 }
30785 return function (source) {
30786 return source.lift(new ExhaustMapOperator(project));
30787 };
30788}
30789var ExhaustMapOperator = /*@__PURE__*/ (function () {
30790 function ExhaustMapOperator(project) {
30791 this.project = project;
30792 }
30793 ExhaustMapOperator.prototype.call = function (subscriber, source) {
30794 return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
30795 };
30796 return ExhaustMapOperator;
30797}());
30798var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
30799 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExhaustMapSubscriber, _super);
30800 function ExhaustMapSubscriber(destination, project) {
30801 var _this = _super.call(this, destination) || this;
30802 _this.project = project;
30803 _this.hasSubscription = false;
30804 _this.hasCompleted = false;
30805 _this.index = 0;
30806 return _this;
30807 }
30808 ExhaustMapSubscriber.prototype._next = function (value) {
30809 if (!this.hasSubscription) {
30810 this.tryNext(value);
30811 }
30812 };
30813 ExhaustMapSubscriber.prototype.tryNext = function (value) {
30814 var result;
30815 var index = this.index++;
30816 try {
30817 result = this.project(value, index);
30818 }
30819 catch (err) {
30820 this.destination.error(err);
30821 return;
30822 }
30823 this.hasSubscription = true;
30824 this._innerSub(result, value, index);
30825 };
30826 ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) {
30827 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, value, index);
30828 var destination = this.destination;
30829 destination.add(innerSubscriber);
30830 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
30831 if (innerSubscription !== innerSubscriber) {
30832 destination.add(innerSubscription);
30833 }
30834 };
30835 ExhaustMapSubscriber.prototype._complete = function () {
30836 this.hasCompleted = true;
30837 if (!this.hasSubscription) {
30838 this.destination.complete();
30839 }
30840 this.unsubscribe();
30841 };
30842 ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30843 this.destination.next(innerValue);
30844 };
30845 ExhaustMapSubscriber.prototype.notifyError = function (err) {
30846 this.destination.error(err);
30847 };
30848 ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
30849 var destination = this.destination;
30850 destination.remove(innerSub);
30851 this.hasSubscription = false;
30852 if (this.hasCompleted) {
30853 this.destination.complete();
30854 }
30855 };
30856 return ExhaustMapSubscriber;
30857}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30858//# sourceMappingURL=exhaustMap.js.map
30859
30860
30861/***/ }),
30862/* 301 */
30863/***/ (function(module, __webpack_exports__, __webpack_require__) {
30864
30865"use strict";
30866__webpack_require__.r(__webpack_exports__);
30867/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
30868/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; });
30869/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; });
30870/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30871/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
30872/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
30873/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30874
30875
30876
30877function expand(project, concurrent, scheduler) {
30878 if (concurrent === void 0) {
30879 concurrent = Number.POSITIVE_INFINITY;
30880 }
30881 if (scheduler === void 0) {
30882 scheduler = undefined;
30883 }
30884 concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
30885 return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
30886}
30887var ExpandOperator = /*@__PURE__*/ (function () {
30888 function ExpandOperator(project, concurrent, scheduler) {
30889 this.project = project;
30890 this.concurrent = concurrent;
30891 this.scheduler = scheduler;
30892 }
30893 ExpandOperator.prototype.call = function (subscriber, source) {
30894 return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
30895 };
30896 return ExpandOperator;
30897}());
30898
30899var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
30900 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExpandSubscriber, _super);
30901 function ExpandSubscriber(destination, project, concurrent, scheduler) {
30902 var _this = _super.call(this, destination) || this;
30903 _this.project = project;
30904 _this.concurrent = concurrent;
30905 _this.scheduler = scheduler;
30906 _this.index = 0;
30907 _this.active = 0;
30908 _this.hasCompleted = false;
30909 if (concurrent < Number.POSITIVE_INFINITY) {
30910 _this.buffer = [];
30911 }
30912 return _this;
30913 }
30914 ExpandSubscriber.dispatch = function (arg) {
30915 var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
30916 subscriber.subscribeToProjection(result, value, index);
30917 };
30918 ExpandSubscriber.prototype._next = function (value) {
30919 var destination = this.destination;
30920 if (destination.closed) {
30921 this._complete();
30922 return;
30923 }
30924 var index = this.index++;
30925 if (this.active < this.concurrent) {
30926 destination.next(value);
30927 try {
30928 var project = this.project;
30929 var result = project(value, index);
30930 if (!this.scheduler) {
30931 this.subscribeToProjection(result, value, index);
30932 }
30933 else {
30934 var state = { subscriber: this, result: result, value: value, index: index };
30935 var destination_1 = this.destination;
30936 destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
30937 }
30938 }
30939 catch (e) {
30940 destination.error(e);
30941 }
30942 }
30943 else {
30944 this.buffer.push(value);
30945 }
30946 };
30947 ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
30948 this.active++;
30949 var destination = this.destination;
30950 destination.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index));
30951 };
30952 ExpandSubscriber.prototype._complete = function () {
30953 this.hasCompleted = true;
30954 if (this.hasCompleted && this.active === 0) {
30955 this.destination.complete();
30956 }
30957 this.unsubscribe();
30958 };
30959 ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30960 this._next(innerValue);
30961 };
30962 ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
30963 var buffer = this.buffer;
30964 var destination = this.destination;
30965 destination.remove(innerSub);
30966 this.active--;
30967 if (buffer && buffer.length > 0) {
30968 this._next(buffer.shift());
30969 }
30970 if (this.hasCompleted && this.active === 0) {
30971 this.destination.complete();
30972 }
30973 };
30974 return ExpandSubscriber;
30975}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30976
30977//# sourceMappingURL=expand.js.map
30978
30979
30980/***/ }),
30981/* 302 */
30982/***/ (function(module, __webpack_exports__, __webpack_require__) {
30983
30984"use strict";
30985__webpack_require__.r(__webpack_exports__);
30986/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
30987/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
30988/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
30989/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
30990/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
30991
30992
30993
30994function finalize(callback) {
30995 return function (source) { return source.lift(new FinallyOperator(callback)); };
30996}
30997var FinallyOperator = /*@__PURE__*/ (function () {
30998 function FinallyOperator(callback) {
30999 this.callback = callback;
31000 }
31001 FinallyOperator.prototype.call = function (subscriber, source) {
31002 return source.subscribe(new FinallySubscriber(subscriber, this.callback));
31003 };
31004 return FinallyOperator;
31005}());
31006var FinallySubscriber = /*@__PURE__*/ (function (_super) {
31007 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FinallySubscriber, _super);
31008 function FinallySubscriber(destination, callback) {
31009 var _this = _super.call(this, destination) || this;
31010 _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"](callback));
31011 return _this;
31012 }
31013 return FinallySubscriber;
31014}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31015//# sourceMappingURL=finalize.js.map
31016
31017
31018/***/ }),
31019/* 303 */
31020/***/ (function(module, __webpack_exports__, __webpack_require__) {
31021
31022"use strict";
31023__webpack_require__.r(__webpack_exports__);
31024/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
31025/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; });
31026/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; });
31027/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31028/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31029/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31030
31031
31032function find(predicate, thisArg) {
31033 if (typeof predicate !== 'function') {
31034 throw new TypeError('predicate is not a function');
31035 }
31036 return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
31037}
31038var FindValueOperator = /*@__PURE__*/ (function () {
31039 function FindValueOperator(predicate, source, yieldIndex, thisArg) {
31040 this.predicate = predicate;
31041 this.source = source;
31042 this.yieldIndex = yieldIndex;
31043 this.thisArg = thisArg;
31044 }
31045 FindValueOperator.prototype.call = function (observer, source) {
31046 return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
31047 };
31048 return FindValueOperator;
31049}());
31050
31051var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
31052 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FindValueSubscriber, _super);
31053 function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
31054 var _this = _super.call(this, destination) || this;
31055 _this.predicate = predicate;
31056 _this.source = source;
31057 _this.yieldIndex = yieldIndex;
31058 _this.thisArg = thisArg;
31059 _this.index = 0;
31060 return _this;
31061 }
31062 FindValueSubscriber.prototype.notifyComplete = function (value) {
31063 var destination = this.destination;
31064 destination.next(value);
31065 destination.complete();
31066 this.unsubscribe();
31067 };
31068 FindValueSubscriber.prototype._next = function (value) {
31069 var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
31070 var index = this.index++;
31071 try {
31072 var result = predicate.call(thisArg || this, value, index, this.source);
31073 if (result) {
31074 this.notifyComplete(this.yieldIndex ? index : value);
31075 }
31076 }
31077 catch (err) {
31078 this.destination.error(err);
31079 }
31080 };
31081 FindValueSubscriber.prototype._complete = function () {
31082 this.notifyComplete(this.yieldIndex ? -1 : undefined);
31083 };
31084 return FindValueSubscriber;
31085}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31086
31087//# sourceMappingURL=find.js.map
31088
31089
31090/***/ }),
31091/* 304 */
31092/***/ (function(module, __webpack_exports__, __webpack_require__) {
31093
31094"use strict";
31095__webpack_require__.r(__webpack_exports__);
31096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
31097/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(303);
31098/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
31099
31100function findIndex(predicate, thisArg) {
31101 return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); };
31102}
31103//# sourceMappingURL=findIndex.js.map
31104
31105
31106/***/ }),
31107/* 305 */
31108/***/ (function(module, __webpack_exports__, __webpack_require__) {
31109
31110"use strict";
31111__webpack_require__.r(__webpack_exports__);
31112/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; });
31113/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
31114/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
31115/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(296);
31116/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(286);
31117/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(295);
31118/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(183);
31119/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
31120
31121
31122
31123
31124
31125
31126function first(predicate, defaultValue) {
31127 var hasDefaultValue = arguments.length >= 2;
31128 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"](); })); };
31129}
31130//# sourceMappingURL=first.js.map
31131
31132
31133/***/ }),
31134/* 306 */
31135/***/ (function(module, __webpack_exports__, __webpack_require__) {
31136
31137"use strict";
31138__webpack_require__.r(__webpack_exports__);
31139/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
31140/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31141/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31142/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31143
31144
31145function ignoreElements() {
31146 return function ignoreElementsOperatorFunction(source) {
31147 return source.lift(new IgnoreElementsOperator());
31148 };
31149}
31150var IgnoreElementsOperator = /*@__PURE__*/ (function () {
31151 function IgnoreElementsOperator() {
31152 }
31153 IgnoreElementsOperator.prototype.call = function (subscriber, source) {
31154 return source.subscribe(new IgnoreElementsSubscriber(subscriber));
31155 };
31156 return IgnoreElementsOperator;
31157}());
31158var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
31159 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IgnoreElementsSubscriber, _super);
31160 function IgnoreElementsSubscriber() {
31161 return _super !== null && _super.apply(this, arguments) || this;
31162 }
31163 IgnoreElementsSubscriber.prototype._next = function (unused) {
31164 };
31165 return IgnoreElementsSubscriber;
31166}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31167//# sourceMappingURL=ignoreElements.js.map
31168
31169
31170/***/ }),
31171/* 307 */
31172/***/ (function(module, __webpack_exports__, __webpack_require__) {
31173
31174"use strict";
31175__webpack_require__.r(__webpack_exports__);
31176/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
31177/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31178/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31179/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31180
31181
31182function isEmpty() {
31183 return function (source) { return source.lift(new IsEmptyOperator()); };
31184}
31185var IsEmptyOperator = /*@__PURE__*/ (function () {
31186 function IsEmptyOperator() {
31187 }
31188 IsEmptyOperator.prototype.call = function (observer, source) {
31189 return source.subscribe(new IsEmptySubscriber(observer));
31190 };
31191 return IsEmptyOperator;
31192}());
31193var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
31194 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IsEmptySubscriber, _super);
31195 function IsEmptySubscriber(destination) {
31196 return _super.call(this, destination) || this;
31197 }
31198 IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
31199 var destination = this.destination;
31200 destination.next(isEmpty);
31201 destination.complete();
31202 };
31203 IsEmptySubscriber.prototype._next = function (value) {
31204 this.notifyComplete(false);
31205 };
31206 IsEmptySubscriber.prototype._complete = function () {
31207 this.notifyComplete(true);
31208 };
31209 return IsEmptySubscriber;
31210}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31211//# sourceMappingURL=isEmpty.js.map
31212
31213
31214/***/ }),
31215/* 308 */
31216/***/ (function(module, __webpack_exports__, __webpack_require__) {
31217
31218"use strict";
31219__webpack_require__.r(__webpack_exports__);
31220/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
31221/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
31222/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
31223/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(309);
31224/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(295);
31225/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(286);
31226/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(183);
31227/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
31228
31229
31230
31231
31232
31233
31234function last(predicate, defaultValue) {
31235 var hasDefaultValue = arguments.length >= 2;
31236 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"](); })); };
31237}
31238//# sourceMappingURL=last.js.map
31239
31240
31241/***/ }),
31242/* 309 */
31243/***/ (function(module, __webpack_exports__, __webpack_require__) {
31244
31245"use strict";
31246__webpack_require__.r(__webpack_exports__);
31247/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
31248/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31249/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31250/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
31251/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(201);
31252/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
31253
31254
31255
31256
31257function takeLast(count) {
31258 return function takeLastOperatorFunction(source) {
31259 if (count === 0) {
31260 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
31261 }
31262 else {
31263 return source.lift(new TakeLastOperator(count));
31264 }
31265 };
31266}
31267var TakeLastOperator = /*@__PURE__*/ (function () {
31268 function TakeLastOperator(total) {
31269 this.total = total;
31270 if (this.total < 0) {
31271 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
31272 }
31273 }
31274 TakeLastOperator.prototype.call = function (subscriber, source) {
31275 return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
31276 };
31277 return TakeLastOperator;
31278}());
31279var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
31280 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeLastSubscriber, _super);
31281 function TakeLastSubscriber(destination, total) {
31282 var _this = _super.call(this, destination) || this;
31283 _this.total = total;
31284 _this.ring = new Array();
31285 _this.count = 0;
31286 return _this;
31287 }
31288 TakeLastSubscriber.prototype._next = function (value) {
31289 var ring = this.ring;
31290 var total = this.total;
31291 var count = this.count++;
31292 if (ring.length < total) {
31293 ring.push(value);
31294 }
31295 else {
31296 var index = count % total;
31297 ring[index] = value;
31298 }
31299 };
31300 TakeLastSubscriber.prototype._complete = function () {
31301 var destination = this.destination;
31302 var count = this.count;
31303 if (count > 0) {
31304 var total = this.count >= this.total ? this.total : this.count;
31305 var ring = this.ring;
31306 for (var i = 0; i < total; i++) {
31307 var idx = (count++) % total;
31308 destination.next(ring[idx]);
31309 }
31310 }
31311 destination.complete();
31312 };
31313 return TakeLastSubscriber;
31314}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31315//# sourceMappingURL=takeLast.js.map
31316
31317
31318/***/ }),
31319/* 310 */
31320/***/ (function(module, __webpack_exports__, __webpack_require__) {
31321
31322"use strict";
31323__webpack_require__.r(__webpack_exports__);
31324/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
31325/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31326/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31327/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31328
31329
31330function mapTo(value) {
31331 return function (source) { return source.lift(new MapToOperator(value)); };
31332}
31333var MapToOperator = /*@__PURE__*/ (function () {
31334 function MapToOperator(value) {
31335 this.value = value;
31336 }
31337 MapToOperator.prototype.call = function (subscriber, source) {
31338 return source.subscribe(new MapToSubscriber(subscriber, this.value));
31339 };
31340 return MapToOperator;
31341}());
31342var MapToSubscriber = /*@__PURE__*/ (function (_super) {
31343 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapToSubscriber, _super);
31344 function MapToSubscriber(destination, value) {
31345 var _this = _super.call(this, destination) || this;
31346 _this.value = value;
31347 return _this;
31348 }
31349 MapToSubscriber.prototype._next = function (x) {
31350 this.destination.next(this.value);
31351 };
31352 return MapToSubscriber;
31353}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31354//# sourceMappingURL=mapTo.js.map
31355
31356
31357/***/ }),
31358/* 311 */
31359/***/ (function(module, __webpack_exports__, __webpack_require__) {
31360
31361"use strict";
31362__webpack_require__.r(__webpack_exports__);
31363/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
31364/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31365/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31366/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(200);
31367/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
31368
31369
31370
31371function materialize() {
31372 return function materializeOperatorFunction(source) {
31373 return source.lift(new MaterializeOperator());
31374 };
31375}
31376var MaterializeOperator = /*@__PURE__*/ (function () {
31377 function MaterializeOperator() {
31378 }
31379 MaterializeOperator.prototype.call = function (subscriber, source) {
31380 return source.subscribe(new MaterializeSubscriber(subscriber));
31381 };
31382 return MaterializeOperator;
31383}());
31384var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
31385 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MaterializeSubscriber, _super);
31386 function MaterializeSubscriber(destination) {
31387 return _super.call(this, destination) || this;
31388 }
31389 MaterializeSubscriber.prototype._next = function (value) {
31390 this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
31391 };
31392 MaterializeSubscriber.prototype._error = function (err) {
31393 var destination = this.destination;
31394 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
31395 destination.complete();
31396 };
31397 MaterializeSubscriber.prototype._complete = function () {
31398 var destination = this.destination;
31399 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
31400 destination.complete();
31401 };
31402 return MaterializeSubscriber;
31403}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31404//# sourceMappingURL=materialize.js.map
31405
31406
31407/***/ }),
31408/* 312 */
31409/***/ (function(module, __webpack_exports__, __webpack_require__) {
31410
31411"use strict";
31412__webpack_require__.r(__webpack_exports__);
31413/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
31414/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(313);
31415/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
31416
31417function max(comparer) {
31418 var max = (typeof comparer === 'function')
31419 ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
31420 : function (x, y) { return x > y ? x : y; };
31421 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
31422}
31423//# sourceMappingURL=max.js.map
31424
31425
31426/***/ }),
31427/* 313 */
31428/***/ (function(module, __webpack_exports__, __webpack_require__) {
31429
31430"use strict";
31431__webpack_require__.r(__webpack_exports__);
31432/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
31433/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(314);
31434/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(309);
31435/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(286);
31436/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
31437/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
31438
31439
31440
31441
31442function reduce(accumulator, seed) {
31443 if (arguments.length >= 2) {
31444 return function reduceOperatorFunctionWithSeed(source) {
31445 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);
31446 };
31447 }
31448 return function reduceOperatorFunction(source) {
31449 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);
31450 };
31451}
31452//# sourceMappingURL=reduce.js.map
31453
31454
31455/***/ }),
31456/* 314 */
31457/***/ (function(module, __webpack_exports__, __webpack_require__) {
31458
31459"use strict";
31460__webpack_require__.r(__webpack_exports__);
31461/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
31462/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31463/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31464/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31465
31466
31467function scan(accumulator, seed) {
31468 var hasSeed = false;
31469 if (arguments.length >= 2) {
31470 hasSeed = true;
31471 }
31472 return function scanOperatorFunction(source) {
31473 return source.lift(new ScanOperator(accumulator, seed, hasSeed));
31474 };
31475}
31476var ScanOperator = /*@__PURE__*/ (function () {
31477 function ScanOperator(accumulator, seed, hasSeed) {
31478 if (hasSeed === void 0) {
31479 hasSeed = false;
31480 }
31481 this.accumulator = accumulator;
31482 this.seed = seed;
31483 this.hasSeed = hasSeed;
31484 }
31485 ScanOperator.prototype.call = function (subscriber, source) {
31486 return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
31487 };
31488 return ScanOperator;
31489}());
31490var ScanSubscriber = /*@__PURE__*/ (function (_super) {
31491 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ScanSubscriber, _super);
31492 function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
31493 var _this = _super.call(this, destination) || this;
31494 _this.accumulator = accumulator;
31495 _this._seed = _seed;
31496 _this.hasSeed = hasSeed;
31497 _this.index = 0;
31498 return _this;
31499 }
31500 Object.defineProperty(ScanSubscriber.prototype, "seed", {
31501 get: function () {
31502 return this._seed;
31503 },
31504 set: function (value) {
31505 this.hasSeed = true;
31506 this._seed = value;
31507 },
31508 enumerable: true,
31509 configurable: true
31510 });
31511 ScanSubscriber.prototype._next = function (value) {
31512 if (!this.hasSeed) {
31513 this.seed = value;
31514 this.destination.next(value);
31515 }
31516 else {
31517 return this._tryNext(value);
31518 }
31519 };
31520 ScanSubscriber.prototype._tryNext = function (value) {
31521 var index = this.index++;
31522 var result;
31523 try {
31524 result = this.accumulator(this.seed, value, index);
31525 }
31526 catch (err) {
31527 this.destination.error(err);
31528 }
31529 this.seed = result;
31530 this.destination.next(result);
31531 };
31532 return ScanSubscriber;
31533}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31534//# sourceMappingURL=scan.js.map
31535
31536
31537/***/ }),
31538/* 315 */
31539/***/ (function(module, __webpack_exports__, __webpack_require__) {
31540
31541"use strict";
31542__webpack_require__.r(__webpack_exports__);
31543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
31544/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(256);
31545/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
31546
31547function merge() {
31548 var observables = [];
31549 for (var _i = 0; _i < arguments.length; _i++) {
31550 observables[_i] = arguments[_i];
31551 }
31552 return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
31553}
31554//# sourceMappingURL=merge.js.map
31555
31556
31557/***/ }),
31558/* 316 */
31559/***/ (function(module, __webpack_exports__, __webpack_require__) {
31560
31561"use strict";
31562__webpack_require__.r(__webpack_exports__);
31563/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
31564/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(240);
31565/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
31566
31567function mergeMapTo(innerObservable, resultSelector, concurrent) {
31568 if (concurrent === void 0) {
31569 concurrent = Number.POSITIVE_INFINITY;
31570 }
31571 if (typeof resultSelector === 'function') {
31572 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, resultSelector, concurrent);
31573 }
31574 if (typeof resultSelector === 'number') {
31575 concurrent = resultSelector;
31576 }
31577 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, concurrent);
31578}
31579//# sourceMappingURL=mergeMapTo.js.map
31580
31581
31582/***/ }),
31583/* 317 */
31584/***/ (function(module, __webpack_exports__, __webpack_require__) {
31585
31586"use strict";
31587__webpack_require__.r(__webpack_exports__);
31588/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
31589/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; });
31590/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; });
31591/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31592/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
31593/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
31594/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(229);
31595/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber PURE_IMPORTS_END */
31596
31597
31598
31599
31600function mergeScan(accumulator, seed, concurrent) {
31601 if (concurrent === void 0) {
31602 concurrent = Number.POSITIVE_INFINITY;
31603 }
31604 return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
31605}
31606var MergeScanOperator = /*@__PURE__*/ (function () {
31607 function MergeScanOperator(accumulator, seed, concurrent) {
31608 this.accumulator = accumulator;
31609 this.seed = seed;
31610 this.concurrent = concurrent;
31611 }
31612 MergeScanOperator.prototype.call = function (subscriber, source) {
31613 return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
31614 };
31615 return MergeScanOperator;
31616}());
31617
31618var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
31619 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeScanSubscriber, _super);
31620 function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
31621 var _this = _super.call(this, destination) || this;
31622 _this.accumulator = accumulator;
31623 _this.acc = acc;
31624 _this.concurrent = concurrent;
31625 _this.hasValue = false;
31626 _this.hasCompleted = false;
31627 _this.buffer = [];
31628 _this.active = 0;
31629 _this.index = 0;
31630 return _this;
31631 }
31632 MergeScanSubscriber.prototype._next = function (value) {
31633 if (this.active < this.concurrent) {
31634 var index = this.index++;
31635 var destination = this.destination;
31636 var ish = void 0;
31637 try {
31638 var accumulator = this.accumulator;
31639 ish = accumulator(this.acc, value, index);
31640 }
31641 catch (e) {
31642 return destination.error(e);
31643 }
31644 this.active++;
31645 this._innerSub(ish, value, index);
31646 }
31647 else {
31648 this.buffer.push(value);
31649 }
31650 };
31651 MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
31652 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, value, index);
31653 var destination = this.destination;
31654 destination.add(innerSubscriber);
31655 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, undefined, undefined, innerSubscriber);
31656 if (innerSubscription !== innerSubscriber) {
31657 destination.add(innerSubscription);
31658 }
31659 };
31660 MergeScanSubscriber.prototype._complete = function () {
31661 this.hasCompleted = true;
31662 if (this.active === 0 && this.buffer.length === 0) {
31663 if (this.hasValue === false) {
31664 this.destination.next(this.acc);
31665 }
31666 this.destination.complete();
31667 }
31668 this.unsubscribe();
31669 };
31670 MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31671 var destination = this.destination;
31672 this.acc = innerValue;
31673 this.hasValue = true;
31674 destination.next(innerValue);
31675 };
31676 MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
31677 var buffer = this.buffer;
31678 var destination = this.destination;
31679 destination.remove(innerSub);
31680 this.active--;
31681 if (buffer.length > 0) {
31682 this._next(buffer.shift());
31683 }
31684 else if (this.active === 0 && this.hasCompleted) {
31685 if (this.hasValue === false) {
31686 this.destination.next(this.acc);
31687 }
31688 this.destination.complete();
31689 }
31690 };
31691 return MergeScanSubscriber;
31692}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
31693
31694//# sourceMappingURL=mergeScan.js.map
31695
31696
31697/***/ }),
31698/* 318 */
31699/***/ (function(module, __webpack_exports__, __webpack_require__) {
31700
31701"use strict";
31702__webpack_require__.r(__webpack_exports__);
31703/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
31704/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(313);
31705/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
31706
31707function min(comparer) {
31708 var min = (typeof comparer === 'function')
31709 ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
31710 : function (x, y) { return x < y ? x : y; };
31711 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min);
31712}
31713//# sourceMappingURL=min.js.map
31714
31715
31716/***/ }),
31717/* 319 */
31718/***/ (function(module, __webpack_exports__, __webpack_require__) {
31719
31720"use strict";
31721__webpack_require__.r(__webpack_exports__);
31722/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
31723/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; });
31724/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(184);
31725/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
31726
31727function multicast(subjectOrSubjectFactory, selector) {
31728 return function multicastOperatorFunction(source) {
31729 var subjectFactory;
31730 if (typeof subjectOrSubjectFactory === 'function') {
31731 subjectFactory = subjectOrSubjectFactory;
31732 }
31733 else {
31734 subjectFactory = function subjectFactory() {
31735 return subjectOrSubjectFactory;
31736 };
31737 }
31738 if (typeof selector === 'function') {
31739 return source.lift(new MulticastOperator(subjectFactory, selector));
31740 }
31741 var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
31742 connectable.source = source;
31743 connectable.subjectFactory = subjectFactory;
31744 return connectable;
31745 };
31746}
31747var MulticastOperator = /*@__PURE__*/ (function () {
31748 function MulticastOperator(subjectFactory, selector) {
31749 this.subjectFactory = subjectFactory;
31750 this.selector = selector;
31751 }
31752 MulticastOperator.prototype.call = function (subscriber, source) {
31753 var selector = this.selector;
31754 var subject = this.subjectFactory();
31755 var subscription = selector(subject).subscribe(subscriber);
31756 subscription.add(source.subscribe(subject));
31757 return subscription;
31758 };
31759 return MulticastOperator;
31760}());
31761
31762//# sourceMappingURL=multicast.js.map
31763
31764
31765/***/ }),
31766/* 320 */
31767/***/ (function(module, __webpack_exports__, __webpack_require__) {
31768
31769"use strict";
31770__webpack_require__.r(__webpack_exports__);
31771/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
31772/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; });
31773/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31774/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241);
31775/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(176);
31776/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
31777/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(229);
31778/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(228);
31779/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31780
31781
31782
31783
31784
31785
31786function onErrorResumeNext() {
31787 var nextSources = [];
31788 for (var _i = 0; _i < arguments.length; _i++) {
31789 nextSources[_i] = arguments[_i];
31790 }
31791 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
31792 nextSources = nextSources[0];
31793 }
31794 return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
31795}
31796function onErrorResumeNextStatic() {
31797 var nextSources = [];
31798 for (var _i = 0; _i < arguments.length; _i++) {
31799 nextSources[_i] = arguments[_i];
31800 }
31801 var source = null;
31802 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
31803 nextSources = nextSources[0];
31804 }
31805 source = nextSources.shift();
31806 return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
31807}
31808var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
31809 function OnErrorResumeNextOperator(nextSources) {
31810 this.nextSources = nextSources;
31811 }
31812 OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
31813 return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
31814 };
31815 return OnErrorResumeNextOperator;
31816}());
31817var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
31818 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OnErrorResumeNextSubscriber, _super);
31819 function OnErrorResumeNextSubscriber(destination, nextSources) {
31820 var _this = _super.call(this, destination) || this;
31821 _this.destination = destination;
31822 _this.nextSources = nextSources;
31823 return _this;
31824 }
31825 OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
31826 this.subscribeToNextSource();
31827 };
31828 OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
31829 this.subscribeToNextSource();
31830 };
31831 OnErrorResumeNextSubscriber.prototype._error = function (err) {
31832 this.subscribeToNextSource();
31833 this.unsubscribe();
31834 };
31835 OnErrorResumeNextSubscriber.prototype._complete = function () {
31836 this.subscribeToNextSource();
31837 this.unsubscribe();
31838 };
31839 OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
31840 var next = this.nextSources.shift();
31841 if (!!next) {
31842 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__["InnerSubscriber"](this, undefined, undefined);
31843 var destination = this.destination;
31844 destination.add(innerSubscriber);
31845 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, next, undefined, undefined, innerSubscriber);
31846 if (innerSubscription !== innerSubscriber) {
31847 destination.add(innerSubscription);
31848 }
31849 }
31850 else {
31851 this.destination.complete();
31852 }
31853 };
31854 return OnErrorResumeNextSubscriber;
31855}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
31856//# sourceMappingURL=onErrorResumeNext.js.map
31857
31858
31859/***/ }),
31860/* 321 */
31861/***/ (function(module, __webpack_exports__, __webpack_require__) {
31862
31863"use strict";
31864__webpack_require__.r(__webpack_exports__);
31865/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
31866/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
31867/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
31868/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31869
31870
31871function pairwise() {
31872 return function (source) { return source.lift(new PairwiseOperator()); };
31873}
31874var PairwiseOperator = /*@__PURE__*/ (function () {
31875 function PairwiseOperator() {
31876 }
31877 PairwiseOperator.prototype.call = function (subscriber, source) {
31878 return source.subscribe(new PairwiseSubscriber(subscriber));
31879 };
31880 return PairwiseOperator;
31881}());
31882var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
31883 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](PairwiseSubscriber, _super);
31884 function PairwiseSubscriber(destination) {
31885 var _this = _super.call(this, destination) || this;
31886 _this.hasPrev = false;
31887 return _this;
31888 }
31889 PairwiseSubscriber.prototype._next = function (value) {
31890 var pair;
31891 if (this.hasPrev) {
31892 pair = [this.prev, value];
31893 }
31894 else {
31895 this.hasPrev = true;
31896 }
31897 this.prev = value;
31898 if (pair) {
31899 this.destination.next(pair);
31900 }
31901 };
31902 return PairwiseSubscriber;
31903}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
31904//# sourceMappingURL=pairwise.js.map
31905
31906
31907/***/ }),
31908/* 322 */
31909/***/ (function(module, __webpack_exports__, __webpack_require__) {
31910
31911"use strict";
31912__webpack_require__.r(__webpack_exports__);
31913/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
31914/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(261);
31915/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
31916/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
31917
31918
31919function partition(predicate, thisArg) {
31920 return function (source) {
31921 return [
31922 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source),
31923 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source)
31924 ];
31925 };
31926}
31927//# sourceMappingURL=partition.js.map
31928
31929
31930/***/ }),
31931/* 323 */
31932/***/ (function(module, __webpack_exports__, __webpack_require__) {
31933
31934"use strict";
31935__webpack_require__.r(__webpack_exports__);
31936/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
31937/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(224);
31938/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
31939
31940function pluck() {
31941 var properties = [];
31942 for (var _i = 0; _i < arguments.length; _i++) {
31943 properties[_i] = arguments[_i];
31944 }
31945 var length = properties.length;
31946 if (length === 0) {
31947 throw new Error('list of properties cannot be empty.');
31948 }
31949 return function (source) { return Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); };
31950}
31951function plucker(props, length) {
31952 var mapper = function (x) {
31953 var currentProp = x;
31954 for (var i = 0; i < length; i++) {
31955 var p = currentProp[props[i]];
31956 if (typeof p !== 'undefined') {
31957 currentProp = p;
31958 }
31959 else {
31960 return undefined;
31961 }
31962 }
31963 return currentProp;
31964 };
31965 return mapper;
31966}
31967//# sourceMappingURL=pluck.js.map
31968
31969
31970/***/ }),
31971/* 324 */
31972/***/ (function(module, __webpack_exports__, __webpack_require__) {
31973
31974"use strict";
31975__webpack_require__.r(__webpack_exports__);
31976/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
31977/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(185);
31978/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
31979/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
31980
31981
31982function publish(selector) {
31983 return selector ?
31984 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); }, selector) :
31985 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]());
31986}
31987//# sourceMappingURL=publish.js.map
31988
31989
31990/***/ }),
31991/* 325 */
31992/***/ (function(module, __webpack_exports__, __webpack_require__) {
31993
31994"use strict";
31995__webpack_require__.r(__webpack_exports__);
31996/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
31997/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
31998/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
31999/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
32000
32001
32002function publishBehavior(value) {
32003 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); };
32004}
32005//# sourceMappingURL=publishBehavior.js.map
32006
32007
32008/***/ }),
32009/* 326 */
32010/***/ (function(module, __webpack_exports__, __webpack_require__) {
32011
32012"use strict";
32013__webpack_require__.r(__webpack_exports__);
32014/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
32015/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(208);
32016/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
32017/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
32018
32019
32020function publishLast() {
32021 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); };
32022}
32023//# sourceMappingURL=publishLast.js.map
32024
32025
32026/***/ }),
32027/* 327 */
32028/***/ (function(module, __webpack_exports__, __webpack_require__) {
32029
32030"use strict";
32031__webpack_require__.r(__webpack_exports__);
32032/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
32033/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(191);
32034/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(319);
32035/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
32036
32037
32038function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
32039 if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
32040 scheduler = selectorOrScheduler;
32041 }
32042 var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
32043 var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
32044 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return subject; }, selector)(source); };
32045}
32046//# sourceMappingURL=publishReplay.js.map
32047
32048
32049/***/ }),
32050/* 328 */
32051/***/ (function(module, __webpack_exports__, __webpack_require__) {
32052
32053"use strict";
32054__webpack_require__.r(__webpack_exports__);
32055/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
32056/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176);
32057/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(263);
32058/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
32059
32060
32061function race() {
32062 var observables = [];
32063 for (var _i = 0; _i < arguments.length; _i++) {
32064 observables[_i] = arguments[_i];
32065 }
32066 return function raceOperatorFunction(source) {
32067 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
32068 observables = observables[0];
32069 }
32070 return source.lift.call(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"].apply(void 0, [source].concat(observables)));
32071 };
32072}
32073//# sourceMappingURL=race.js.map
32074
32075
32076/***/ }),
32077/* 329 */
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__, "repeat", function() { return repeat; });
32083/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32084/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32085/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
32086/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
32087
32088
32089
32090function repeat(count) {
32091 if (count === void 0) {
32092 count = -1;
32093 }
32094 return function (source) {
32095 if (count === 0) {
32096 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
32097 }
32098 else if (count < 0) {
32099 return source.lift(new RepeatOperator(-1, source));
32100 }
32101 else {
32102 return source.lift(new RepeatOperator(count - 1, source));
32103 }
32104 };
32105}
32106var RepeatOperator = /*@__PURE__*/ (function () {
32107 function RepeatOperator(count, source) {
32108 this.count = count;
32109 this.source = source;
32110 }
32111 RepeatOperator.prototype.call = function (subscriber, source) {
32112 return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
32113 };
32114 return RepeatOperator;
32115}());
32116var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
32117 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatSubscriber, _super);
32118 function RepeatSubscriber(destination, count, source) {
32119 var _this = _super.call(this, destination) || this;
32120 _this.count = count;
32121 _this.source = source;
32122 return _this;
32123 }
32124 RepeatSubscriber.prototype.complete = function () {
32125 if (!this.isStopped) {
32126 var _a = this, source = _a.source, count = _a.count;
32127 if (count === 0) {
32128 return _super.prototype.complete.call(this);
32129 }
32130 else if (count > -1) {
32131 this.count = count - 1;
32132 }
32133 source.subscribe(this._unsubscribeAndRecycle());
32134 }
32135 };
32136 return RepeatSubscriber;
32137}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32138//# sourceMappingURL=repeat.js.map
32139
32140
32141/***/ }),
32142/* 330 */
32143/***/ (function(module, __webpack_exports__, __webpack_require__) {
32144
32145"use strict";
32146__webpack_require__.r(__webpack_exports__);
32147/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
32148/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32149/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
32150/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
32151/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
32152/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32153
32154
32155
32156
32157function repeatWhen(notifier) {
32158 return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
32159}
32160var RepeatWhenOperator = /*@__PURE__*/ (function () {
32161 function RepeatWhenOperator(notifier) {
32162 this.notifier = notifier;
32163 }
32164 RepeatWhenOperator.prototype.call = function (subscriber, source) {
32165 return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
32166 };
32167 return RepeatWhenOperator;
32168}());
32169var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
32170 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatWhenSubscriber, _super);
32171 function RepeatWhenSubscriber(destination, notifier, source) {
32172 var _this = _super.call(this, destination) || this;
32173 _this.notifier = notifier;
32174 _this.source = source;
32175 _this.sourceIsBeingSubscribedTo = true;
32176 return _this;
32177 }
32178 RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32179 this.sourceIsBeingSubscribedTo = true;
32180 this.source.subscribe(this);
32181 };
32182 RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
32183 if (this.sourceIsBeingSubscribedTo === false) {
32184 return _super.prototype.complete.call(this);
32185 }
32186 };
32187 RepeatWhenSubscriber.prototype.complete = function () {
32188 this.sourceIsBeingSubscribedTo = false;
32189 if (!this.isStopped) {
32190 if (!this.retries) {
32191 this.subscribeToRetries();
32192 }
32193 if (!this.retriesSubscription || this.retriesSubscription.closed) {
32194 return _super.prototype.complete.call(this);
32195 }
32196 this._unsubscribeAndRecycle();
32197 this.notifications.next();
32198 }
32199 };
32200 RepeatWhenSubscriber.prototype._unsubscribe = function () {
32201 var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
32202 if (notifications) {
32203 notifications.unsubscribe();
32204 this.notifications = null;
32205 }
32206 if (retriesSubscription) {
32207 retriesSubscription.unsubscribe();
32208 this.retriesSubscription = null;
32209 }
32210 this.retries = null;
32211 };
32212 RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
32213 var _unsubscribe = this._unsubscribe;
32214 this._unsubscribe = null;
32215 _super.prototype._unsubscribeAndRecycle.call(this);
32216 this._unsubscribe = _unsubscribe;
32217 return this;
32218 };
32219 RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
32220 this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
32221 var retries;
32222 try {
32223 var notifier = this.notifier;
32224 retries = notifier(this.notifications);
32225 }
32226 catch (e) {
32227 return _super.prototype.complete.call(this);
32228 }
32229 this.retries = retries;
32230 this.retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
32231 };
32232 return RepeatWhenSubscriber;
32233}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
32234//# sourceMappingURL=repeatWhen.js.map
32235
32236
32237/***/ }),
32238/* 331 */
32239/***/ (function(module, __webpack_exports__, __webpack_require__) {
32240
32241"use strict";
32242__webpack_require__.r(__webpack_exports__);
32243/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
32244/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32245/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32246/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32247
32248
32249function retry(count) {
32250 if (count === void 0) {
32251 count = -1;
32252 }
32253 return function (source) { return source.lift(new RetryOperator(count, source)); };
32254}
32255var RetryOperator = /*@__PURE__*/ (function () {
32256 function RetryOperator(count, source) {
32257 this.count = count;
32258 this.source = source;
32259 }
32260 RetryOperator.prototype.call = function (subscriber, source) {
32261 return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
32262 };
32263 return RetryOperator;
32264}());
32265var RetrySubscriber = /*@__PURE__*/ (function (_super) {
32266 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetrySubscriber, _super);
32267 function RetrySubscriber(destination, count, source) {
32268 var _this = _super.call(this, destination) || this;
32269 _this.count = count;
32270 _this.source = source;
32271 return _this;
32272 }
32273 RetrySubscriber.prototype.error = function (err) {
32274 if (!this.isStopped) {
32275 var _a = this, source = _a.source, count = _a.count;
32276 if (count === 0) {
32277 return _super.prototype.error.call(this, err);
32278 }
32279 else if (count > -1) {
32280 this.count = count - 1;
32281 }
32282 source.subscribe(this._unsubscribeAndRecycle());
32283 }
32284 };
32285 return RetrySubscriber;
32286}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32287//# sourceMappingURL=retry.js.map
32288
32289
32290/***/ }),
32291/* 332 */
32292/***/ (function(module, __webpack_exports__, __webpack_require__) {
32293
32294"use strict";
32295__webpack_require__.r(__webpack_exports__);
32296/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
32297/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32298/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
32299/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
32300/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
32301/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32302
32303
32304
32305
32306function retryWhen(notifier) {
32307 return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
32308}
32309var RetryWhenOperator = /*@__PURE__*/ (function () {
32310 function RetryWhenOperator(notifier, source) {
32311 this.notifier = notifier;
32312 this.source = source;
32313 }
32314 RetryWhenOperator.prototype.call = function (subscriber, source) {
32315 return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
32316 };
32317 return RetryWhenOperator;
32318}());
32319var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
32320 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetryWhenSubscriber, _super);
32321 function RetryWhenSubscriber(destination, notifier, source) {
32322 var _this = _super.call(this, destination) || this;
32323 _this.notifier = notifier;
32324 _this.source = source;
32325 return _this;
32326 }
32327 RetryWhenSubscriber.prototype.error = function (err) {
32328 if (!this.isStopped) {
32329 var errors = this.errors;
32330 var retries = this.retries;
32331 var retriesSubscription = this.retriesSubscription;
32332 if (!retries) {
32333 errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
32334 try {
32335 var notifier = this.notifier;
32336 retries = notifier(errors);
32337 }
32338 catch (e) {
32339 return _super.prototype.error.call(this, e);
32340 }
32341 retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
32342 }
32343 else {
32344 this.errors = null;
32345 this.retriesSubscription = null;
32346 }
32347 this._unsubscribeAndRecycle();
32348 this.errors = errors;
32349 this.retries = retries;
32350 this.retriesSubscription = retriesSubscription;
32351 errors.next(err);
32352 }
32353 };
32354 RetryWhenSubscriber.prototype._unsubscribe = function () {
32355 var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
32356 if (errors) {
32357 errors.unsubscribe();
32358 this.errors = null;
32359 }
32360 if (retriesSubscription) {
32361 retriesSubscription.unsubscribe();
32362 this.retriesSubscription = null;
32363 }
32364 this.retries = null;
32365 };
32366 RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32367 var _unsubscribe = this._unsubscribe;
32368 this._unsubscribe = null;
32369 this._unsubscribeAndRecycle();
32370 this._unsubscribe = _unsubscribe;
32371 this.source.subscribe(this);
32372 };
32373 return RetryWhenSubscriber;
32374}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
32375//# sourceMappingURL=retryWhen.js.map
32376
32377
32378/***/ }),
32379/* 333 */
32380/***/ (function(module, __webpack_exports__, __webpack_require__) {
32381
32382"use strict";
32383__webpack_require__.r(__webpack_exports__);
32384/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
32385/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32386/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
32387/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
32388/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32389
32390
32391
32392function sample(notifier) {
32393 return function (source) { return source.lift(new SampleOperator(notifier)); };
32394}
32395var SampleOperator = /*@__PURE__*/ (function () {
32396 function SampleOperator(notifier) {
32397 this.notifier = notifier;
32398 }
32399 SampleOperator.prototype.call = function (subscriber, source) {
32400 var sampleSubscriber = new SampleSubscriber(subscriber);
32401 var subscription = source.subscribe(sampleSubscriber);
32402 subscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(sampleSubscriber, this.notifier));
32403 return subscription;
32404 };
32405 return SampleOperator;
32406}());
32407var SampleSubscriber = /*@__PURE__*/ (function (_super) {
32408 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleSubscriber, _super);
32409 function SampleSubscriber() {
32410 var _this = _super !== null && _super.apply(this, arguments) || this;
32411 _this.hasValue = false;
32412 return _this;
32413 }
32414 SampleSubscriber.prototype._next = function (value) {
32415 this.value = value;
32416 this.hasValue = true;
32417 };
32418 SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32419 this.emitValue();
32420 };
32421 SampleSubscriber.prototype.notifyComplete = function () {
32422 this.emitValue();
32423 };
32424 SampleSubscriber.prototype.emitValue = function () {
32425 if (this.hasValue) {
32426 this.hasValue = false;
32427 this.destination.next(this.value);
32428 }
32429 };
32430 return SampleSubscriber;
32431}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
32432//# sourceMappingURL=sample.js.map
32433
32434
32435/***/ }),
32436/* 334 */
32437/***/ (function(module, __webpack_exports__, __webpack_require__) {
32438
32439"use strict";
32440__webpack_require__.r(__webpack_exports__);
32441/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
32442/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32443/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32444/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
32445/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
32446
32447
32448
32449function sampleTime(period, scheduler) {
32450 if (scheduler === void 0) {
32451 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
32452 }
32453 return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
32454}
32455var SampleTimeOperator = /*@__PURE__*/ (function () {
32456 function SampleTimeOperator(period, scheduler) {
32457 this.period = period;
32458 this.scheduler = scheduler;
32459 }
32460 SampleTimeOperator.prototype.call = function (subscriber, source) {
32461 return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
32462 };
32463 return SampleTimeOperator;
32464}());
32465var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
32466 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleTimeSubscriber, _super);
32467 function SampleTimeSubscriber(destination, period, scheduler) {
32468 var _this = _super.call(this, destination) || this;
32469 _this.period = period;
32470 _this.scheduler = scheduler;
32471 _this.hasValue = false;
32472 _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
32473 return _this;
32474 }
32475 SampleTimeSubscriber.prototype._next = function (value) {
32476 this.lastValue = value;
32477 this.hasValue = true;
32478 };
32479 SampleTimeSubscriber.prototype.notifyNext = function () {
32480 if (this.hasValue) {
32481 this.hasValue = false;
32482 this.destination.next(this.lastValue);
32483 }
32484 };
32485 return SampleTimeSubscriber;
32486}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32487function dispatchNotification(state) {
32488 var subscriber = state.subscriber, period = state.period;
32489 subscriber.notifyNext();
32490 this.schedule(state, period);
32491}
32492//# sourceMappingURL=sampleTime.js.map
32493
32494
32495/***/ }),
32496/* 335 */
32497/***/ (function(module, __webpack_exports__, __webpack_require__) {
32498
32499"use strict";
32500__webpack_require__.r(__webpack_exports__);
32501/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
32502/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; });
32503/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; });
32504/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32505/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32506/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32507
32508
32509function sequenceEqual(compareTo, comparator) {
32510 return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };
32511}
32512var SequenceEqualOperator = /*@__PURE__*/ (function () {
32513 function SequenceEqualOperator(compareTo, comparator) {
32514 this.compareTo = compareTo;
32515 this.comparator = comparator;
32516 }
32517 SequenceEqualOperator.prototype.call = function (subscriber, source) {
32518 return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
32519 };
32520 return SequenceEqualOperator;
32521}());
32522
32523var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
32524 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualSubscriber, _super);
32525 function SequenceEqualSubscriber(destination, compareTo, comparator) {
32526 var _this = _super.call(this, destination) || this;
32527 _this.compareTo = compareTo;
32528 _this.comparator = comparator;
32529 _this._a = [];
32530 _this._b = [];
32531 _this._oneComplete = false;
32532 _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
32533 return _this;
32534 }
32535 SequenceEqualSubscriber.prototype._next = function (value) {
32536 if (this._oneComplete && this._b.length === 0) {
32537 this.emit(false);
32538 }
32539 else {
32540 this._a.push(value);
32541 this.checkValues();
32542 }
32543 };
32544 SequenceEqualSubscriber.prototype._complete = function () {
32545 if (this._oneComplete) {
32546 this.emit(this._a.length === 0 && this._b.length === 0);
32547 }
32548 else {
32549 this._oneComplete = true;
32550 }
32551 this.unsubscribe();
32552 };
32553 SequenceEqualSubscriber.prototype.checkValues = function () {
32554 var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;
32555 while (_a.length > 0 && _b.length > 0) {
32556 var a = _a.shift();
32557 var b = _b.shift();
32558 var areEqual = false;
32559 try {
32560 areEqual = comparator ? comparator(a, b) : a === b;
32561 }
32562 catch (e) {
32563 this.destination.error(e);
32564 }
32565 if (!areEqual) {
32566 this.emit(false);
32567 }
32568 }
32569 };
32570 SequenceEqualSubscriber.prototype.emit = function (value) {
32571 var destination = this.destination;
32572 destination.next(value);
32573 destination.complete();
32574 };
32575 SequenceEqualSubscriber.prototype.nextB = function (value) {
32576 if (this._oneComplete && this._a.length === 0) {
32577 this.emit(false);
32578 }
32579 else {
32580 this._b.push(value);
32581 this.checkValues();
32582 }
32583 };
32584 SequenceEqualSubscriber.prototype.completeB = function () {
32585 if (this._oneComplete) {
32586 this.emit(this._a.length === 0 && this._b.length === 0);
32587 }
32588 else {
32589 this._oneComplete = true;
32590 }
32591 };
32592 return SequenceEqualSubscriber;
32593}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32594
32595var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
32596 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualCompareToSubscriber, _super);
32597 function SequenceEqualCompareToSubscriber(destination, parent) {
32598 var _this = _super.call(this, destination) || this;
32599 _this.parent = parent;
32600 return _this;
32601 }
32602 SequenceEqualCompareToSubscriber.prototype._next = function (value) {
32603 this.parent.nextB(value);
32604 };
32605 SequenceEqualCompareToSubscriber.prototype._error = function (err) {
32606 this.parent.error(err);
32607 this.unsubscribe();
32608 };
32609 SequenceEqualCompareToSubscriber.prototype._complete = function () {
32610 this.parent.completeB();
32611 this.unsubscribe();
32612 };
32613 return SequenceEqualCompareToSubscriber;
32614}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32615//# sourceMappingURL=sequenceEqual.js.map
32616
32617
32618/***/ }),
32619/* 336 */
32620/***/ (function(module, __webpack_exports__, __webpack_require__) {
32621
32622"use strict";
32623__webpack_require__.r(__webpack_exports__);
32624/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; });
32625/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
32626/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(188);
32627/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
32628/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
32629
32630
32631
32632function shareSubjectFactory() {
32633 return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
32634}
32635function share() {
32636 return function (source) { return Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); };
32637}
32638//# sourceMappingURL=share.js.map
32639
32640
32641/***/ }),
32642/* 337 */
32643/***/ (function(module, __webpack_exports__, __webpack_require__) {
32644
32645"use strict";
32646__webpack_require__.r(__webpack_exports__);
32647/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
32648/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(191);
32649/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
32650
32651function shareReplay(configOrBufferSize, windowTime, scheduler) {
32652 var config;
32653 if (configOrBufferSize && typeof configOrBufferSize === 'object') {
32654 config = configOrBufferSize;
32655 }
32656 else {
32657 config = {
32658 bufferSize: configOrBufferSize,
32659 windowTime: windowTime,
32660 refCount: false,
32661 scheduler: scheduler
32662 };
32663 }
32664 return function (source) { return source.lift(shareReplayOperator(config)); };
32665}
32666function shareReplayOperator(_a) {
32667 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;
32668 var subject;
32669 var refCount = 0;
32670 var subscription;
32671 var hasError = false;
32672 var isComplete = false;
32673 return function shareReplayOperation(source) {
32674 refCount++;
32675 if (!subject || hasError) {
32676 hasError = false;
32677 subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
32678 subscription = source.subscribe({
32679 next: function (value) { subject.next(value); },
32680 error: function (err) {
32681 hasError = true;
32682 subject.error(err);
32683 },
32684 complete: function () {
32685 isComplete = true;
32686 subscription = undefined;
32687 subject.complete();
32688 },
32689 });
32690 }
32691 var innerSub = subject.subscribe(this);
32692 this.add(function () {
32693 refCount--;
32694 innerSub.unsubscribe();
32695 if (subscription && !isComplete && useRefCount && refCount === 0) {
32696 subscription.unsubscribe();
32697 subscription = undefined;
32698 subject = undefined;
32699 }
32700 });
32701 };
32702}
32703//# sourceMappingURL=shareReplay.js.map
32704
32705
32706/***/ }),
32707/* 338 */
32708/***/ (function(module, __webpack_exports__, __webpack_require__) {
32709
32710"use strict";
32711__webpack_require__.r(__webpack_exports__);
32712/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; });
32713/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32714/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32715/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(221);
32716/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
32717
32718
32719
32720function single(predicate) {
32721 return function (source) { return source.lift(new SingleOperator(predicate, source)); };
32722}
32723var SingleOperator = /*@__PURE__*/ (function () {
32724 function SingleOperator(predicate, source) {
32725 this.predicate = predicate;
32726 this.source = source;
32727 }
32728 SingleOperator.prototype.call = function (subscriber, source) {
32729 return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
32730 };
32731 return SingleOperator;
32732}());
32733var SingleSubscriber = /*@__PURE__*/ (function (_super) {
32734 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SingleSubscriber, _super);
32735 function SingleSubscriber(destination, predicate, source) {
32736 var _this = _super.call(this, destination) || this;
32737 _this.predicate = predicate;
32738 _this.source = source;
32739 _this.seenValue = false;
32740 _this.index = 0;
32741 return _this;
32742 }
32743 SingleSubscriber.prototype.applySingleValue = function (value) {
32744 if (this.seenValue) {
32745 this.destination.error('Sequence contains more than one element');
32746 }
32747 else {
32748 this.seenValue = true;
32749 this.singleValue = value;
32750 }
32751 };
32752 SingleSubscriber.prototype._next = function (value) {
32753 var index = this.index++;
32754 if (this.predicate) {
32755 this.tryNext(value, index);
32756 }
32757 else {
32758 this.applySingleValue(value);
32759 }
32760 };
32761 SingleSubscriber.prototype.tryNext = function (value, index) {
32762 try {
32763 if (this.predicate(value, index, this.source)) {
32764 this.applySingleValue(value);
32765 }
32766 }
32767 catch (err) {
32768 this.destination.error(err);
32769 }
32770 };
32771 SingleSubscriber.prototype._complete = function () {
32772 var destination = this.destination;
32773 if (this.index > 0) {
32774 destination.next(this.seenValue ? this.singleValue : undefined);
32775 destination.complete();
32776 }
32777 else {
32778 destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__["EmptyError"]);
32779 }
32780 };
32781 return SingleSubscriber;
32782}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32783//# sourceMappingURL=single.js.map
32784
32785
32786/***/ }),
32787/* 339 */
32788/***/ (function(module, __webpack_exports__, __webpack_require__) {
32789
32790"use strict";
32791__webpack_require__.r(__webpack_exports__);
32792/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
32793/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32794/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32795/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32796
32797
32798function skip(count) {
32799 return function (source) { return source.lift(new SkipOperator(count)); };
32800}
32801var SkipOperator = /*@__PURE__*/ (function () {
32802 function SkipOperator(total) {
32803 this.total = total;
32804 }
32805 SkipOperator.prototype.call = function (subscriber, source) {
32806 return source.subscribe(new SkipSubscriber(subscriber, this.total));
32807 };
32808 return SkipOperator;
32809}());
32810var SkipSubscriber = /*@__PURE__*/ (function (_super) {
32811 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipSubscriber, _super);
32812 function SkipSubscriber(destination, total) {
32813 var _this = _super.call(this, destination) || this;
32814 _this.total = total;
32815 _this.count = 0;
32816 return _this;
32817 }
32818 SkipSubscriber.prototype._next = function (x) {
32819 if (++this.count > this.total) {
32820 this.destination.next(x);
32821 }
32822 };
32823 return SkipSubscriber;
32824}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32825//# sourceMappingURL=skip.js.map
32826
32827
32828/***/ }),
32829/* 340 */
32830/***/ (function(module, __webpack_exports__, __webpack_require__) {
32831
32832"use strict";
32833__webpack_require__.r(__webpack_exports__);
32834/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
32835/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32836/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32837/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
32838/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
32839
32840
32841
32842function skipLast(count) {
32843 return function (source) { return source.lift(new SkipLastOperator(count)); };
32844}
32845var SkipLastOperator = /*@__PURE__*/ (function () {
32846 function SkipLastOperator(_skipCount) {
32847 this._skipCount = _skipCount;
32848 if (this._skipCount < 0) {
32849 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
32850 }
32851 }
32852 SkipLastOperator.prototype.call = function (subscriber, source) {
32853 if (this._skipCount === 0) {
32854 return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"](subscriber));
32855 }
32856 else {
32857 return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
32858 }
32859 };
32860 return SkipLastOperator;
32861}());
32862var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
32863 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipLastSubscriber, _super);
32864 function SkipLastSubscriber(destination, _skipCount) {
32865 var _this = _super.call(this, destination) || this;
32866 _this._skipCount = _skipCount;
32867 _this._count = 0;
32868 _this._ring = new Array(_skipCount);
32869 return _this;
32870 }
32871 SkipLastSubscriber.prototype._next = function (value) {
32872 var skipCount = this._skipCount;
32873 var count = this._count++;
32874 if (count < skipCount) {
32875 this._ring[count] = value;
32876 }
32877 else {
32878 var currentIndex = count % skipCount;
32879 var ring = this._ring;
32880 var oldValue = ring[currentIndex];
32881 ring[currentIndex] = value;
32882 this.destination.next(oldValue);
32883 }
32884 };
32885 return SkipLastSubscriber;
32886}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
32887//# sourceMappingURL=skipLast.js.map
32888
32889
32890/***/ }),
32891/* 341 */
32892/***/ (function(module, __webpack_exports__, __webpack_require__) {
32893
32894"use strict";
32895__webpack_require__.r(__webpack_exports__);
32896/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
32897/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32898/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
32899/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
32900/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
32901/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32902
32903
32904
32905
32906function skipUntil(notifier) {
32907 return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
32908}
32909var SkipUntilOperator = /*@__PURE__*/ (function () {
32910 function SkipUntilOperator(notifier) {
32911 this.notifier = notifier;
32912 }
32913 SkipUntilOperator.prototype.call = function (destination, source) {
32914 return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
32915 };
32916 return SkipUntilOperator;
32917}());
32918var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
32919 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipUntilSubscriber, _super);
32920 function SkipUntilSubscriber(destination, notifier) {
32921 var _this = _super.call(this, destination) || this;
32922 _this.hasValue = false;
32923 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](_this, undefined, undefined);
32924 _this.add(innerSubscriber);
32925 _this.innerSubscription = innerSubscriber;
32926 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_this, notifier, undefined, undefined, innerSubscriber);
32927 if (innerSubscription !== innerSubscriber) {
32928 _this.add(innerSubscription);
32929 _this.innerSubscription = innerSubscription;
32930 }
32931 return _this;
32932 }
32933 SkipUntilSubscriber.prototype._next = function (value) {
32934 if (this.hasValue) {
32935 _super.prototype._next.call(this, value);
32936 }
32937 };
32938 SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32939 this.hasValue = true;
32940 if (this.innerSubscription) {
32941 this.innerSubscription.unsubscribe();
32942 }
32943 };
32944 SkipUntilSubscriber.prototype.notifyComplete = function () {
32945 };
32946 return SkipUntilSubscriber;
32947}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
32948//# sourceMappingURL=skipUntil.js.map
32949
32950
32951/***/ }),
32952/* 342 */
32953/***/ (function(module, __webpack_exports__, __webpack_require__) {
32954
32955"use strict";
32956__webpack_require__.r(__webpack_exports__);
32957/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
32958/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
32959/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
32960/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32961
32962
32963function skipWhile(predicate) {
32964 return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
32965}
32966var SkipWhileOperator = /*@__PURE__*/ (function () {
32967 function SkipWhileOperator(predicate) {
32968 this.predicate = predicate;
32969 }
32970 SkipWhileOperator.prototype.call = function (subscriber, source) {
32971 return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
32972 };
32973 return SkipWhileOperator;
32974}());
32975var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
32976 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipWhileSubscriber, _super);
32977 function SkipWhileSubscriber(destination, predicate) {
32978 var _this = _super.call(this, destination) || this;
32979 _this.predicate = predicate;
32980 _this.skipping = true;
32981 _this.index = 0;
32982 return _this;
32983 }
32984 SkipWhileSubscriber.prototype._next = function (value) {
32985 var destination = this.destination;
32986 if (this.skipping) {
32987 this.tryCallPredicate(value);
32988 }
32989 if (!this.skipping) {
32990 destination.next(value);
32991 }
32992 };
32993 SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
32994 try {
32995 var result = this.predicate(value, this.index++);
32996 this.skipping = Boolean(result);
32997 }
32998 catch (err) {
32999 this.destination.error(err);
33000 }
33001 };
33002 return SkipWhileSubscriber;
33003}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33004//# sourceMappingURL=skipWhile.js.map
33005
33006
33007/***/ }),
33008/* 343 */
33009/***/ (function(module, __webpack_exports__, __webpack_require__) {
33010
33011"use strict";
33012__webpack_require__.r(__webpack_exports__);
33013/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
33014/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
33015/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
33016/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
33017
33018
33019function startWith() {
33020 var array = [];
33021 for (var _i = 0; _i < arguments.length; _i++) {
33022 array[_i] = arguments[_i];
33023 }
33024 var scheduler = array[array.length - 1];
33025 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) {
33026 array.pop();
33027 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); };
33028 }
33029 else {
33030 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); };
33031 }
33032}
33033//# sourceMappingURL=startWith.js.map
33034
33035
33036/***/ }),
33037/* 344 */
33038/***/ (function(module, __webpack_exports__, __webpack_require__) {
33039
33040"use strict";
33041__webpack_require__.r(__webpack_exports__);
33042/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
33043/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(345);
33044/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
33045
33046function subscribeOn(scheduler, delay) {
33047 if (delay === void 0) {
33048 delay = 0;
33049 }
33050 return function subscribeOnOperatorFunction(source) {
33051 return source.lift(new SubscribeOnOperator(scheduler, delay));
33052 };
33053}
33054var SubscribeOnOperator = /*@__PURE__*/ (function () {
33055 function SubscribeOnOperator(scheduler, delay) {
33056 this.scheduler = scheduler;
33057 this.delay = delay;
33058 }
33059 SubscribeOnOperator.prototype.call = function (subscriber, source) {
33060 return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber);
33061 };
33062 return SubscribeOnOperator;
33063}());
33064//# sourceMappingURL=subscribeOn.js.map
33065
33066
33067/***/ }),
33068/* 345 */
33069/***/ (function(module, __webpack_exports__, __webpack_require__) {
33070
33071"use strict";
33072__webpack_require__.r(__webpack_exports__);
33073/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; });
33074/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33075/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(167);
33076/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
33077/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(255);
33078/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
33079
33080
33081
33082
33083var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
33084 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscribeOnObservable, _super);
33085 function SubscribeOnObservable(source, delayTime, scheduler) {
33086 if (delayTime === void 0) {
33087 delayTime = 0;
33088 }
33089 if (scheduler === void 0) {
33090 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
33091 }
33092 var _this = _super.call(this) || this;
33093 _this.source = source;
33094 _this.delayTime = delayTime;
33095 _this.scheduler = scheduler;
33096 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(delayTime) || delayTime < 0) {
33097 _this.delayTime = 0;
33098 }
33099 if (!scheduler || typeof scheduler.schedule !== 'function') {
33100 _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
33101 }
33102 return _this;
33103 }
33104 SubscribeOnObservable.create = function (source, delay, scheduler) {
33105 if (delay === void 0) {
33106 delay = 0;
33107 }
33108 if (scheduler === void 0) {
33109 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
33110 }
33111 return new SubscribeOnObservable(source, delay, scheduler);
33112 };
33113 SubscribeOnObservable.dispatch = function (arg) {
33114 var source = arg.source, subscriber = arg.subscriber;
33115 return this.add(source.subscribe(subscriber));
33116 };
33117 SubscribeOnObservable.prototype._subscribe = function (subscriber) {
33118 var delay = this.delayTime;
33119 var source = this.source;
33120 var scheduler = this.scheduler;
33121 return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
33122 source: source, subscriber: subscriber
33123 });
33124 };
33125 return SubscribeOnObservable;
33126}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
33127
33128//# sourceMappingURL=SubscribeOnObservable.js.map
33129
33130
33131/***/ }),
33132/* 346 */
33133/***/ (function(module, __webpack_exports__, __webpack_require__) {
33134
33135"use strict";
33136__webpack_require__.r(__webpack_exports__);
33137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
33138/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(347);
33139/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
33140/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
33141
33142
33143function switchAll() {
33144 return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
33145}
33146//# sourceMappingURL=switchAll.js.map
33147
33148
33149/***/ }),
33150/* 347 */
33151/***/ (function(module, __webpack_exports__, __webpack_require__) {
33152
33153"use strict";
33154__webpack_require__.r(__webpack_exports__);
33155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
33156/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33157/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33158/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
33159/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
33160/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(224);
33161/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(241);
33162/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
33163
33164
33165
33166
33167
33168
33169function switchMap(project, resultSelector) {
33170 if (typeof resultSelector === 'function') {
33171 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); })); })); };
33172 }
33173 return function (source) { return source.lift(new SwitchMapOperator(project)); };
33174}
33175var SwitchMapOperator = /*@__PURE__*/ (function () {
33176 function SwitchMapOperator(project) {
33177 this.project = project;
33178 }
33179 SwitchMapOperator.prototype.call = function (subscriber, source) {
33180 return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
33181 };
33182 return SwitchMapOperator;
33183}());
33184var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
33185 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchMapSubscriber, _super);
33186 function SwitchMapSubscriber(destination, project) {
33187 var _this = _super.call(this, destination) || this;
33188 _this.project = project;
33189 _this.index = 0;
33190 return _this;
33191 }
33192 SwitchMapSubscriber.prototype._next = function (value) {
33193 var result;
33194 var index = this.index++;
33195 try {
33196 result = this.project(value, index);
33197 }
33198 catch (error) {
33199 this.destination.error(error);
33200 return;
33201 }
33202 this._innerSub(result, value, index);
33203 };
33204 SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
33205 var innerSubscription = this.innerSubscription;
33206 if (innerSubscription) {
33207 innerSubscription.unsubscribe();
33208 }
33209 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, value, index);
33210 var destination = this.destination;
33211 destination.add(innerSubscriber);
33212 this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
33213 if (this.innerSubscription !== innerSubscriber) {
33214 destination.add(this.innerSubscription);
33215 }
33216 };
33217 SwitchMapSubscriber.prototype._complete = function () {
33218 var innerSubscription = this.innerSubscription;
33219 if (!innerSubscription || innerSubscription.closed) {
33220 _super.prototype._complete.call(this);
33221 }
33222 this.unsubscribe();
33223 };
33224 SwitchMapSubscriber.prototype._unsubscribe = function () {
33225 this.innerSubscription = null;
33226 };
33227 SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
33228 var destination = this.destination;
33229 destination.remove(innerSub);
33230 this.innerSubscription = null;
33231 if (this.isStopped) {
33232 _super.prototype._complete.call(this);
33233 }
33234 };
33235 SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33236 this.destination.next(innerValue);
33237 };
33238 return SwitchMapSubscriber;
33239}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33240//# sourceMappingURL=switchMap.js.map
33241
33242
33243/***/ }),
33244/* 348 */
33245/***/ (function(module, __webpack_exports__, __webpack_require__) {
33246
33247"use strict";
33248__webpack_require__.r(__webpack_exports__);
33249/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
33250/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(347);
33251/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
33252
33253function switchMapTo(innerObservable, resultSelector) {
33254 return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; });
33255}
33256//# sourceMappingURL=switchMapTo.js.map
33257
33258
33259/***/ }),
33260/* 349 */
33261/***/ (function(module, __webpack_exports__, __webpack_require__) {
33262
33263"use strict";
33264__webpack_require__.r(__webpack_exports__);
33265/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
33266/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33267/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33268/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
33269/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33270
33271
33272
33273function takeUntil(notifier) {
33274 return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
33275}
33276var TakeUntilOperator = /*@__PURE__*/ (function () {
33277 function TakeUntilOperator(notifier) {
33278 this.notifier = notifier;
33279 }
33280 TakeUntilOperator.prototype.call = function (subscriber, source) {
33281 var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
33282 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(takeUntilSubscriber, this.notifier);
33283 if (notifierSubscription && !takeUntilSubscriber.seenValue) {
33284 takeUntilSubscriber.add(notifierSubscription);
33285 return source.subscribe(takeUntilSubscriber);
33286 }
33287 return takeUntilSubscriber;
33288 };
33289 return TakeUntilOperator;
33290}());
33291var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
33292 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeUntilSubscriber, _super);
33293 function TakeUntilSubscriber(destination) {
33294 var _this = _super.call(this, destination) || this;
33295 _this.seenValue = false;
33296 return _this;
33297 }
33298 TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33299 this.seenValue = true;
33300 this.complete();
33301 };
33302 TakeUntilSubscriber.prototype.notifyComplete = function () {
33303 };
33304 return TakeUntilSubscriber;
33305}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33306//# sourceMappingURL=takeUntil.js.map
33307
33308
33309/***/ }),
33310/* 350 */
33311/***/ (function(module, __webpack_exports__, __webpack_require__) {
33312
33313"use strict";
33314__webpack_require__.r(__webpack_exports__);
33315/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
33316/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33317/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33318/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
33319
33320
33321function takeWhile(predicate, inclusive) {
33322 if (inclusive === void 0) {
33323 inclusive = false;
33324 }
33325 return function (source) {
33326 return source.lift(new TakeWhileOperator(predicate, inclusive));
33327 };
33328}
33329var TakeWhileOperator = /*@__PURE__*/ (function () {
33330 function TakeWhileOperator(predicate, inclusive) {
33331 this.predicate = predicate;
33332 this.inclusive = inclusive;
33333 }
33334 TakeWhileOperator.prototype.call = function (subscriber, source) {
33335 return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
33336 };
33337 return TakeWhileOperator;
33338}());
33339var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
33340 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeWhileSubscriber, _super);
33341 function TakeWhileSubscriber(destination, predicate, inclusive) {
33342 var _this = _super.call(this, destination) || this;
33343 _this.predicate = predicate;
33344 _this.inclusive = inclusive;
33345 _this.index = 0;
33346 return _this;
33347 }
33348 TakeWhileSubscriber.prototype._next = function (value) {
33349 var destination = this.destination;
33350 var result;
33351 try {
33352 result = this.predicate(value, this.index++);
33353 }
33354 catch (err) {
33355 destination.error(err);
33356 return;
33357 }
33358 this.nextOrComplete(value, result);
33359 };
33360 TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
33361 var destination = this.destination;
33362 if (Boolean(predicateResult)) {
33363 destination.next(value);
33364 }
33365 else {
33366 if (this.inclusive) {
33367 destination.next(value);
33368 }
33369 destination.complete();
33370 }
33371 };
33372 return TakeWhileSubscriber;
33373}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33374//# sourceMappingURL=takeWhile.js.map
33375
33376
33377/***/ }),
33378/* 351 */
33379/***/ (function(module, __webpack_exports__, __webpack_require__) {
33380
33381"use strict";
33382__webpack_require__.r(__webpack_exports__);
33383/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
33384/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33385/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33386/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(218);
33387/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(171);
33388/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
33389
33390
33391
33392
33393function tap(nextOrObserver, error, complete) {
33394 return function tapOperatorFunction(source) {
33395 return source.lift(new DoOperator(nextOrObserver, error, complete));
33396 };
33397}
33398var DoOperator = /*@__PURE__*/ (function () {
33399 function DoOperator(nextOrObserver, error, complete) {
33400 this.nextOrObserver = nextOrObserver;
33401 this.error = error;
33402 this.complete = complete;
33403 }
33404 DoOperator.prototype.call = function (subscriber, source) {
33405 return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
33406 };
33407 return DoOperator;
33408}());
33409var TapSubscriber = /*@__PURE__*/ (function (_super) {
33410 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TapSubscriber, _super);
33411 function TapSubscriber(destination, observerOrNext, error, complete) {
33412 var _this = _super.call(this, destination) || this;
33413 _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33414 _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33415 _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33416 _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33417 _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33418 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(observerOrNext)) {
33419 _this._context = _this;
33420 _this._tapNext = observerOrNext;
33421 }
33422 else if (observerOrNext) {
33423 _this._context = observerOrNext;
33424 _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33425 _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33426 _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
33427 }
33428 return _this;
33429 }
33430 TapSubscriber.prototype._next = function (value) {
33431 try {
33432 this._tapNext.call(this._context, value);
33433 }
33434 catch (err) {
33435 this.destination.error(err);
33436 return;
33437 }
33438 this.destination.next(value);
33439 };
33440 TapSubscriber.prototype._error = function (err) {
33441 try {
33442 this._tapError.call(this._context, err);
33443 }
33444 catch (err) {
33445 this.destination.error(err);
33446 return;
33447 }
33448 this.destination.error(err);
33449 };
33450 TapSubscriber.prototype._complete = function () {
33451 try {
33452 this._tapComplete.call(this._context);
33453 }
33454 catch (err) {
33455 this.destination.error(err);
33456 return;
33457 }
33458 return this.destination.complete();
33459 };
33460 return TapSubscriber;
33461}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33462//# sourceMappingURL=tap.js.map
33463
33464
33465/***/ }),
33466/* 352 */
33467/***/ (function(module, __webpack_exports__, __webpack_require__) {
33468
33469"use strict";
33470__webpack_require__.r(__webpack_exports__);
33471/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; });
33472/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
33473/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33474/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33475/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
33476/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33477
33478
33479
33480var defaultThrottleConfig = {
33481 leading: true,
33482 trailing: false
33483};
33484function throttle(durationSelector, config) {
33485 if (config === void 0) {
33486 config = defaultThrottleConfig;
33487 }
33488 return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
33489}
33490var ThrottleOperator = /*@__PURE__*/ (function () {
33491 function ThrottleOperator(durationSelector, leading, trailing) {
33492 this.durationSelector = durationSelector;
33493 this.leading = leading;
33494 this.trailing = trailing;
33495 }
33496 ThrottleOperator.prototype.call = function (subscriber, source) {
33497 return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
33498 };
33499 return ThrottleOperator;
33500}());
33501var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
33502 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleSubscriber, _super);
33503 function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
33504 var _this = _super.call(this, destination) || this;
33505 _this.destination = destination;
33506 _this.durationSelector = durationSelector;
33507 _this._leading = _leading;
33508 _this._trailing = _trailing;
33509 _this._hasValue = false;
33510 return _this;
33511 }
33512 ThrottleSubscriber.prototype._next = function (value) {
33513 this._hasValue = true;
33514 this._sendValue = value;
33515 if (!this._throttled) {
33516 if (this._leading) {
33517 this.send();
33518 }
33519 else {
33520 this.throttle(value);
33521 }
33522 }
33523 };
33524 ThrottleSubscriber.prototype.send = function () {
33525 var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
33526 if (_hasValue) {
33527 this.destination.next(_sendValue);
33528 this.throttle(_sendValue);
33529 }
33530 this._hasValue = false;
33531 this._sendValue = null;
33532 };
33533 ThrottleSubscriber.prototype.throttle = function (value) {
33534 var duration = this.tryDurationSelector(value);
33535 if (!!duration) {
33536 this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration));
33537 }
33538 };
33539 ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
33540 try {
33541 return this.durationSelector(value);
33542 }
33543 catch (err) {
33544 this.destination.error(err);
33545 return null;
33546 }
33547 };
33548 ThrottleSubscriber.prototype.throttlingDone = function () {
33549 var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
33550 if (_throttled) {
33551 _throttled.unsubscribe();
33552 }
33553 this._throttled = null;
33554 if (_trailing) {
33555 this.send();
33556 }
33557 };
33558 ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33559 this.throttlingDone();
33560 };
33561 ThrottleSubscriber.prototype.notifyComplete = function () {
33562 this.throttlingDone();
33563 };
33564 return ThrottleSubscriber;
33565}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
33566//# sourceMappingURL=throttle.js.map
33567
33568
33569/***/ }),
33570/* 353 */
33571/***/ (function(module, __webpack_exports__, __webpack_require__) {
33572
33573"use strict";
33574__webpack_require__.r(__webpack_exports__);
33575/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
33576/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33577/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33578/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
33579/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(352);
33580/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
33581
33582
33583
33584
33585function throttleTime(duration, scheduler, config) {
33586 if (scheduler === void 0) {
33587 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
33588 }
33589 if (config === void 0) {
33590 config = _throttle__WEBPACK_IMPORTED_MODULE_3__["defaultThrottleConfig"];
33591 }
33592 return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
33593}
33594var ThrottleTimeOperator = /*@__PURE__*/ (function () {
33595 function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
33596 this.duration = duration;
33597 this.scheduler = scheduler;
33598 this.leading = leading;
33599 this.trailing = trailing;
33600 }
33601 ThrottleTimeOperator.prototype.call = function (subscriber, source) {
33602 return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
33603 };
33604 return ThrottleTimeOperator;
33605}());
33606var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
33607 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleTimeSubscriber, _super);
33608 function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
33609 var _this = _super.call(this, destination) || this;
33610 _this.duration = duration;
33611 _this.scheduler = scheduler;
33612 _this.leading = leading;
33613 _this.trailing = trailing;
33614 _this._hasTrailingValue = false;
33615 _this._trailingValue = null;
33616 return _this;
33617 }
33618 ThrottleTimeSubscriber.prototype._next = function (value) {
33619 if (this.throttled) {
33620 if (this.trailing) {
33621 this._trailingValue = value;
33622 this._hasTrailingValue = true;
33623 }
33624 }
33625 else {
33626 this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));
33627 if (this.leading) {
33628 this.destination.next(value);
33629 }
33630 else if (this.trailing) {
33631 this._trailingValue = value;
33632 this._hasTrailingValue = true;
33633 }
33634 }
33635 };
33636 ThrottleTimeSubscriber.prototype._complete = function () {
33637 if (this._hasTrailingValue) {
33638 this.destination.next(this._trailingValue);
33639 this.destination.complete();
33640 }
33641 else {
33642 this.destination.complete();
33643 }
33644 };
33645 ThrottleTimeSubscriber.prototype.clearThrottle = function () {
33646 var throttled = this.throttled;
33647 if (throttled) {
33648 if (this.trailing && this._hasTrailingValue) {
33649 this.destination.next(this._trailingValue);
33650 this._trailingValue = null;
33651 this._hasTrailingValue = false;
33652 }
33653 throttled.unsubscribe();
33654 this.remove(throttled);
33655 this.throttled = null;
33656 }
33657 };
33658 return ThrottleTimeSubscriber;
33659}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
33660function dispatchNext(arg) {
33661 var subscriber = arg.subscriber;
33662 subscriber.clearThrottle();
33663}
33664//# sourceMappingURL=throttleTime.js.map
33665
33666
33667/***/ }),
33668/* 354 */
33669/***/ (function(module, __webpack_exports__, __webpack_require__) {
33670
33671"use strict";
33672__webpack_require__.r(__webpack_exports__);
33673/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
33674/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; });
33675/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
33676/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
33677/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(248);
33678/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(224);
33679/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
33680
33681
33682
33683
33684function timeInterval(scheduler) {
33685 if (scheduler === void 0) {
33686 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
33687 }
33688 return function (source) {
33689 return Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
33690 return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(function (_a, value) {
33691 var current = _a.current;
33692 return ({ value: value, current: scheduler.now(), last: current });
33693 }, { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_a) {
33694 var current = _a.current, last = _a.last, value = _a.value;
33695 return new TimeInterval(value, current - last);
33696 }));
33697 });
33698 };
33699}
33700var TimeInterval = /*@__PURE__*/ (function () {
33701 function TimeInterval(value, interval) {
33702 this.value = value;
33703 this.interval = interval;
33704 }
33705 return TimeInterval;
33706}());
33707
33708//# sourceMappingURL=timeInterval.js.map
33709
33710
33711/***/ }),
33712/* 355 */
33713/***/ (function(module, __webpack_exports__, __webpack_require__) {
33714
33715"use strict";
33716__webpack_require__.r(__webpack_exports__);
33717/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
33718/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
33719/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(222);
33720/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(356);
33721/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(207);
33722/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
33723
33724
33725
33726
33727function timeout(due, scheduler) {
33728 if (scheduler === void 0) {
33729 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
33730 }
33731 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);
33732}
33733//# sourceMappingURL=timeout.js.map
33734
33735
33736/***/ }),
33737/* 356 */
33738/***/ (function(module, __webpack_exports__, __webpack_require__) {
33739
33740"use strict";
33741__webpack_require__.r(__webpack_exports__);
33742/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
33743/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33744/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213);
33745/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(288);
33746/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
33747/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
33748/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33749
33750
33751
33752
33753
33754function timeoutWith(due, withObservable, scheduler) {
33755 if (scheduler === void 0) {
33756 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
33757 }
33758 return function (source) {
33759 var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(due);
33760 var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
33761 return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
33762 };
33763}
33764var TimeoutWithOperator = /*@__PURE__*/ (function () {
33765 function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
33766 this.waitFor = waitFor;
33767 this.absoluteTimeout = absoluteTimeout;
33768 this.withObservable = withObservable;
33769 this.scheduler = scheduler;
33770 }
33771 TimeoutWithOperator.prototype.call = function (subscriber, source) {
33772 return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
33773 };
33774 return TimeoutWithOperator;
33775}());
33776var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
33777 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutWithSubscriber, _super);
33778 function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
33779 var _this = _super.call(this, destination) || this;
33780 _this.absoluteTimeout = absoluteTimeout;
33781 _this.waitFor = waitFor;
33782 _this.withObservable = withObservable;
33783 _this.scheduler = scheduler;
33784 _this.action = null;
33785 _this.scheduleTimeout();
33786 return _this;
33787 }
33788 TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
33789 var withObservable = subscriber.withObservable;
33790 subscriber._unsubscribeAndRecycle();
33791 subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(subscriber, withObservable));
33792 };
33793 TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
33794 var action = this.action;
33795 if (action) {
33796 this.action = action.schedule(this, this.waitFor);
33797 }
33798 else {
33799 this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
33800 }
33801 };
33802 TimeoutWithSubscriber.prototype._next = function (value) {
33803 if (!this.absoluteTimeout) {
33804 this.scheduleTimeout();
33805 }
33806 _super.prototype._next.call(this, value);
33807 };
33808 TimeoutWithSubscriber.prototype._unsubscribe = function () {
33809 this.action = null;
33810 this.scheduler = null;
33811 this.withObservable = null;
33812 };
33813 return TimeoutWithSubscriber;
33814}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
33815//# sourceMappingURL=timeoutWith.js.map
33816
33817
33818/***/ }),
33819/* 357 */
33820/***/ (function(module, __webpack_exports__, __webpack_require__) {
33821
33822"use strict";
33823__webpack_require__.r(__webpack_exports__);
33824/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
33825/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
33826/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(213);
33827/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(224);
33828/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
33829
33830
33831function timestamp(scheduler) {
33832 if (scheduler === void 0) {
33833 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
33834 }
33835 return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) { return new Timestamp(value, scheduler.now()); });
33836}
33837var Timestamp = /*@__PURE__*/ (function () {
33838 function Timestamp(value, timestamp) {
33839 this.value = value;
33840 this.timestamp = timestamp;
33841 }
33842 return Timestamp;
33843}());
33844
33845//# sourceMappingURL=timestamp.js.map
33846
33847
33848/***/ }),
33849/* 358 */
33850/***/ (function(module, __webpack_exports__, __webpack_require__) {
33851
33852"use strict";
33853__webpack_require__.r(__webpack_exports__);
33854/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
33855/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(313);
33856/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
33857
33858function toArrayReducer(arr, item, index) {
33859 if (index === 0) {
33860 return [item];
33861 }
33862 arr.push(item);
33863 return arr;
33864}
33865function toArray() {
33866 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []);
33867}
33868//# sourceMappingURL=toArray.js.map
33869
33870
33871/***/ }),
33872/* 359 */
33873/***/ (function(module, __webpack_exports__, __webpack_require__) {
33874
33875"use strict";
33876__webpack_require__.r(__webpack_exports__);
33877/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; });
33878/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33879/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
33880/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
33881/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
33882/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33883
33884
33885
33886
33887function window(windowBoundaries) {
33888 return function windowOperatorFunction(source) {
33889 return source.lift(new WindowOperator(windowBoundaries));
33890 };
33891}
33892var WindowOperator = /*@__PURE__*/ (function () {
33893 function WindowOperator(windowBoundaries) {
33894 this.windowBoundaries = windowBoundaries;
33895 }
33896 WindowOperator.prototype.call = function (subscriber, source) {
33897 var windowSubscriber = new WindowSubscriber(subscriber);
33898 var sourceSubscription = source.subscribe(windowSubscriber);
33899 if (!sourceSubscription.closed) {
33900 windowSubscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
33901 }
33902 return sourceSubscription;
33903 };
33904 return WindowOperator;
33905}());
33906var WindowSubscriber = /*@__PURE__*/ (function (_super) {
33907 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
33908 function WindowSubscriber(destination) {
33909 var _this = _super.call(this, destination) || this;
33910 _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
33911 destination.next(_this.window);
33912 return _this;
33913 }
33914 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33915 this.openWindow();
33916 };
33917 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
33918 this._error(error);
33919 };
33920 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
33921 this._complete();
33922 };
33923 WindowSubscriber.prototype._next = function (value) {
33924 this.window.next(value);
33925 };
33926 WindowSubscriber.prototype._error = function (err) {
33927 this.window.error(err);
33928 this.destination.error(err);
33929 };
33930 WindowSubscriber.prototype._complete = function () {
33931 this.window.complete();
33932 this.destination.complete();
33933 };
33934 WindowSubscriber.prototype._unsubscribe = function () {
33935 this.window = null;
33936 };
33937 WindowSubscriber.prototype.openWindow = function () {
33938 var prevWindow = this.window;
33939 if (prevWindow) {
33940 prevWindow.complete();
33941 }
33942 var destination = this.destination;
33943 var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
33944 destination.next(newWindow);
33945 };
33946 return WindowSubscriber;
33947}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
33948//# sourceMappingURL=window.js.map
33949
33950
33951/***/ }),
33952/* 360 */
33953/***/ (function(module, __webpack_exports__, __webpack_require__) {
33954
33955"use strict";
33956__webpack_require__.r(__webpack_exports__);
33957/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
33958/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
33959/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
33960/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
33961/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
33962
33963
33964
33965function windowCount(windowSize, startWindowEvery) {
33966 if (startWindowEvery === void 0) {
33967 startWindowEvery = 0;
33968 }
33969 return function windowCountOperatorFunction(source) {
33970 return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
33971 };
33972}
33973var WindowCountOperator = /*@__PURE__*/ (function () {
33974 function WindowCountOperator(windowSize, startWindowEvery) {
33975 this.windowSize = windowSize;
33976 this.startWindowEvery = startWindowEvery;
33977 }
33978 WindowCountOperator.prototype.call = function (subscriber, source) {
33979 return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
33980 };
33981 return WindowCountOperator;
33982}());
33983var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
33984 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowCountSubscriber, _super);
33985 function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
33986 var _this = _super.call(this, destination) || this;
33987 _this.destination = destination;
33988 _this.windowSize = windowSize;
33989 _this.startWindowEvery = startWindowEvery;
33990 _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]()];
33991 _this.count = 0;
33992 destination.next(_this.windows[0]);
33993 return _this;
33994 }
33995 WindowCountSubscriber.prototype._next = function (value) {
33996 var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
33997 var destination = this.destination;
33998 var windowSize = this.windowSize;
33999 var windows = this.windows;
34000 var len = windows.length;
34001 for (var i = 0; i < len && !this.closed; i++) {
34002 windows[i].next(value);
34003 }
34004 var c = this.count - windowSize + 1;
34005 if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
34006 windows.shift().complete();
34007 }
34008 if (++this.count % startWindowEvery === 0 && !this.closed) {
34009 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
34010 windows.push(window_1);
34011 destination.next(window_1);
34012 }
34013 };
34014 WindowCountSubscriber.prototype._error = function (err) {
34015 var windows = this.windows;
34016 if (windows) {
34017 while (windows.length > 0 && !this.closed) {
34018 windows.shift().error(err);
34019 }
34020 }
34021 this.destination.error(err);
34022 };
34023 WindowCountSubscriber.prototype._complete = function () {
34024 var windows = this.windows;
34025 if (windows) {
34026 while (windows.length > 0 && !this.closed) {
34027 windows.shift().complete();
34028 }
34029 }
34030 this.destination.complete();
34031 };
34032 WindowCountSubscriber.prototype._unsubscribe = function () {
34033 this.count = 0;
34034 this.windows = null;
34035 };
34036 return WindowCountSubscriber;
34037}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
34038//# sourceMappingURL=windowCount.js.map
34039
34040
34041/***/ }),
34042/* 361 */
34043/***/ (function(module, __webpack_exports__, __webpack_require__) {
34044
34045"use strict";
34046__webpack_require__.r(__webpack_exports__);
34047/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; });
34048/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34049/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34050/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
34051/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
34052/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(255);
34053/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(203);
34054/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
34055
34056
34057
34058
34059
34060
34061function windowTime(windowTimeSpan) {
34062 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
34063 var windowCreationInterval = null;
34064 var maxWindowSize = Number.POSITIVE_INFINITY;
34065 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[3])) {
34066 scheduler = arguments[3];
34067 }
34068 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[2])) {
34069 scheduler = arguments[2];
34070 }
34071 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[2])) {
34072 maxWindowSize = arguments[2];
34073 }
34074 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[1])) {
34075 scheduler = arguments[1];
34076 }
34077 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[1])) {
34078 windowCreationInterval = arguments[1];
34079 }
34080 return function windowTimeOperatorFunction(source) {
34081 return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
34082 };
34083}
34084var WindowTimeOperator = /*@__PURE__*/ (function () {
34085 function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
34086 this.windowTimeSpan = windowTimeSpan;
34087 this.windowCreationInterval = windowCreationInterval;
34088 this.maxWindowSize = maxWindowSize;
34089 this.scheduler = scheduler;
34090 }
34091 WindowTimeOperator.prototype.call = function (subscriber, source) {
34092 return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
34093 };
34094 return WindowTimeOperator;
34095}());
34096var CountedSubject = /*@__PURE__*/ (function (_super) {
34097 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountedSubject, _super);
34098 function CountedSubject() {
34099 var _this = _super !== null && _super.apply(this, arguments) || this;
34100 _this._numberOfNextedValues = 0;
34101 return _this;
34102 }
34103 CountedSubject.prototype.next = function (value) {
34104 this._numberOfNextedValues++;
34105 _super.prototype.next.call(this, value);
34106 };
34107 Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
34108 get: function () {
34109 return this._numberOfNextedValues;
34110 },
34111 enumerable: true,
34112 configurable: true
34113 });
34114 return CountedSubject;
34115}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
34116var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
34117 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowTimeSubscriber, _super);
34118 function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
34119 var _this = _super.call(this, destination) || this;
34120 _this.destination = destination;
34121 _this.windowTimeSpan = windowTimeSpan;
34122 _this.windowCreationInterval = windowCreationInterval;
34123 _this.maxWindowSize = maxWindowSize;
34124 _this.scheduler = scheduler;
34125 _this.windows = [];
34126 var window = _this.openWindow();
34127 if (windowCreationInterval !== null && windowCreationInterval >= 0) {
34128 var closeState = { subscriber: _this, window: window, context: null };
34129 var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
34130 _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
34131 _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
34132 }
34133 else {
34134 var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
34135 _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
34136 }
34137 return _this;
34138 }
34139 WindowTimeSubscriber.prototype._next = function (value) {
34140 var windows = this.windows;
34141 var len = windows.length;
34142 for (var i = 0; i < len; i++) {
34143 var window_1 = windows[i];
34144 if (!window_1.closed) {
34145 window_1.next(value);
34146 if (window_1.numberOfNextedValues >= this.maxWindowSize) {
34147 this.closeWindow(window_1);
34148 }
34149 }
34150 }
34151 };
34152 WindowTimeSubscriber.prototype._error = function (err) {
34153 var windows = this.windows;
34154 while (windows.length > 0) {
34155 windows.shift().error(err);
34156 }
34157 this.destination.error(err);
34158 };
34159 WindowTimeSubscriber.prototype._complete = function () {
34160 var windows = this.windows;
34161 while (windows.length > 0) {
34162 var window_2 = windows.shift();
34163 if (!window_2.closed) {
34164 window_2.complete();
34165 }
34166 }
34167 this.destination.complete();
34168 };
34169 WindowTimeSubscriber.prototype.openWindow = function () {
34170 var window = new CountedSubject();
34171 this.windows.push(window);
34172 var destination = this.destination;
34173 destination.next(window);
34174 return window;
34175 };
34176 WindowTimeSubscriber.prototype.closeWindow = function (window) {
34177 window.complete();
34178 var windows = this.windows;
34179 windows.splice(windows.indexOf(window), 1);
34180 };
34181 return WindowTimeSubscriber;
34182}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
34183function dispatchWindowTimeSpanOnly(state) {
34184 var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
34185 if (window) {
34186 subscriber.closeWindow(window);
34187 }
34188 state.window = subscriber.openWindow();
34189 this.schedule(state, windowTimeSpan);
34190}
34191function dispatchWindowCreation(state) {
34192 var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
34193 var window = subscriber.openWindow();
34194 var action = this;
34195 var context = { action: action, subscription: null };
34196 var timeSpanState = { subscriber: subscriber, window: window, context: context };
34197 context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
34198 action.add(context.subscription);
34199 action.schedule(state, windowCreationInterval);
34200}
34201function dispatchWindowClose(state) {
34202 var subscriber = state.subscriber, window = state.window, context = state.context;
34203 if (context && context.action && context.subscription) {
34204 context.action.remove(context.subscription);
34205 }
34206 subscriber.closeWindow(window);
34207}
34208//# sourceMappingURL=windowTime.js.map
34209
34210
34211/***/ }),
34212/* 362 */
34213/***/ (function(module, __webpack_exports__, __webpack_require__) {
34214
34215"use strict";
34216__webpack_require__.r(__webpack_exports__);
34217/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
34218/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34219/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34220/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
34221/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
34222/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(228);
34223/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34224
34225
34226
34227
34228
34229function windowToggle(openings, closingSelector) {
34230 return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
34231}
34232var WindowToggleOperator = /*@__PURE__*/ (function () {
34233 function WindowToggleOperator(openings, closingSelector) {
34234 this.openings = openings;
34235 this.closingSelector = closingSelector;
34236 }
34237 WindowToggleOperator.prototype.call = function (subscriber, source) {
34238 return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
34239 };
34240 return WindowToggleOperator;
34241}());
34242var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
34243 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowToggleSubscriber, _super);
34244 function WindowToggleSubscriber(destination, openings, closingSelector) {
34245 var _this = _super.call(this, destination) || this;
34246 _this.openings = openings;
34247 _this.closingSelector = closingSelector;
34248 _this.contexts = [];
34249 _this.add(_this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(_this, openings, openings));
34250 return _this;
34251 }
34252 WindowToggleSubscriber.prototype._next = function (value) {
34253 var contexts = this.contexts;
34254 if (contexts) {
34255 var len = contexts.length;
34256 for (var i = 0; i < len; i++) {
34257 contexts[i].window.next(value);
34258 }
34259 }
34260 };
34261 WindowToggleSubscriber.prototype._error = function (err) {
34262 var contexts = this.contexts;
34263 this.contexts = null;
34264 if (contexts) {
34265 var len = contexts.length;
34266 var index = -1;
34267 while (++index < len) {
34268 var context_1 = contexts[index];
34269 context_1.window.error(err);
34270 context_1.subscription.unsubscribe();
34271 }
34272 }
34273 _super.prototype._error.call(this, err);
34274 };
34275 WindowToggleSubscriber.prototype._complete = function () {
34276 var contexts = this.contexts;
34277 this.contexts = null;
34278 if (contexts) {
34279 var len = contexts.length;
34280 var index = -1;
34281 while (++index < len) {
34282 var context_2 = contexts[index];
34283 context_2.window.complete();
34284 context_2.subscription.unsubscribe();
34285 }
34286 }
34287 _super.prototype._complete.call(this);
34288 };
34289 WindowToggleSubscriber.prototype._unsubscribe = function () {
34290 var contexts = this.contexts;
34291 this.contexts = null;
34292 if (contexts) {
34293 var len = contexts.length;
34294 var index = -1;
34295 while (++index < len) {
34296 var context_3 = contexts[index];
34297 context_3.window.unsubscribe();
34298 context_3.subscription.unsubscribe();
34299 }
34300 }
34301 };
34302 WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34303 if (outerValue === this.openings) {
34304 var closingNotifier = void 0;
34305 try {
34306 var closingSelector = this.closingSelector;
34307 closingNotifier = closingSelector(innerValue);
34308 }
34309 catch (e) {
34310 return this.error(e);
34311 }
34312 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
34313 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
34314 var context_4 = { window: window_1, subscription: subscription };
34315 this.contexts.push(context_4);
34316 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, closingNotifier, context_4);
34317 if (innerSubscription.closed) {
34318 this.closeWindow(this.contexts.length - 1);
34319 }
34320 else {
34321 innerSubscription.context = context_4;
34322 subscription.add(innerSubscription);
34323 }
34324 this.destination.next(window_1);
34325 }
34326 else {
34327 this.closeWindow(this.contexts.indexOf(outerValue));
34328 }
34329 };
34330 WindowToggleSubscriber.prototype.notifyError = function (err) {
34331 this.error(err);
34332 };
34333 WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
34334 if (inner !== this.openSubscription) {
34335 this.closeWindow(this.contexts.indexOf(inner.context));
34336 }
34337 };
34338 WindowToggleSubscriber.prototype.closeWindow = function (index) {
34339 if (index === -1) {
34340 return;
34341 }
34342 var contexts = this.contexts;
34343 var context = contexts[index];
34344 var window = context.window, subscription = context.subscription;
34345 contexts.splice(index, 1);
34346 window.complete();
34347 subscription.unsubscribe();
34348 };
34349 return WindowToggleSubscriber;
34350}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
34351//# sourceMappingURL=windowToggle.js.map
34352
34353
34354/***/ }),
34355/* 363 */
34356/***/ (function(module, __webpack_exports__, __webpack_require__) {
34357
34358"use strict";
34359__webpack_require__.r(__webpack_exports__);
34360/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
34361/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34362/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34363/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(227);
34364/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(228);
34365/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34366
34367
34368
34369
34370function windowWhen(closingSelector) {
34371 return function windowWhenOperatorFunction(source) {
34372 return source.lift(new WindowOperator(closingSelector));
34373 };
34374}
34375var WindowOperator = /*@__PURE__*/ (function () {
34376 function WindowOperator(closingSelector) {
34377 this.closingSelector = closingSelector;
34378 }
34379 WindowOperator.prototype.call = function (subscriber, source) {
34380 return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
34381 };
34382 return WindowOperator;
34383}());
34384var WindowSubscriber = /*@__PURE__*/ (function (_super) {
34385 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
34386 function WindowSubscriber(destination, closingSelector) {
34387 var _this = _super.call(this, destination) || this;
34388 _this.destination = destination;
34389 _this.closingSelector = closingSelector;
34390 _this.openWindow();
34391 return _this;
34392 }
34393 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34394 this.openWindow(innerSub);
34395 };
34396 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
34397 this._error(error);
34398 };
34399 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
34400 this.openWindow(innerSub);
34401 };
34402 WindowSubscriber.prototype._next = function (value) {
34403 this.window.next(value);
34404 };
34405 WindowSubscriber.prototype._error = function (err) {
34406 this.window.error(err);
34407 this.destination.error(err);
34408 this.unsubscribeClosingNotification();
34409 };
34410 WindowSubscriber.prototype._complete = function () {
34411 this.window.complete();
34412 this.destination.complete();
34413 this.unsubscribeClosingNotification();
34414 };
34415 WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
34416 if (this.closingNotification) {
34417 this.closingNotification.unsubscribe();
34418 }
34419 };
34420 WindowSubscriber.prototype.openWindow = function (innerSub) {
34421 if (innerSub === void 0) {
34422 innerSub = null;
34423 }
34424 if (innerSub) {
34425 this.remove(innerSub);
34426 innerSub.unsubscribe();
34427 }
34428 var prevWindow = this.window;
34429 if (prevWindow) {
34430 prevWindow.complete();
34431 }
34432 var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
34433 this.destination.next(window);
34434 var closingNotifier;
34435 try {
34436 var closingSelector = this.closingSelector;
34437 closingNotifier = closingSelector();
34438 }
34439 catch (e) {
34440 this.destination.error(e);
34441 this.window.error(e);
34442 return;
34443 }
34444 this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
34445 };
34446 return WindowSubscriber;
34447}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
34448//# sourceMappingURL=windowWhen.js.map
34449
34450
34451/***/ }),
34452/* 364 */
34453/***/ (function(module, __webpack_exports__, __webpack_require__) {
34454
34455"use strict";
34456__webpack_require__.r(__webpack_exports__);
34457/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
34458/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170);
34459/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
34460/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
34461/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34462
34463
34464
34465function withLatestFrom() {
34466 var args = [];
34467 for (var _i = 0; _i < arguments.length; _i++) {
34468 args[_i] = arguments[_i];
34469 }
34470 return function (source) {
34471 var project;
34472 if (typeof args[args.length - 1] === 'function') {
34473 project = args.pop();
34474 }
34475 var observables = args;
34476 return source.lift(new WithLatestFromOperator(observables, project));
34477 };
34478}
34479var WithLatestFromOperator = /*@__PURE__*/ (function () {
34480 function WithLatestFromOperator(observables, project) {
34481 this.observables = observables;
34482 this.project = project;
34483 }
34484 WithLatestFromOperator.prototype.call = function (subscriber, source) {
34485 return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
34486 };
34487 return WithLatestFromOperator;
34488}());
34489var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
34490 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WithLatestFromSubscriber, _super);
34491 function WithLatestFromSubscriber(destination, observables, project) {
34492 var _this = _super.call(this, destination) || this;
34493 _this.observables = observables;
34494 _this.project = project;
34495 _this.toRespond = [];
34496 var len = observables.length;
34497 _this.values = new Array(len);
34498 for (var i = 0; i < len; i++) {
34499 _this.toRespond.push(i);
34500 }
34501 for (var i = 0; i < len; i++) {
34502 var observable = observables[i];
34503 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, observable, observable, i));
34504 }
34505 return _this;
34506 }
34507 WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34508 this.values[outerIndex] = innerValue;
34509 var toRespond = this.toRespond;
34510 if (toRespond.length > 0) {
34511 var found = toRespond.indexOf(outerIndex);
34512 if (found !== -1) {
34513 toRespond.splice(found, 1);
34514 }
34515 }
34516 };
34517 WithLatestFromSubscriber.prototype.notifyComplete = function () {
34518 };
34519 WithLatestFromSubscriber.prototype._next = function (value) {
34520 if (this.toRespond.length === 0) {
34521 var args = [value].concat(this.values);
34522 if (this.project) {
34523 this._tryProject(args);
34524 }
34525 else {
34526 this.destination.next(args);
34527 }
34528 }
34529 };
34530 WithLatestFromSubscriber.prototype._tryProject = function (args) {
34531 var result;
34532 try {
34533 result = this.project.apply(this, args);
34534 }
34535 catch (err) {
34536 this.destination.error(err);
34537 return;
34538 }
34539 this.destination.next(result);
34540 };
34541 return WithLatestFromSubscriber;
34542}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
34543//# sourceMappingURL=withLatestFrom.js.map
34544
34545
34546/***/ }),
34547/* 365 */
34548/***/ (function(module, __webpack_exports__, __webpack_require__) {
34549
34550"use strict";
34551__webpack_require__.r(__webpack_exports__);
34552/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
34553/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(267);
34554/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
34555
34556function zip() {
34557 var observables = [];
34558 for (var _i = 0; _i < arguments.length; _i++) {
34559 observables[_i] = arguments[_i];
34560 }
34561 return function zipOperatorFunction(source) {
34562 return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"].apply(void 0, [source].concat(observables)));
34563 };
34564}
34565//# sourceMappingURL=zip.js.map
34566
34567
34568/***/ }),
34569/* 366 */
34570/***/ (function(module, __webpack_exports__, __webpack_require__) {
34571
34572"use strict";
34573__webpack_require__.r(__webpack_exports__);
34574/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
34575/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(267);
34576/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
34577
34578function zipAll(project) {
34579 return function (source) { return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); };
34580}
34581//# sourceMappingURL=zipAll.js.map
34582
34583
34584/***/ }),
34585/* 367 */,
34586/* 368 */,
34587/* 369 */
34588/***/ (function(module, exports, __webpack_require__) {
34589
34590"use strict";
34591
34592var __importDefault = (this && this.__importDefault) || function (mod) {
34593 return (mod && mod.__esModule) ? mod : { "default": mod };
34594};
34595Object.defineProperty(exports, "__esModule", { value: true });
34596var fast_glob_1 = __importDefault(__webpack_require__(61));
34597var os_1 = __importDefault(__webpack_require__(14));
34598var path_1 = __webpack_require__(13);
34599var rxjs_1 = __webpack_require__(166);
34600var operators_1 = __webpack_require__(269);
34601var vscode_uri_1 = __webpack_require__(149);
34602var fs_1 = __webpack_require__(40);
34603var constant_1 = __webpack_require__(44);
34604var util_1 = __webpack_require__(47);
34605var indexes = {};
34606var indexesFiles = {};
34607var queue = [];
34608var source$;
34609var gap = 100;
34610var count = 3;
34611var customProjectRootPatterns = constant_1.projectRootPatterns;
34612function initSource() {
34613 if (source$) {
34614 return;
34615 }
34616 source$ = new rxjs_1.Subject();
34617 source$.pipe(operators_1.concatMap(function (uri) {
34618 return rxjs_1.from(util_1.findProjectRoot(vscode_uri_1.URI.parse(uri).fsPath, customProjectRootPatterns)).pipe(operators_1.switchMap(function (projectRoot) {
34619 return rxjs_1.from(util_1.getRealPath(projectRoot));
34620 }), operators_1.filter(function (projectRoot) { return projectRoot && projectRoot !== os_1.default.homedir(); }), operators_1.map(function (projectRoot) { return ({
34621 uri: uri,
34622 projectRoot: projectRoot,
34623 }); }));
34624 }), operators_1.filter(function (_a) {
34625 var projectRoot = _a.projectRoot;
34626 if (!indexes[projectRoot]) {
34627 indexes[projectRoot] = true;
34628 return true;
34629 }
34630 return false;
34631 }), operators_1.concatMap(function (_a) {
34632 var projectRoot = _a.projectRoot;
34633 var indexPath = path_1.join(projectRoot, "**/*.vim");
34634 return rxjs_1.from(fast_glob_1.default([indexPath, "!**/node_modules/**"])).pipe(operators_1.catchError(function (error) {
34635 process.send({
34636 msglog: [
34637 "Index Workspace Error: " + indexPath,
34638 "Error => " + (error.stack || error.message || error),
34639 ].join("\n"),
34640 });
34641 return rxjs_1.of(undefined);
34642 }), operators_1.filter(function (list) { return list && list.length > 0; }), operators_1.concatMap(function (list) {
34643 return rxjs_1.of.apply(void 0, list.sort(function (a, b) { return a.length - b.length; })).pipe(operators_1.filter(function (fpath) {
34644 if (!indexesFiles[fpath]) {
34645 indexesFiles[fpath] = true;
34646 return true;
34647 }
34648 return false;
34649 }), operators_1.mergeMap(function (fpath) {
34650 return rxjs_1.timer(gap).pipe(operators_1.concatMap(function () {
34651 var content = fs_1.readFileSync(fpath).toString();
34652 return rxjs_1.from(util_1.handleParse(content)).pipe(operators_1.filter(function (res) { return res[0] !== null; }), operators_1.map(function (res) { return ({
34653 node: res[0],
34654 uri: vscode_uri_1.URI.file(fpath).toString(),
34655 }); }), operators_1.catchError(function (error) {
34656 process.send({
34657 msglog: fpath + ":\n" + (error.stack || error.message || error),
34658 });
34659 return rxjs_1.of(undefined);
34660 }));
34661 }));
34662 }, count));
34663 }));
34664 }), operators_1.filter(function (res) { return !!res; })).subscribe(function (res) {
34665 process.send({
34666 data: res,
34667 });
34668 }, function (error) {
34669 process.send({
34670 msglog: error.stack || error.message || error,
34671 });
34672 });
34673 if (queue.length) {
34674 queue.forEach(function (uri) {
34675 source$.next(uri);
34676 });
34677 queue = [];
34678 }
34679}
34680process.on("message", function (mess) {
34681 var uri = mess.uri, config = mess.config;
34682 if (uri) {
34683 if (source$) {
34684 source$.next(uri);
34685 }
34686 else {
34687 queue.push(uri);
34688 }
34689 }
34690 if (config) {
34691 if (config.gap !== undefined) {
34692 gap = config.gap;
34693 }
34694 if (config.count !== undefined) {
34695 count = config.count;
34696 }
34697 if (config.projectRootPatterns !== undefined) {
34698 customProjectRootPatterns = config.projectRootPatterns;
34699 }
34700 initSource();
34701 }
34702});
34703
34704
34705/***/ })
34706/******/ ])));
\No newline at end of file