{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 7599769a06d16786a8c7","webpack:///../../../../src/core/api_error.ts","webpack:///../../../../src/core/file_flag.ts","webpack:///../../../../src/core/node_fs_stats.ts","webpack:///../../../../src/core/FS.ts","webpack:///../../../../src/core/node_fs.ts","webpack:///../../../../src/core/levenshtein.ts","webpack:///../../../../src/core/util.ts","webpack:///../../../../src/generic/emscripten_fs.ts","webpack:///../../../../src/core/file_system.ts","webpack:///../../../../src/core/file.ts","webpack:///../../../../src/generic/preload_file.ts","webpack:///../../../../src/backend/AsyncMirror.ts","webpack:///../../../../~/lodash-es/_apply.js","webpack:///../../../../~/lodash-es/_overRest.js","webpack:///../../../../~/lodash-es/identity.js","webpack:///../../../../~/async-es/internal/rest.js","webpack:///../../../../~/async-es/internal/initialParams.js","webpack:///../../../../~/async-es/internal/applyEach.js","webpack:///../../../../~/lodash-es/_freeGlobal.js","webpack:///../../../../~/lodash-es/_root.js","webpack:///../../../../~/lodash-es/_Symbol.js","webpack:///../../../../~/lodash-es/_getRawTag.js","webpack:///../../../../~/lodash-es/_objectToString.js","webpack:///../../../../~/lodash-es/_baseGetTag.js","webpack:///../../../../~/lodash-es/isObject.js","webpack:///../../../../~/lodash-es/isFunction.js","webpack:///../../../../~/lodash-es/isLength.js","webpack:///../../../../~/lodash-es/isArrayLike.js","webpack:///../../../../~/async-es/internal/breakLoop.js","webpack:///../../../../~/lodash-es/noop.js","webpack:///../../../../~/async-es/internal/once.js","webpack:///../../../../~/async-es/internal/getIterator.js","webpack:///../../../../~/lodash-es/_baseTimes.js","webpack:///../../../../~/lodash-es/isObjectLike.js","webpack:///../../../../~/lodash-es/_baseIsArguments.js","webpack:///../../../../~/lodash-es/isArguments.js","webpack:///../../../../~/lodash-es/isArray.js","webpack:///../../../../~/lodash-es/stubFalse.js","webpack:///../../../../~/lodash-es/isBuffer.js","webpack:///../../../../~/lodash-es/_isIndex.js","webpack:///../../../../~/lodash-es/_baseIsTypedArray.js","webpack:///../../../../~/lodash-es/_baseUnary.js","webpack:///../../../../~/lodash-es/_nodeUtil.js","webpack:///../../../../~/lodash-es/isTypedArray.js","webpack:///../../../../~/lodash-es/_arrayLikeKeys.js","webpack:///../../../../~/lodash-es/_isPrototype.js","webpack:///../../../../~/lodash-es/_overArg.js","webpack:///../../../../~/lodash-es/_nativeKeys.js","webpack:///../../../../~/lodash-es/_baseKeys.js","webpack:///../../../../~/lodash-es/keys.js","webpack:///../../../../~/async-es/internal/iterator.js","webpack:///../../../../~/async-es/internal/onlyOnce.js","webpack:///../../../../~/async-es/internal/eachOfLimit.js","webpack:///../../../../~/async-es/eachOfLimit.js","webpack:///../../../../~/async-es/internal/doLimit.js","webpack:///../../../../~/async-es/eachOf.js","webpack:///../../../../~/async-es/internal/doParallel.js","webpack:///../../../../~/async-es/internal/map.js","webpack:///../../../../~/async-es/map.js","webpack:///../../../../~/async-es/applyEach.js","webpack:///../../../../~/async-es/internal/doParallelLimit.js","webpack:///../../../../~/async-es/mapLimit.js","webpack:///../../../../~/async-es/mapSeries.js","webpack:///../../../../~/async-es/applyEachSeries.js","webpack:///../../../../~/async-es/apply.js","webpack:///../../../../~/lodash-es/_arrayEach.js","webpack:///../../../../~/lodash-es/_createBaseFor.js","webpack:///../../../../~/lodash-es/_baseFor.js","webpack:///../../../../~/lodash-es/_baseForOwn.js","webpack:///../../../../~/lodash-es/_baseFindIndex.js","webpack:///../../../../~/lodash-es/_baseIsNaN.js","webpack:///../../../../~/lodash-es/_strictIndexOf.js","webpack:///../../../../~/lodash-es/_baseIndexOf.js","webpack:///../../../../~/async-es/auto.js","webpack:///../../../../~/lodash-es/_arrayMap.js","webpack:///../../../../~/lodash-es/_baseSlice.js","webpack:///../../../../~/lodash-es/_asciiToArray.js","webpack:///../../../../~/lodash-es/_hasUnicode.js","webpack:///../../../../~/lodash-es/_unicodeToArray.js","webpack:///../../../../~/async-es/internal/setImmediate.js","webpack:///../../../../~/async-es/internal/DoublyLinkedList.js","webpack:///../../../../~/async-es/eachOfSeries.js","webpack:///../../../../~/async-es/reduce.js","webpack:///../../../../~/async-es/seq.js","webpack:///../../../../~/async-es/compose.js","webpack:///../../../../~/async-es/concat.js","webpack:///../../../../~/async-es/concatSeries.js","webpack:///../../../../~/async-es/constant.js","webpack:///../../../../~/async-es/detect.js","webpack:///../../../../~/async-es/detectLimit.js","webpack:///../../../../~/async-es/detectSeries.js","webpack:///../../../../~/async-es/internal/consoleFunc.js","webpack:///../../../../~/async-es/dir.js","webpack:///../../../../~/async-es/internal/withoutIndex.js","webpack:///../../../../~/async-es/each.js","webpack:///../../../../~/async-es/eachSeries.js","webpack:///../../../../~/async-es/every.js","webpack:///../../../../~/async-es/everyLimit.js","webpack:///../../../../~/async-es/everySeries.js","webpack:///../../../../~/lodash-es/_baseProperty.js","webpack:///../../../../~/async-es/filter.js","webpack:///../../../../~/async-es/filterLimit.js","webpack:///../../../../~/async-es/filterSeries.js","webpack:///../../../../~/async-es/log.js","webpack:///../../../../~/async-es/mapValues.js","webpack:///../../../../~/async-es/mapValuesSeries.js","webpack:///../../../../~/async-es/nextTick.js","webpack:///../../../../~/async-es/setImmediate.js","webpack:///../../../../~/async-es/queue.js","webpack:///../../../../~/async-es/priorityQueue.js","webpack:///../../../../~/async-es/reject.js","webpack:///../../../../~/async-es/rejectLimit.js","webpack:///../../../../~/async-es/rejectSeries.js","webpack:///../../../../~/lodash-es/constant.js","webpack:///../../../../~/async-es/retryable.js","webpack:///../../../../~/async-es/some.js","webpack:///../../../../~/async-es/someLimit.js","webpack:///../../../../~/async-es/someSeries.js","webpack:///../../../../~/lodash-es/_baseRange.js","webpack:///../../../../~/async-es/times.js","webpack:///../../../../~/async-es/timesSeries.js","webpack:///../../../../~/async-es/unmemoize.js","webpack:///../../../../~/async-es/waterfall.js","webpack:///../../../../~/async-es/index.js","webpack:///../../../../src/backend/Dropbox.ts","webpack:///../../../../src/backend/Emscripten.ts","webpack:///../../../../src/backend/FolderAdapter.ts","webpack:///../../../../src/core/global.ts","webpack:///../../../../src/backend/HTML5FS.ts","webpack:///../../../../src/generic/inode.ts","webpack:///../../../../src/generic/key_value_filesystem.ts","webpack:///../../../../src/backend/InMemory.ts","webpack:///../../../../src/backend/IndexedDB.ts","webpack:///../../../../src/backend/LocalStorage.ts","webpack:///../../../../src/backend/MountableFileSystem.ts","webpack:///../../../../src/generic/setImmediate.ts","webpack:///../../../../src/generic/mutex.ts","webpack:///../../../../src/generic/locked_fs.ts","webpack:///../../../../src/backend/OverlayFS.ts","webpack:///../../../../src/backend/WorkerFS.ts","webpack:///../../../../src/generic/xhr.ts","webpack:///../../../../src/generic/file_index.ts","webpack:///../../../../src/backend/XmlHttpRequest.ts","webpack:///../../../../src/generic/extended_ascii.ts","webpack:///../../../../src/backend/ZipFS.ts","webpack:///../../../../src/backend/IsoFS.ts","webpack:///../../../../src/core/backends.ts","webpack:///../../../../src/core/browserfs.ts","webpack:///../../../../src/index.ts","webpack:///./build/temp/library/webpack/BFSBuffer.js","webpack:///./~/buffer/index.js","webpack:///./~/base64-js/index.js","webpack:///./~/ieee754/index.js","webpack:///(webpack)/buildin/module.js","webpack:///../ts/index.ts","webpack:///../ts/process.ts","webpack:///./~/events/events.js","webpack:///../ts/path.ts","webpack:///../ts/tty.ts","webpack:///./~/stream-browserify/index.js","webpack:///./~/inherits/inherits_browser.js","webpack:///./~/readable-stream/readable.js","webpack:///./~/readable-stream/lib/_stream_readable.js","webpack:///./~/process-nextick-args/index.js","webpack:///./~/isarray/index.js","webpack:///./~/buffer-shims/index.js","webpack:///./~/core-util-is/lib/util.js","webpack:///util (ignored)","webpack:///./~/readable-stream/lib/internal/streams/BufferList.js","webpack:///./~/readable-stream/lib/_stream_duplex.js","webpack:///./~/readable-stream/lib/_stream_writable.js","webpack:///./~/util-deprecate/browser.js","webpack:///./~/string_decoder/index.js","webpack:///./~/readable-stream/lib/_stream_transform.js","webpack:///./~/readable-stream/lib/_stream_passthrough.js","webpack:///./~/readable-stream/writable.js","webpack:///./~/readable-stream/duplex.js","webpack:///./~/readable-stream/transform.js","webpack:///./~/readable-stream/passthrough.js","webpack:///./~/pako/lib/inflate.js","webpack:///./~/pako/lib/zlib/inflate.js","webpack:///./~/pako/lib/utils/common.js","webpack:///./~/pako/lib/zlib/adler32.js","webpack:///./~/pako/lib/zlib/crc32.js","webpack:///./~/pako/lib/zlib/inffast.js","webpack:///./~/pako/lib/zlib/inftrees.js","webpack:///./~/pako/lib/utils/strings.js","webpack:///./~/pako/lib/zlib/constants.js","webpack:///./~/pako/lib/zlib/messages.js","webpack:///./~/pako/lib/zlib/zstream.js","webpack:///./~/pako/lib/zlib/gzheader.js"],"names":["const","path","super","buffer","let","path.resolve","this","dd","y","bx0","dy","path.dirname","fs","path.sep","path.join","overRest","_overRest","applyEach","Symbol","symToStringTag","objectProto","nativeObjectToString","hasOwnProperty","Buffer","MAX_SAFE_INTEGER","argsTag","funcTag","freeExports","freeModule","moduleExports","map","eachOfLimit","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsZWJ","withoutIndex","_defer","nativeMax","asyncEach","path.relative","global","convertError","path.basename","dir","0o222","0o777","0o644","arguments","setImmediate","Dropbox","Emscripten","InMemory","IndexedDB","LocalStorage","Errors.ApiError","Errors.ErrorCode"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;ACtCA;;;;;;;;;KAKA,IAAY,SAgBX;AAhBD,YAAY,SAAS;KACnB,2CAAa;KACb,6CAAa;KACb,uCAAa;KACb,2CAAa;KACb,8CAAc;KACd,4CAAc;KACd,8CAAc;KACd,gDAAc;KACd,8CAA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ACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAqB,mDAAmD;AACxE;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,wCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;AACA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAAyC;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAwB,eAAe;AACvC;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,yBAAwB,QAAQ;AAChC;AACA,sBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,sBAAqB,QAAQ;AAC7B;AACA;AACA,IAAG;AACH;AACA,gBAAe,SAAS;AACxB;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,oBAAmB,SAAS;AAC5B;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,YAAY;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACjrDA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mCAAkC,SAAS;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA,qBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA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A,IAAG;AACH;AACA;AACA;AACA,gBAAe,SAAS;AACxB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAG;AACH,qBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC1SA,kEAAiE;AACjE,uCAAsC;AACtC,KAAI,WAAW,GAAG,+DAA+D,CAAC;AAClF,yBAAwB,QAAgB;KACtC,IAAI,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACrC,GAAG,CAAC,KAAK,EAAE,CAAC;KACZ,MAAM,CAAC,GAAG,CAAC;AACb,EAAC;AAED;;;;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ACA;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtBA;AACA;AACA,oCAAkC;AAClC,IAAG;AACH,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACfA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG,aAAa;AAChB;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,4EAA2E,6EAA6E;AACxJ;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,uDAAsD;;AAEtD;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA4E;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,8DAA6D;AAC7D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAsC;;AAEtC;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA2D;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,gDAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,SAAS;AAC5B;AACA,MAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA,6EAA4E;;AAE5E;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oDAAmD;AACnD;AACA,oDAAmD,iEAAiE;AACpH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA;AACA;AACA,wCAAuC;AACvC,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAuC;AACvC,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAgC,OAAO;AACvC;AACA;AACA;;AAEA;AACA,iCAAgC,OAAO;AACvC;AACA;AACA;AACA,E;;;;;;;AC56BA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;;;;;;;AC1CA,kBAAiB;;AAEjB;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;;;;;;AC1GA,gB;;;;;;ACAA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe;AACf,+CAA8C;AAC9C;AACA;AACA;;AAEA;AACA,gBAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uDAAsD;AACtD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AC/DA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iCAAgC,OAAO;AACvC;AACA;AACA,E;;;;;;AC1EA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG,aAAa;AAChB;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL,IAAG;AACH,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH,EAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,kCAAiC;;AAEjC;;AAEA,4CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAmD;AACnD;AACA;;AAEA;AACA;AACA,qCAAoC;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,qDAAoD;AACpD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,E;;;;;;;;ACriBA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB,cAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAQ,OAAO;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AC5NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,YAAY;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK,EAAE;AACP,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,E;;;;;;ACrLA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,G;;;;;;ACzBA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,UAAU;AAC7C;AACA;AACA,+BAA8B;AAC9B;AACA,sBAAqB,8BAA8B;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG,eAAe;;AAElB;;AAEA;AACA;AACA;AACA;AACA,gCAA+B,sBAAsB;AACrD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAkB;AAClB,oBAAmB;AACnB,uBAAsB;AACtB,oBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAmB,cAAc;AACjC;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,uDAAsD;;AAEtD;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,sBAAqB,kEAAkE;;AAEvF;;AAEA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,sBAAqB,yCAAyC;;AAE9D;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;ACjaA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA,yBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;;AAGA,iBAAgB;AAChB,kBAAiB;AACjB,iBAAgB;AAChB,eAAc;AACd,kBAAiB;AACjB,kBAAiB;AACjB,iBAAgB;AAChB,oBAAmB;AACnB,iBAAgB;AAChB,oBAAmB;AACnB,kBAAiB;AACjB,sBAAqB;AACrB,wBAAuB;AACvB,wBAAuB;AACvB,uBAAsB;AACtB,sBAAqB;AACrB,uBAAsB;AACtB,yBAAwB;AACxB,0BAAyB;AACzB,0BAAyB;AACzB,yBAAwB;AACxB,4BAA2B;AAC3B,0BAAyB;AACzB,6BAA4B;AAC5B,2BAA0B;AAC1B,yBAAwB;AACxB,mBAAkB;AAClB,oBAAmB;AACnB,kBAAiB;AACjB,iBAAgB;AAChB,iBAAgB;AAChB,kBAAiB;;AAEjB;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,iBAAgB;AAChB,qBAAoB;AACpB,iBAAgB;AAChB,yBAAwB;AACxB,kBAAiB;AACjB,iBAAgB;AAChB,kBAAiB;AACjB,kBAAiB;AACjB;AACA,oBAAmB;;AAEnB;AACA,kBAAiB;AACjB,kBAAiB;AACjB,kBAAiB;AACjB,kBAAiB;AACjB,sBAAqB;;AAErB;AACA,iBAAgB;AAChB,iBAAgB;;AAEhB;AACA,mBAAkB;AAClB,mBAAkB;;AAElB;AACA,kBAAiB;;AAEjB;AACA,uBAAsB;AACtB,wBAAuB;AACvB,oBAAmB;AACnB,qBAAoB;;AAEpB;AACA,kBAAiB;AACjB,iBAAgB;AAChB,kBAAiB;AACjB,iBAAgB;AAChB,oBAAmB;;AAEnB,oCAAmC;AACnC,oCAAmC;;AAEnC;AACA;AACA;AACA;AACA,0CAAyC;AACzC,sBAAqB;AACrB,uBAAsB;AACtB,iBAAgB;AAChB,iBAAgB;AAChB,gBAAe;AACf;;AAEA;AACA;;AAEA,8BAA6B,uBAAuB;AACpD;AACA;AACA,iBAAgB;AAChB,oBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,8BAA6B,uBAAuB;AACpD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,8BAA6B,uBAAuB;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAc,uBAAuB;AACrC,uBAAsB;;AAEtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAoB;;AAEpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wBAAuB,uBAAuB;AAC9C,wBAAuB,uBAAuB;AAC9C,wBAAuB,uBAAuB;AAC9C,wBAAuB,uBAAuB;;AAE9C,wEAAuE,UAAU;;AAEjF;AACA;AACA,uBAAsB,uBAAuB;;AAE7C,wEAAuE,UAAU;;AAEjF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAwC,iBAAiB;AACzD,uCAAsC,qBAAqB;AAC3D;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAoB;AACpB,YAAW;AACX,WAAU;AACV,kBAAiB;AACjB,YAAW;AACX,YAAW;AACX,iBAAgB;AAChB,YAAW;AACX,YAAW;AACX;AACA,gBAAe;AACf,oCAAmC;AACnC,cAAa;AACb,oCAAmC;AACnC,WAAU;AACV,WAAU;AACV,gCAA+B;AAC/B;;AAEA,SAAQ;;AAER;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,6BAA4B,qBAAqB,EAAE;;;AAGnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B;AAC3B;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B,aAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;AACA,mBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B;AAC3B;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAmD,iBAAiB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;AACxB;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B,aAAa;AACvC,2BAA0B,aAAa;AACvC,0BAAyB,iBAAiB;AAC1C,wCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA,yDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf,mEAAkE;AAClE;AACA;AACA;;AAEA,qCAAoC,OAAO;AAC3C;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAA+B,OAAO;;AAEtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,iEAAgE;AAChE;AACA;AACA;;AAEA,iCAAgC,OAAO;AACvC;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA;;AAEA,iDAAgD,OAAO;AACvD;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb,mEAAkE;AAClE;AACA;AACA;;AAEA,mCAAkC,OAAO;AACzC;AACA,0BAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA;;AAEA,iDAAgD,OAAO;AACvD;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,iBAAiB;AACxC;AACA,iCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,qBAAqB;AAC3D,+BAA8B,aAAa;AAC3C;AACA;AACA;AACA;AACA,cAAa;AACb,sCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC,qBAAqB;AACvD;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA,yBAAwB,aAAa;AACrC;AACA;AACA;AACA;AACA,QAAO;AACP,gCAA+B,kBAAkB;AACjD;AACA;AACA,wBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAsD;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA6B,uBAAuB;AACpD;AACA,gCAA+B,uBAAuB;;AAEtD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,8DAA6D,uBAAuB;AACpF;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAe;AACf,yDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjgDA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,mBAAkB,UAAU;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,6BAA4B,YAAY;AACxC,sBAAqB,8BAA8B;AACnD;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,SAAS;AAC5B;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mCAAkC,OAAO;AACzC;AACA;;AAEA;AACA;AACA;AACA,mCAAkC,OAAO;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,SAAS;AAC5B;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACrGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;;;AAGA;;;;;;;AC/BA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA,kBAAiB,SAAS;AAC1B;AACA,oBAAmB,OAAO;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA,oBAAmB,SAAS;AAC5B;AACA;;AAEA,uBAAsB;AACtB;;;AAGA;;;;;;;ACxCA;;AAEA;AACA,cAAa;AACb,eAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV,YAAW;AACX,YAAW;AACX,WAAU;AACV,WAAU;AACV;AACA,YAAW;AACX;AACA,aAAY;AACZ,aAAY;AACZ,aAAY;AACZ;AACA,gBAAe;AACf,YAAW;AACX,YAAW;AACX,aAAY;AACZ,aAAY;AACZ,aAAY;AACZ,aAAY;AACZ,YAAW;AACX,UAAS;AACT;AACA,WAAU;AACV,YAAW;AACX,YAAW;AACX;;;AAGA,qBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAW,GAAG;AACd;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,GAAG;AAClB;AACA;AACA;AACA;;AAEA,yBAAwB;AACxB;AACA,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA4B;AAC5B,6BAA4B;AAC5B,8BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,oBAAmB;AACnB;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA;AACA;AACA,wBAAuB;AACvB;AACA,iCAAgC;AAChC;AACA,gCAA+B;AAC/B;AACA;AACA;AACA,oBAAmB;AACnB,sCAAqC;AACrC;AACA;AACA;AACA,qCAAoC;AACpC;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA,oBAAmB;AACnB;AACA,qCAAoC;AACpC;AACA;AACA;AACA;AACA,sBAAqB;AACrB,wCAAuC;AACvC;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA,gCAA+B;AAC/B;AACA;AACA;AACA,oBAAmB;AACnB,sCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC;AACjC,mBAAkB;AAClB;AACA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA,kCAAiC;AACjC;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAY;AACZ;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrUA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAAyB;;AAEzB,eAAc;AACd,eAAc;AACd,wBAAuB;AACvB,gBAAe;AACf,gBAAe;AACf,gBAAe;AACf,gBAAe;AACf,gBAAe;AACf,gBAAe;AACf,YAAW;AACX,YAAW;AACX,WAAU;AACV,YAAW;AACX,YAAW;AACX,mBAAkB;AAClB;AACA,kBAAiB;AACjB,WAAU;AACV,4CAA2C,eAAe;AAC1D,2CAA0C,eAAe;AACzD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,gBAAgB;AAC/B;AACA;AACA,gBAAe,aAAa;AAC5B;AACA;;AAEA;AACA;AACA,sBAAqB,UAAU;AAC/B,4BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA,mBAAkB;AAClB,uCAAsC,2BAA2B;AACjE,wCAAuC;AACvC,yCAAwC;AACxC;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,cAAa;AACb;AACA,gBAAe,WAAW;AAC1B,4BAA2B,OAAO;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,eAAc;AACd;;AAEA;AACA;AACA,gBAAe,eAAe;AAC9B;AACA;;AAEA;AACA,gBAAe,aAAa;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yBAAwB;AACxB;;AAEA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,IAAG,OAAO;AACV;AACA;AACA;AACA;;AAEA;AACA,YAAW;AACX,WAAU;AACV,aAAY;AACZ,sBAAqB;AACrB,eAAc;AACd,YAAW;AACX,YAAW;AACX,oBAAmB;AACnB,mBAAkB;;AAElB;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,yBAAwB,OAAO;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,yBAAwB,OAAO;AAC/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAA+C;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACpUA;AACA;;;AAGA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAK,wCAAwC,EAAE,aAAa,sBAAsB;AAClF,MAAK,oDAAoD,EAAE,aAAa,0BAA0B;;;AAGlG;AACA;AACA;AACA;AACA,gBAAe,SAAS;AACxB;AACA;AACA,mCAAkC;;;AAGlC;AACA;AACA;;AAEA;AACA,kBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAwB,aAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAsB,SAAS;AAC/B;AACA;AACA,oBAAmB,qBAAqB,UAAU;;AAElD;AACA;AACA,qBAAoB,0BAA0B,gBAAgB,UAAU;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAoB,0BAA0B,UAAU;;AAExD;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAAyB,kBAAkB;;AAE3C;AACA;AACA,mDAAkD,OAAO;;AAEzD;AACA;AACA,iBAAgB,YAAY;;AAE5B;AACA;AACA,mBAAkB,YAAY;;AAE9B;AACA;;;;;;;ACxLA;;;AAGA;;AAEA,2BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;ACjDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACZA;;;AAGA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","file":"../build/browserfs.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"BrowserFS\"] = factory();\n\telse\n\t\troot[\"BrowserFS\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7599769a06d16786a8c7","/**\n * Standard libc error codes. Add more to this enum and ErrorStrings as they are\n * needed.\n * @url http://www.gnu.org/software/libc/manual/html_node/Error-Codes.html\n */\nexport enum ErrorCode {\n EPERM = 1,\n ENOENT = 2,\n EIO = 5,\n EBADF = 9,\n EACCES = 13,\n EBUSY = 16,\n EEXIST = 17,\n ENOTDIR = 20,\n EISDIR = 21,\n EINVAL = 22,\n EFBIG = 27,\n ENOSPC = 28,\n EROFS = 30,\n ENOTEMPTY = 39,\n ENOTSUP = 95,\n}\n/* tslint:disable:variable-name */\n/**\n * Strings associated with each error code.\n * @hidden\n */\nexport const ErrorStrings: {[code: string]: string; [code: number]: string; } = {};\nErrorStrings[ErrorCode.EPERM] = 'Operation not permitted.';\nErrorStrings[ErrorCode.ENOENT] = 'No such file or directory.';\nErrorStrings[ErrorCode.EIO] = 'Input/output error.';\nErrorStrings[ErrorCode.EBADF] = 'Bad file descriptor.';\nErrorStrings[ErrorCode.EACCES] = 'Permission denied.';\nErrorStrings[ErrorCode.EBUSY] = 'Resource busy or locked.';\nErrorStrings[ErrorCode.EEXIST] = 'File exists.';\nErrorStrings[ErrorCode.ENOTDIR] = 'File is not a directory.';\nErrorStrings[ErrorCode.EISDIR] = 'File is a directory.';\nErrorStrings[ErrorCode.EINVAL] = 'Invalid argument.';\nErrorStrings[ErrorCode.EFBIG] = 'File is too big.';\nErrorStrings[ErrorCode.ENOSPC] = 'No space left on disk.';\nErrorStrings[ErrorCode.EROFS] = 'Cannot modify a read-only file system.';\nErrorStrings[ErrorCode.ENOTEMPTY] = 'Directory is not empty.';\nErrorStrings[ErrorCode.ENOTSUP] = 'Operation is not supported.';\n/* tslint:enable:variable-name */\n\n/**\n * Represents a BrowserFS error. Passed back to applications after a failed\n * call to the BrowserFS API.\n */\nexport class ApiError extends Error implements NodeJS.ErrnoException {\n public static fromJSON(json: any): ApiError {\n const err = new ApiError(0);\n err.errno = json.errno;\n err.code = json.code;\n err.path = json.path;\n err.stack = json.stack;\n err.message = json.message;\n return err;\n }\n\n /**\n * Creates an ApiError object from a buffer.\n */\n public static fromBuffer(buffer: Buffer, i: number = 0): ApiError {\n return ApiError.fromJSON(JSON.parse(buffer.toString('utf8', i + 4, i + 4 + buffer.readUInt32LE(i))));\n }\n\n public static FileError(code: ErrorCode, p: string): ApiError {\n return new ApiError(code, ErrorStrings[code], p);\n }\n public static ENOENT(path: string): ApiError {\n return this.FileError(ErrorCode.ENOENT, path);\n }\n\n public static EEXIST(path: string): ApiError {\n return this.FileError(ErrorCode.EEXIST, path);\n }\n\n public static EISDIR(path: string): ApiError {\n return this.FileError(ErrorCode.EISDIR, path);\n }\n\n public static ENOTDIR(path: string): ApiError {\n return this.FileError(ErrorCode.ENOTDIR, path);\n }\n\n public static EPERM(path: string): ApiError {\n return this.FileError(ErrorCode.EPERM, path);\n }\n\n public static ENOTEMPTY(path: string): ApiError {\n return this.FileError(ErrorCode.ENOTEMPTY, path);\n }\n\n public errno: ErrorCode;\n public code: string;\n public path: string | undefined;\n // Unsupported.\n public syscall: string = \"\";\n public stack: string | undefined;\n\n /**\n * Represents a BrowserFS error. Passed back to applications after a failed\n * call to the BrowserFS API.\n *\n * Error codes mirror those returned by regular Unix file operations, which is\n * what Node returns.\n * @constructor ApiError\n * @param type The type of the error.\n * @param [message] A descriptive error message.\n */\n constructor(type: ErrorCode, message: string = ErrorStrings[type], path?: string) {\n super(message);\n this.errno = type;\n this.code = ErrorCode[type];\n this.path = path;\n this.stack = new Error().stack;\n this.message = `Error: ${this.code}: ${message}${this.path ? `, '${this.path}'` : ''}`;\n }\n\n /**\n * @return A friendly error message.\n */\n public toString(): string {\n return this.message;\n }\n\n public toJSON(): any {\n return {\n errno: this.errno,\n code: this.code,\n path: this.path,\n stack: this.stack,\n message: this.message\n };\n }\n\n /**\n * Writes the API error into a buffer.\n */\n public writeToBuffer(buffer: Buffer = Buffer.alloc(this.bufferSize()), i: number = 0): Buffer {\n const bytesWritten = buffer.write(JSON.stringify(this.toJSON()), i + 4);\n buffer.writeUInt32LE(bytesWritten, i);\n return buffer;\n }\n\n /**\n * The size of the API error in buffer-form in bytes.\n */\n public bufferSize(): number {\n // 4 bytes for string length.\n return 4 + Buffer.byteLength(JSON.stringify(this.toJSON()));\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/api_error.ts","import {ErrorCode, ApiError} from './api_error';\n\nexport enum ActionType {\n // Indicates that the code should not do anything.\n NOP = 0,\n // Indicates that the code should throw an exception.\n THROW_EXCEPTION = 1,\n // Indicates that the code should truncate the file, but only if it is a file.\n TRUNCATE_FILE = 2,\n // Indicates that the code should create the file.\n CREATE_FILE = 3\n}\n\n/**\n * Represents one of the following file flags. A convenience object.\n *\n * * `'r'` - Open file for reading. An exception occurs if the file does not exist.\n * * `'r+'` - Open file for reading and writing. An exception occurs if the file does not exist.\n * * `'rs'` - Open file for reading in synchronous mode. Instructs the filesystem to not cache writes.\n * * `'rs+'` - Open file for reading and writing, and opens the file in synchronous mode.\n * * `'w'` - Open file for writing. The file is created (if it does not exist) or truncated (if it exists).\n * * `'wx'` - Like 'w' but opens the file in exclusive mode.\n * * `'w+'` - Open file for reading and writing. The file is created (if it does not exist) or truncated (if it exists).\n * * `'wx+'` - Like 'w+' but opens the file in exclusive mode.\n * * `'a'` - Open file for appending. The file is created if it does not exist.\n * * `'ax'` - Like 'a' but opens the file in exclusive mode.\n * * `'a+'` - Open file for reading and appending. The file is created if it does not exist.\n * * `'ax+'` - Like 'a+' but opens the file in exclusive mode.\n *\n * Exclusive mode ensures that the file path is newly created.\n */\nexport class FileFlag {\n // Contains cached FileMode instances.\n private static flagCache: { [mode: string]: FileFlag } = {};\n // Array of valid mode strings.\n private static validFlagStrs = ['r', 'r+', 'rs', 'rs+', 'w', 'wx', 'w+', 'wx+', 'a', 'ax', 'a+', 'ax+'];\n\n /**\n * Get an object representing the given file flag.\n * @param modeStr The string representing the flag\n * @return The FileFlag object representing the flag\n * @throw when the flag string is invalid\n */\n public static getFileFlag(flagStr: string): FileFlag {\n // Check cache first.\n if (FileFlag.flagCache.hasOwnProperty(flagStr)) {\n return FileFlag.flagCache[flagStr];\n }\n return FileFlag.flagCache[flagStr] = new FileFlag(flagStr);\n }\n\n private flagStr: string;\n /**\n * This should never be called directly.\n * @param modeStr The string representing the mode\n * @throw when the mode string is invalid\n */\n constructor(flagStr: string) {\n this.flagStr = flagStr;\n if (FileFlag.validFlagStrs.indexOf(flagStr) < 0) {\n throw new ApiError(ErrorCode.EINVAL, \"Invalid flag: \" + flagStr);\n }\n }\n\n /**\n * Get the underlying flag string for this flag.\n */\n public getFlagString(): string {\n return this.flagStr;\n }\n\n /**\n * Returns true if the file is readable.\n */\n public isReadable(): boolean {\n return this.flagStr.indexOf('r') !== -1 || this.flagStr.indexOf('+') !== -1;\n }\n /**\n * Returns true if the file is writeable.\n */\n public isWriteable(): boolean {\n return this.flagStr.indexOf('w') !== -1 || this.flagStr.indexOf('a') !== -1 || this.flagStr.indexOf('+') !== -1;\n }\n /**\n * Returns true if the file mode should truncate.\n */\n public isTruncating(): boolean {\n return this.flagStr.indexOf('w') !== -1;\n }\n /**\n * Returns true if the file is appendable.\n */\n public isAppendable(): boolean {\n return this.flagStr.indexOf('a') !== -1;\n }\n /**\n * Returns true if the file is open in synchronous mode.\n */\n public isSynchronous(): boolean {\n return this.flagStr.indexOf('s') !== -1;\n }\n /**\n * Returns true if the file is open in exclusive mode.\n */\n public isExclusive(): boolean {\n return this.flagStr.indexOf('x') !== -1;\n }\n /**\n * Returns one of the static fields on this object that indicates the\n * appropriate response to the path existing.\n */\n public pathExistsAction(): ActionType {\n if (this.isExclusive()) {\n return ActionType.THROW_EXCEPTION;\n } else if (this.isTruncating()) {\n return ActionType.TRUNCATE_FILE;\n } else {\n return ActionType.NOP;\n }\n }\n /**\n * Returns one of the static fields on this object that indicates the\n * appropriate response to the path not existing.\n */\n public pathNotExistsAction(): ActionType {\n if ((this.isWriteable() || this.isAppendable()) && this.flagStr !== 'r+') {\n return ActionType.CREATE_FILE;\n } else {\n return ActionType.THROW_EXCEPTION;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/file_flag.ts","import * as fs from 'fs';\n\n/**\n * Indicates the type of the given file. Applied to 'mode'.\n */\nexport enum FileType {\n FILE = 0x8000,\n DIRECTORY = 0x4000,\n SYMLINK = 0xA000\n}\n\n/**\n * Emulation of Node's `fs.Stats` object.\n *\n * Attribute descriptions are from `man 2 stat'\n * @see http://nodejs.org/api/fs.html#fs_class_fs_stats\n * @see http://man7.org/linux/man-pages/man2/stat.2.html\n */\nexport default class Stats implements fs.Stats {\n public static fromBuffer(buffer: Buffer): Stats {\n const size = buffer.readUInt32LE(0),\n mode = buffer.readUInt32LE(4),\n atime = buffer.readDoubleLE(8),\n mtime = buffer.readDoubleLE(16),\n ctime = buffer.readDoubleLE(24);\n\n return new Stats(mode & 0xF000, size, mode & 0xFFF, new Date(atime), new Date(mtime), new Date(ctime));\n }\n\n public blocks: number;\n public mode: number;\n /**\n * UNSUPPORTED ATTRIBUTES\n * I assume no one is going to need these details, although we could fake\n * appropriate values if need be.\n */\n // ID of device containing file\n public dev: number = 0;\n // inode number\n public ino: number = 0;\n // device ID (if special file)\n public rdev: number = 0;\n // number of hard links\n public nlink: number = 1;\n // blocksize for file system I/O\n public blksize: number = 4096;\n // @todo Maybe support these? atm, it's a one-user filesystem.\n // user ID of owner\n public uid: number = 0;\n // group ID of owner\n public gid: number = 0;\n // time file was created (currently unsupported)\n public birthtime: Date = new Date(0);\n // XXX: Some file systems stash data on stats objects.\n public fileData: Buffer | null= null;\n\n /**\n * Provides information about a particular entry in the file system.\n * @param [Number] item_type type of the item (FILE, DIRECTORY, SYMLINK, or SOCKET)\n * @param [Number] size Size of the item in bytes. For directories/symlinks,\n * this is normally the size of the struct that represents the item.\n * @param [Number] mode Unix-style file mode (e.g. 0o644)\n * @param [Date?] atime time of last access\n * @param [Date?] mtime time of last modification\n * @param [Date?] ctime time of creation\n */\n constructor(\n itemType: FileType,\n public size: number,\n mode?: number,\n public atime: Date = new Date(),\n public mtime: Date = new Date(),\n public ctime: Date = new Date()) {\n if (!mode) {\n switch (itemType) {\n case FileType.FILE:\n this.mode = 0x1a4;\n break;\n case FileType.DIRECTORY:\n default:\n this.mode = 0x1ff;\n }\n } else {\n this.mode = mode;\n }\n // number of 512B blocks allocated\n this.blocks = Math.ceil(size / 512);\n // Check if mode also includes top-most bits, which indicate the file's\n // type.\n if (this.mode < 0x1000) {\n this.mode |= itemType;\n }\n }\n\n public toBuffer(): Buffer {\n const buffer = Buffer.alloc(32);\n buffer.writeUInt32LE(this.size, 0);\n buffer.writeUInt32LE(this.mode, 4);\n buffer.writeDoubleLE(this.atime.getTime(), 8);\n buffer.writeDoubleLE(this.mtime.getTime(), 16);\n buffer.writeDoubleLE(this.ctime.getTime(), 24);\n return buffer;\n }\n\n /**\n * **Nonstandard**: Clone the stats object.\n * @return [BrowserFS.node.fs.Stats]\n */\n public clone(): Stats {\n return new Stats(this.mode & 0xF000, this.size, this.mode & 0xFFF, this.atime, this.mtime, this.ctime);\n }\n\n /**\n * @return [Boolean] True if this item is a file.\n */\n public isFile(): boolean {\n return (this.mode & 0xF000) === FileType.FILE;\n }\n\n /**\n * @return [Boolean] True if this item is a directory.\n */\n public isDirectory(): boolean {\n return (this.mode & 0xF000) === FileType.DIRECTORY;\n }\n\n /**\n * @return [Boolean] True if this item is a symbolic link (only valid through lstat)\n */\n public isSymbolicLink(): boolean {\n return (this.mode & 0xF000) === FileType.SYMLINK;\n }\n\n /**\n * Change the mode of the file. We use this helper function to prevent messing\n * up the type of the file, which is encoded in mode.\n */\n public chmod(mode: number): void {\n this.mode = (this.mode & 0xF000) | mode;\n }\n\n // We don't support the following types of files.\n\n public isSocket(): boolean {\n return false;\n }\n\n public isBlockDevice(): boolean {\n return false;\n }\n\n public isCharacterDevice(): boolean {\n return false;\n }\n\n public isFIFO(): boolean {\n return false;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/node_fs_stats.ts","import {File} from './file';\nimport {ApiError, ErrorCode} from './api_error';\nimport {FileSystem, BFSOneArgCallback, BFSCallback, BFSThreeArgCallback} from './file_system';\nimport {FileFlag} from './file_flag';\nimport * as path from 'path';\nimport Stats from './node_fs_stats';\n\n// Typing info only.\nimport * as _fs from 'fs';\n\n/**\n * Wraps a callback function. Used for unit testing. Defaults to a NOP.\n * @hidden\n */\nlet wrapCb = function(cb: T, numArgs: number): T {\n return cb;\n};\n\n/**\n * @hidden\n */\nfunction assertRoot(fs?: FileSystem | null): FileSystem {\n if (fs) {\n return fs;\n }\n throw new ApiError(ErrorCode.EIO, `Initialize BrowserFS with a file system using BrowserFS.initialize(filesystem)`);\n}\n\n/**\n * @hidden\n */\nfunction normalizeMode(mode: number | string | null | undefined, def: number): number {\n switch (typeof mode) {\n case 'number':\n // (path, flag, mode, cb?)\n return mode;\n case 'string':\n // (path, flag, modeString, cb?)\n const trueMode = parseInt( mode, 8);\n if (!isNaN(trueMode)) {\n return trueMode;\n }\n // Invalid string.\n return def;\n default:\n return def;\n }\n}\n\n/**\n * @hidden\n */\nfunction normalizeTime(time: number | Date): Date {\n if (time instanceof Date) {\n return time;\n } else if (typeof time === 'number') {\n return new Date(time * 1000);\n } else {\n throw new ApiError(ErrorCode.EINVAL, `Invalid time.`);\n }\n}\n\n/**\n * @hidden\n */\nfunction normalizePath(p: string): string {\n // Node doesn't allow null characters in paths.\n if (p.indexOf('\\u0000') >= 0) {\n throw new ApiError(ErrorCode.EINVAL, 'Path must be a string without null bytes.');\n } else if (p === '') {\n throw new ApiError(ErrorCode.EINVAL, 'Path must not be empty.');\n }\n return path.resolve(p);\n}\n\n/**\n * @hidden\n */\nfunction normalizeOptions(options: any, defEnc: string | null, defFlag: string, defMode: number | null): {encoding: string; flag: string; mode: number} {\n switch (typeof options) {\n case 'object':\n return {\n encoding: typeof options['encoding'] !== 'undefined' ? options['encoding'] : defEnc,\n flag: typeof options['flag'] !== 'undefined' ? options['flag'] : defFlag,\n mode: normalizeMode(options['mode'], defMode!)\n };\n case 'string':\n return {\n encoding: options,\n flag: defFlag,\n mode: defMode!\n };\n default:\n return {\n encoding: defEnc!,\n flag: defFlag,\n mode: defMode!\n };\n }\n}\n\n/**\n * The default callback is a NOP.\n * @hidden\n * @private\n */\nfunction nopCb() {\n // NOP.\n}\n\n/**\n * The node frontend to all filesystems.\n * This layer handles:\n *\n * * Sanity checking inputs.\n * * Normalizing paths.\n * * Resetting stack depth for asynchronous operations which may not go through\n * the browser by wrapping all input callbacks using `setImmediate`.\n * * Performing the requested operation through the filesystem or the file\n * descriptor, as appropriate.\n * * Handling optional arguments and setting default arguments.\n * @see http://nodejs.org/api/fs.html\n */\nexport default class FS {\n /* tslint:disable:variable-name */\n // Exported fs.Stats.\n public static Stats = Stats;\n /* tslint:enable:variable-name */\n\n public F_OK: number = 0;\n public R_OK: number = 4;\n public W_OK: number = 2;\n public X_OK: number = 1;\n\n private root: FileSystem | null = null;\n private fdMap: {[fd: number]: File} = {};\n private nextFd = 100;\n\n public initialize(rootFS: FileSystem): FileSystem {\n if (!( rootFS).constructor.isAvailable()) {\n throw new ApiError(ErrorCode.EINVAL, 'Tried to instantiate BrowserFS with an unavailable file system.');\n }\n return this.root = rootFS;\n }\n\n /**\n * converts Date or number to a fractional UNIX timestamp\n * Grabbed from NodeJS sources (lib/fs.js)\n */\n public _toUnixTimestamp(time: Date | number): number {\n if (typeof time === 'number') {\n return time;\n } else if (time instanceof Date) {\n return time.getTime() / 1000;\n }\n throw new Error(\"Cannot parse time: \" + time);\n }\n\n /**\n * **NONSTANDARD**: Grab the FileSystem instance that backs this API.\n * @return [BrowserFS.FileSystem | null] Returns null if the file system has\n * not been initialized.\n */\n public getRootFS(): FileSystem | null {\n if (this.root) {\n return this.root;\n } else {\n return null;\n }\n }\n\n // FILE OR DIRECTORY METHODS\n\n /**\n * Asynchronous rename. No arguments other than a possible exception are given\n * to the completion callback.\n * @param oldPath\n * @param newPath\n * @param callback\n */\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n assertRoot(this.root).rename(normalizePath(oldPath), normalizePath(newPath), newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous rename.\n * @param oldPath\n * @param newPath\n */\n public renameSync(oldPath: string, newPath: string): void {\n assertRoot(this.root).renameSync(normalizePath(oldPath), normalizePath(newPath));\n }\n\n /**\n * Test whether or not the given path exists by checking with the file system.\n * Then call the callback argument with either true or false.\n * @example Sample invocation\n * fs.exists('/etc/passwd', function (exists) {\n * util.debug(exists ? \"it's there\" : \"no passwd!\");\n * });\n * @param path\n * @param callback\n */\n public exists(path: string, cb: (exists: boolean) => any = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n return assertRoot(this.root).exists(normalizePath(path), newCb);\n } catch (e) {\n // Doesn't return an error. If something bad happens, we assume it just\n // doesn't exist.\n return newCb(false);\n }\n }\n\n /**\n * Test whether or not the given path exists by checking with the file system.\n * @param path\n * @return [boolean]\n */\n public existsSync(path: string): boolean {\n try {\n return assertRoot(this.root).existsSync(normalizePath(path));\n } catch (e) {\n // Doesn't return an error. If something bad happens, we assume it just\n // doesn't exist.\n return false;\n }\n }\n\n /**\n * Asynchronous `stat`.\n * @param path\n * @param callback\n */\n public stat(path: string, cb: BFSCallback = nopCb): void {\n const newCb = wrapCb(cb, 2);\n try {\n return assertRoot(this.root).stat(normalizePath(path), false, newCb);\n } catch (e) {\n return newCb(e);\n }\n }\n\n /**\n * Synchronous `stat`.\n * @param path\n * @return [BrowserFS.node.fs.Stats]\n */\n public statSync(path: string): Stats {\n return assertRoot(this.root).statSync(normalizePath(path), false);\n }\n\n /**\n * Asynchronous `lstat`.\n * `lstat()` is identical to `stat()`, except that if path is a symbolic link,\n * then the link itself is stat-ed, not the file that it refers to.\n * @param path\n * @param callback\n */\n public lstat(path: string, cb: BFSCallback = nopCb): void {\n const newCb = wrapCb(cb, 2);\n try {\n return assertRoot(this.root).stat(normalizePath(path), true, newCb);\n } catch (e) {\n return newCb(e);\n }\n }\n\n /**\n * Synchronous `lstat`.\n * `lstat()` is identical to `stat()`, except that if path is a symbolic link,\n * then the link itself is stat-ed, not the file that it refers to.\n * @param path\n * @return [BrowserFS.node.fs.Stats]\n */\n public lstatSync(path: string): Stats {\n return assertRoot(this.root).statSync(normalizePath(path), true);\n }\n\n // FILE-ONLY METHODS\n\n /**\n * Asynchronous `truncate`.\n * @param path\n * @param len\n * @param callback\n */\n public truncate(path: string, cb?: BFSOneArgCallback): void;\n public truncate(path: string, len: number, cb?: BFSOneArgCallback): void;\n public truncate(path: string, arg2: any = 0, cb: BFSOneArgCallback = nopCb): void {\n let len = 0;\n if (typeof arg2 === 'function') {\n cb = arg2;\n } else if (typeof arg2 === 'number') {\n len = arg2;\n }\n\n const newCb = wrapCb(cb, 1);\n try {\n if (len < 0) {\n throw new ApiError(ErrorCode.EINVAL);\n }\n return assertRoot(this.root).truncate(normalizePath(path), len, newCb);\n } catch (e) {\n return newCb(e);\n }\n }\n\n /**\n * Synchronous `truncate`.\n * @param path\n * @param len\n */\n public truncateSync(path: string, len: number = 0): void {\n if (len < 0) {\n throw new ApiError(ErrorCode.EINVAL);\n }\n return assertRoot(this.root).truncateSync(normalizePath(path), len);\n }\n\n /**\n * Asynchronous `unlink`.\n * @param path\n * @param callback\n */\n public unlink(path: string, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n return assertRoot(this.root).unlink(normalizePath(path), newCb);\n } catch (e) {\n return newCb(e);\n }\n }\n\n /**\n * Synchronous `unlink`.\n * @param path\n */\n public unlinkSync(path: string): void {\n return assertRoot(this.root).unlinkSync(normalizePath(path));\n }\n\n /**\n * Asynchronous file open.\n * Exclusive mode ensures that path is newly created.\n *\n * `flags` can be:\n *\n * * `'r'` - Open file for reading. An exception occurs if the file does not exist.\n * * `'r+'` - Open file for reading and writing. An exception occurs if the file does not exist.\n * * `'rs'` - Open file for reading in synchronous mode. Instructs the filesystem to not cache writes.\n * * `'rs+'` - Open file for reading and writing, and opens the file in synchronous mode.\n * * `'w'` - Open file for writing. The file is created (if it does not exist) or truncated (if it exists).\n * * `'wx'` - Like 'w' but opens the file in exclusive mode.\n * * `'w+'` - Open file for reading and writing. The file is created (if it does not exist) or truncated (if it exists).\n * * `'wx+'` - Like 'w+' but opens the file in exclusive mode.\n * * `'a'` - Open file for appending. The file is created if it does not exist.\n * * `'ax'` - Like 'a' but opens the file in exclusive mode.\n * * `'a+'` - Open file for reading and appending. The file is created if it does not exist.\n * * `'ax+'` - Like 'a+' but opens the file in exclusive mode.\n *\n * @see http://www.manpagez.com/man/2/open/\n * @param path\n * @param flags\n * @param mode defaults to `0644`\n * @param callback\n */\n public open(path: string, flag: string, cb?: BFSCallback): void;\n public open(path: string, flag: string, mode: number|string, cb?: BFSCallback): void;\n public open(path: string, flag: string, arg2?: any, cb: BFSCallback = nopCb): void {\n const mode = normalizeMode(arg2, 0x1a4);\n cb = typeof arg2 === 'function' ? arg2 : cb;\n const newCb = wrapCb(cb, 2);\n try {\n assertRoot(this.root).open(normalizePath(path), FileFlag.getFileFlag(flag), mode, (e: ApiError, file?: File) => {\n if (file) {\n newCb(e, this.getFdForFile(file));\n } else {\n newCb(e);\n }\n });\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous file open.\n * @see http://www.manpagez.com/man/2/open/\n * @param path\n * @param flags\n * @param mode defaults to `0644`\n * @return [BrowserFS.File]\n */\n public openSync(path: string, flag: string, mode: number|string = 0x1a4): number {\n return this.getFdForFile(\n assertRoot(this.root).openSync(normalizePath(path), FileFlag.getFileFlag(flag), normalizeMode(mode, 0x1a4)));\n }\n\n /**\n * Asynchronously reads the entire contents of a file.\n * @example Usage example\n * fs.readFile('/etc/passwd', function (err, data) {\n * if (err) throw err;\n * console.log(data);\n * });\n * @param filename\n * @param options\n * @option options [String] encoding The string encoding for the file contents. Defaults to `null`.\n * @option options [String] flag Defaults to `'r'`.\n * @param callback If no encoding is specified, then the raw buffer is returned.\n */\n public readFile(filename: string, cb: BFSCallback): void;\n public readFile(filename: string, options: { flag?: string; }, callback: BFSCallback): void;\n public readFile(filename: string, options: { encoding: string; flag?: string; }, callback: BFSCallback): void;\n public readFile(filename: string, encoding: string, cb?: BFSCallback): void;\n public readFile(filename: string, arg2: any = {}, cb: BFSCallback = nopCb ) {\n const options = normalizeOptions(arg2, null, 'r', null);\n cb = typeof arg2 === 'function' ? arg2 : cb;\n const newCb = wrapCb(cb, 2);\n try {\n const flag = FileFlag.getFileFlag(options['flag']);\n if (!flag.isReadable()) {\n return newCb(new ApiError(ErrorCode.EINVAL, 'Flag passed to readFile must allow for reading.'));\n }\n return assertRoot(this.root).readFile(normalizePath(filename), options.encoding, flag, newCb);\n } catch (e) {\n return newCb(e);\n }\n }\n\n /**\n * Synchronously reads the entire contents of a file.\n * @param filename\n * @param options\n * @option options [String] encoding The string encoding for the file contents. Defaults to `null`.\n * @option options [String] flag Defaults to `'r'`.\n * @return [String | BrowserFS.node.Buffer]\n */\n public readFileSync(filename: string, options?: { flag?: string; }): Buffer;\n public readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;\n public readFileSync(filename: string, encoding: string): string;\n public readFileSync(filename: string, arg2: any = {}): any {\n const options = normalizeOptions(arg2, null, 'r', null);\n const flag = FileFlag.getFileFlag(options.flag);\n if (!flag.isReadable()) {\n throw new ApiError(ErrorCode.EINVAL, 'Flag passed to readFile must allow for reading.');\n }\n return assertRoot(this.root).readFileSync(normalizePath(filename), options.encoding, flag);\n }\n\n /**\n * Asynchronously writes data to a file, replacing the file if it already\n * exists.\n *\n * The encoding option is ignored if data is a buffer.\n *\n * @example Usage example\n * fs.writeFile('message.txt', 'Hello Node', function (err) {\n * if (err) throw err;\n * console.log('It\\'s saved!');\n * });\n * @param filename\n * @param data\n * @param options\n * @option options [String] encoding Defaults to `'utf8'`.\n * @option options [Number] mode Defaults to `0644`.\n * @option options [String] flag Defaults to `'w'`.\n * @param callback\n */\n public writeFile(filename: string, data: any, cb?: BFSOneArgCallback): void;\n public writeFile(filename: string, data: any, encoding?: string, cb?: BFSOneArgCallback): void;\n public writeFile(filename: string, data: any, options?: { encoding?: string; mode?: string | number; flag?: string; }, cb?: BFSOneArgCallback): void;\n public writeFile(filename: string, data: any, arg3: any = {}, cb: BFSOneArgCallback = nopCb): void {\n const options = normalizeOptions(arg3, 'utf8', 'w', 0x1a4);\n cb = typeof arg3 === 'function' ? arg3 : cb;\n const newCb = wrapCb(cb, 1);\n try {\n const flag = FileFlag.getFileFlag(options.flag);\n if (!flag.isWriteable()) {\n return newCb(new ApiError(ErrorCode.EINVAL, 'Flag passed to writeFile must allow for writing.'));\n }\n return assertRoot(this.root).writeFile(normalizePath(filename), data, options.encoding, flag, options.mode, newCb);\n } catch (e) {\n return newCb(e);\n }\n }\n\n /**\n * Synchronously writes data to a file, replacing the file if it already\n * exists.\n *\n * The encoding option is ignored if data is a buffer.\n * @param filename\n * @param data\n * @param options\n * @option options [String] encoding Defaults to `'utf8'`.\n * @option options [Number] mode Defaults to `0644`.\n * @option options [String] flag Defaults to `'w'`.\n */\n public writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number | string; flag?: string; }): void;\n public writeFileSync(filename: string, data: any, encoding?: string): void;\n public writeFileSync(filename: string, data: any, arg3?: any): void {\n const options = normalizeOptions(arg3, 'utf8', 'w', 0x1a4);\n const flag = FileFlag.getFileFlag(options.flag);\n if (!flag.isWriteable()) {\n throw new ApiError(ErrorCode.EINVAL, 'Flag passed to writeFile must allow for writing.');\n }\n return assertRoot(this.root).writeFileSync(normalizePath(filename), data, options.encoding, flag, options.mode);\n }\n\n /**\n * Asynchronously append data to a file, creating the file if it not yet\n * exists.\n *\n * @example Usage example\n * fs.appendFile('message.txt', 'data to append', function (err) {\n * if (err) throw err;\n * console.log('The \"data to append\" was appended to file!');\n * });\n * @param filename\n * @param data\n * @param options\n * @option options [String] encoding Defaults to `'utf8'`.\n * @option options [Number] mode Defaults to `0644`.\n * @option options [String] flag Defaults to `'a'`.\n * @param callback\n */\n public appendFile(filename: string, data: any, cb?: BFSOneArgCallback): void;\n public appendFile(filename: string, data: any, options?: { encoding?: string; mode?: number|string; flag?: string; }, cb?: BFSOneArgCallback): void;\n public appendFile(filename: string, data: any, encoding?: string, cb?: BFSOneArgCallback): void;\n public appendFile(filename: string, data: any, arg3?: any, cb: BFSOneArgCallback = nopCb): void {\n const options = normalizeOptions(arg3, 'utf8', 'a', 0x1a4);\n cb = typeof arg3 === 'function' ? arg3 : cb;\n const newCb = wrapCb(cb, 1);\n try {\n const flag = FileFlag.getFileFlag(options.flag);\n if (!flag.isAppendable()) {\n return newCb(new ApiError(ErrorCode.EINVAL, 'Flag passed to appendFile must allow for appending.'));\n }\n assertRoot(this.root).appendFile(normalizePath(filename), data, options.encoding, flag, options.mode, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Asynchronously append data to a file, creating the file if it not yet\n * exists.\n *\n * @example Usage example\n * fs.appendFile('message.txt', 'data to append', function (err) {\n * if (err) throw err;\n * console.log('The \"data to append\" was appended to file!');\n * });\n * @param filename\n * @param data\n * @param options\n * @option options [String] encoding Defaults to `'utf8'`.\n * @option options [Number] mode Defaults to `0644`.\n * @option options [String] flag Defaults to `'a'`.\n */\n public appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number | string; flag?: string; }): void;\n public appendFileSync(filename: string, data: any, encoding?: string): void;\n public appendFileSync(filename: string, data: any, arg3?: any): void {\n const options = normalizeOptions(arg3, 'utf8', 'a', 0x1a4);\n const flag = FileFlag.getFileFlag(options.flag);\n if (!flag.isAppendable()) {\n throw new ApiError(ErrorCode.EINVAL, 'Flag passed to appendFile must allow for appending.');\n }\n return assertRoot(this.root).appendFileSync(normalizePath(filename), data, options.encoding, flag, options.mode);\n }\n\n // FILE DESCRIPTOR METHODS\n\n /**\n * Asynchronous `fstat`.\n * `fstat()` is identical to `stat()`, except that the file to be stat-ed is\n * specified by the file descriptor `fd`.\n * @param fd\n * @param callback\n */\n public fstat(fd: number, cb: BFSCallback = nopCb): void {\n const newCb = wrapCb(cb, 2);\n try {\n const file = this.fd2file(fd);\n file.stat(newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `fstat`.\n * `fstat()` is identical to `stat()`, except that the file to be stat-ed is\n * specified by the file descriptor `fd`.\n * @param fd\n * @return [BrowserFS.node.fs.Stats]\n */\n public fstatSync(fd: number): Stats {\n return this.fd2file(fd).statSync();\n }\n\n /**\n * Asynchronous close.\n * @param fd\n * @param callback\n */\n public close(fd: number, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n this.fd2file(fd).close((e: ApiError) => {\n if (!e) {\n this.closeFd(fd);\n }\n newCb(e);\n });\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous close.\n * @param fd\n */\n public closeSync(fd: number): void {\n this.fd2file(fd).closeSync();\n this.closeFd(fd);\n }\n\n /**\n * Asynchronous ftruncate.\n * @param fd\n * @param len\n * @param callback\n */\n public ftruncate(fd: number, cb?: BFSOneArgCallback): void;\n public ftruncate(fd: number, len?: number, cb?: BFSOneArgCallback): void;\n public ftruncate(fd: number, arg2?: any, cb: BFSOneArgCallback = nopCb): void {\n const length = typeof arg2 === 'number' ? arg2 : 0;\n cb = typeof arg2 === 'function' ? arg2 : cb;\n const newCb = wrapCb(cb, 1);\n try {\n const file = this.fd2file(fd);\n if (length < 0) {\n throw new ApiError(ErrorCode.EINVAL);\n }\n file.truncate(length, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous ftruncate.\n * @param fd\n * @param len\n */\n public ftruncateSync(fd: number, len: number = 0): void {\n const file = this.fd2file(fd);\n if (len < 0) {\n throw new ApiError(ErrorCode.EINVAL);\n }\n file.truncateSync(len);\n }\n\n /**\n * Asynchronous fsync.\n * @param fd\n * @param callback\n */\n public fsync(fd: number, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n this.fd2file(fd).sync(newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous fsync.\n * @param fd\n */\n public fsyncSync(fd: number): void {\n this.fd2file(fd).syncSync();\n }\n\n /**\n * Asynchronous fdatasync.\n * @param fd\n * @param callback\n */\n public fdatasync(fd: number, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n this.fd2file(fd).datasync(newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous fdatasync.\n * @param fd\n */\n public fdatasyncSync(fd: number): void {\n this.fd2file(fd).datasyncSync();\n }\n\n /**\n * Write buffer to the file specified by `fd`.\n * Note that it is unsafe to use fs.write multiple times on the same file\n * without waiting for the callback.\n * @param fd\n * @param buffer Buffer containing the data to write to\n * the file.\n * @param offset Offset in the buffer to start reading data from.\n * @param length The amount of bytes to write to the file.\n * @param position Offset from the beginning of the file where this\n * data should be written. If position is null, the data will be written at\n * the current position.\n * @param callback The number specifies the number of bytes written into the file.\n */\n public write(fd: number, buffer: Buffer, offset: number, length: number, cb?: BFSThreeArgCallback): void;\n public write(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, cb?: BFSThreeArgCallback): void;\n public write(fd: number, data: any, cb?: BFSThreeArgCallback): void;\n public write(fd: number, data: any, position: number | null, cb?: BFSThreeArgCallback): void;\n public write(fd: number, data: any, position: number | null, encoding: string, cb?: BFSThreeArgCallback): void;\n public write(fd: number, arg2: any, arg3?: any, arg4?: any, arg5?: any, cb: BFSThreeArgCallback = nopCb): void {\n let buffer: Buffer, offset: number, length: number, position: number | null = null;\n if (typeof arg2 === 'string') {\n // Signature 1: (fd, string, [position?, [encoding?]], cb?)\n let encoding = 'utf8';\n switch (typeof arg3) {\n case 'function':\n // (fd, string, cb)\n cb = arg3;\n break;\n case 'number':\n // (fd, string, position, encoding?, cb?)\n position = arg3;\n encoding = typeof arg4 === 'string' ? arg4 : 'utf8';\n cb = typeof arg5 === 'function' ? arg5 : cb;\n break;\n default:\n // ...try to find the callback and get out of here!\n cb = typeof arg4 === 'function' ? arg4 : typeof arg5 === 'function' ? arg5 : cb;\n return cb(new ApiError(ErrorCode.EINVAL, 'Invalid arguments.'));\n }\n buffer = Buffer.from(arg2, encoding);\n offset = 0;\n length = buffer.length;\n } else {\n // Signature 2: (fd, buffer, offset, length, position?, cb?)\n buffer = arg2;\n offset = arg3;\n length = arg4;\n position = typeof arg5 === 'number' ? arg5 : null;\n cb = typeof arg5 === 'function' ? arg5 : cb;\n }\n\n const newCb = wrapCb(cb, 3);\n try {\n const file = this.fd2file(fd);\n if (position === undefined || position === null) {\n position = file.getPos()!;\n }\n file.write(buffer, offset, length, position, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Write buffer to the file specified by `fd`.\n * Note that it is unsafe to use fs.write multiple times on the same file\n * without waiting for it to return.\n * @param fd\n * @param buffer Buffer containing the data to write to\n * the file.\n * @param offset Offset in the buffer to start reading data from.\n * @param length The amount of bytes to write to the file.\n * @param position Offset from the beginning of the file where this\n * data should be written. If position is null, the data will be written at\n * the current position.\n */\n public writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number | null): number;\n public writeSync(fd: number, data: string, position?: number | null, encoding?: string): number;\n public writeSync(fd: number, arg2: any, arg3?: any, arg4?: any, arg5?: any): number {\n let buffer: Buffer, offset: number = 0, length: number, position: number | null;\n if (typeof arg2 === 'string') {\n // Signature 1: (fd, string, [position?, [encoding?]])\n position = typeof arg3 === 'number' ? arg3 : null;\n const encoding = typeof arg4 === 'string' ? arg4 : 'utf8';\n offset = 0;\n buffer = Buffer.from(arg2, encoding);\n length = buffer.length;\n } else {\n // Signature 2: (fd, buffer, offset, length, position?)\n buffer = arg2;\n offset = arg3;\n length = arg4;\n position = typeof arg5 === 'number' ? arg5 : null;\n }\n\n const file = this.fd2file(fd);\n if (position === undefined || position === null) {\n position = file.getPos()!;\n }\n return file.writeSync(buffer, offset, length, position);\n }\n\n /**\n * Read data from the file specified by `fd`.\n * @param buffer The buffer that the data will be\n * written to.\n * @param offset The offset within the buffer where writing will\n * start.\n * @param length An integer specifying the number of bytes to read.\n * @param position An integer specifying where to begin reading from\n * in the file. If position is null, data will be read from the current file\n * position.\n * @param callback The number is the number of bytes read\n */\n public read(fd: number, length: number, position: number | null, encoding: string, cb?: BFSThreeArgCallback): void;\n public read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, cb?: BFSThreeArgCallback): void;\n public read(fd: number, arg2: any, arg3: any, arg4: any, arg5?: any, cb: BFSThreeArgCallback | BFSThreeArgCallback = nopCb): void {\n let position: number | null, offset: number, length: number, buffer: Buffer, newCb: BFSThreeArgCallback;\n if (typeof arg2 === 'number') {\n // legacy interface\n // (fd, length, position, encoding, callback)\n length = arg2;\n position = arg3;\n const encoding = arg4;\n cb = typeof arg5 === 'function' ? arg5 : cb;\n offset = 0;\n buffer = Buffer.alloc(length);\n // XXX: Inefficient.\n // Wrap the cb so we shelter upper layers of the API from these\n // shenanigans.\n newCb = wrapCb((err?: ApiError | null, bytesRead?: number, buf?: Buffer) => {\n if (err) {\n return ( cb)(err);\n }\n (> cb)(err, buf!.toString(encoding), bytesRead!);\n }, 3);\n } else {\n buffer = arg2;\n offset = arg3;\n length = arg4;\n position = arg5;\n newCb = wrapCb(> cb, 3);\n }\n\n try {\n const file = this.fd2file(fd);\n if (position === undefined || position === null) {\n position = file.getPos()!;\n }\n file.read(buffer, offset, length, position, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Read data from the file specified by `fd`.\n * @param fd\n * @param buffer The buffer that the data will be\n * written to.\n * @param offset The offset within the buffer where writing will\n * start.\n * @param length An integer specifying the number of bytes to read.\n * @param position An integer specifying where to begin reading from\n * in the file. If position is null, data will be read from the current file\n * position.\n * @return [Number]\n */\n public readSync(fd: number, length: number, position: number, encoding: string): string;\n public readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;\n public readSync(fd: number, arg2: any, arg3: any, arg4: any, arg5?: any): any {\n let shenanigans = false;\n let buffer: Buffer, offset: number, length: number, position: number, encoding: string = 'utf8';\n if (typeof arg2 === 'number') {\n length = arg2;\n position = arg3;\n encoding = arg4;\n offset = 0;\n buffer = Buffer.alloc(length);\n shenanigans = true;\n } else {\n buffer = arg2;\n offset = arg3;\n length = arg4;\n position = arg5;\n }\n const file = this.fd2file(fd);\n if (position === undefined || position === null) {\n position = file.getPos()!;\n }\n\n const rv = file.readSync(buffer, offset, length, position);\n if (!shenanigans) {\n return rv;\n } else {\n return [buffer.toString(encoding), rv];\n }\n }\n\n /**\n * Asynchronous `fchown`.\n * @param fd\n * @param uid\n * @param gid\n * @param callback\n */\n public fchown(fd: number, uid: number, gid: number, callback: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(callback, 1);\n try {\n this.fd2file(fd).chown(uid, gid, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `fchown`.\n * @param fd\n * @param uid\n * @param gid\n */\n public fchownSync(fd: number, uid: number, gid: number): void {\n this.fd2file(fd).chownSync(uid, gid);\n }\n\n /**\n * Asynchronous `fchmod`.\n * @param fd\n * @param mode\n * @param callback\n */\n public fchmod(fd: number, mode: string | number, cb: BFSOneArgCallback): void {\n const newCb = wrapCb(cb, 1);\n try {\n const numMode = typeof mode === 'string' ? parseInt(mode, 8) : mode;\n this.fd2file(fd).chmod(numMode, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `fchmod`.\n * @param fd\n * @param mode\n */\n public fchmodSync(fd: number, mode: number | string): void {\n const numMode = typeof mode === 'string' ? parseInt(mode, 8) : mode;\n this.fd2file(fd).chmodSync(numMode);\n }\n\n /**\n * Change the file timestamps of a file referenced by the supplied file\n * descriptor.\n * @param fd\n * @param atime\n * @param mtime\n * @param callback\n */\n public futimes(fd: number, atime: number | Date, mtime: number | Date, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n const file = this.fd2file(fd);\n if (typeof atime === 'number') {\n atime = new Date(atime * 1000);\n }\n if (typeof mtime === 'number') {\n mtime = new Date(mtime * 1000);\n }\n file.utimes(atime, mtime, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Change the file timestamps of a file referenced by the supplied file\n * descriptor.\n * @param fd\n * @param atime\n * @param mtime\n */\n public futimesSync(fd: number, atime: number | Date, mtime: number | Date): void {\n this.fd2file(fd).utimesSync(normalizeTime(atime), normalizeTime(mtime));\n }\n\n // DIRECTORY-ONLY METHODS\n\n /**\n * Asynchronous `rmdir`.\n * @param path\n * @param callback\n */\n public rmdir(path: string, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n path = normalizePath(path);\n assertRoot(this.root).rmdir(path, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `rmdir`.\n * @param path\n */\n public rmdirSync(path: string): void {\n path = normalizePath(path);\n return assertRoot(this.root).rmdirSync(path);\n }\n\n /**\n * Asynchronous `mkdir`.\n * @param path\n * @param mode defaults to `0777`\n * @param callback\n */\n public mkdir(path: string, mode?: any, cb: BFSOneArgCallback = nopCb): void {\n if (typeof mode === 'function') {\n cb = mode;\n mode = 0x1ff;\n }\n const newCb = wrapCb(cb, 1);\n try {\n path = normalizePath(path);\n assertRoot(this.root).mkdir(path, mode, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `mkdir`.\n * @param path\n * @param mode defaults to `0777`\n */\n public mkdirSync(path: string, mode?: number | string): void {\n assertRoot(this.root).mkdirSync(normalizePath(path), normalizeMode(mode, 0x1ff));\n }\n\n /**\n * Asynchronous `readdir`. Reads the contents of a directory.\n * The callback gets two arguments `(err, files)` where `files` is an array of\n * the names of the files in the directory excluding `'.'` and `'..'`.\n * @param path\n * @param callback\n */\n public readdir(path: string, cb: BFSCallback = nopCb): void {\n const newCb = <(err: ApiError, files?: string[]) => void> wrapCb(cb, 2);\n try {\n path = normalizePath(path);\n assertRoot(this.root).readdir(path, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `readdir`. Reads the contents of a directory.\n * @param path\n * @return [String[]]\n */\n public readdirSync(path: string): string[] {\n path = normalizePath(path);\n return assertRoot(this.root).readdirSync(path);\n }\n\n // SYMLINK METHODS\n\n /**\n * Asynchronous `link`.\n * @param srcpath\n * @param dstpath\n * @param callback\n */\n public link(srcpath: string, dstpath: string, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n srcpath = normalizePath(srcpath);\n dstpath = normalizePath(dstpath);\n assertRoot(this.root).link(srcpath, dstpath, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `link`.\n * @param srcpath\n * @param dstpath\n */\n public linkSync(srcpath: string, dstpath: string): void {\n srcpath = normalizePath(srcpath);\n dstpath = normalizePath(dstpath);\n return assertRoot(this.root).linkSync(srcpath, dstpath);\n }\n\n /**\n * Asynchronous `symlink`.\n * @param srcpath\n * @param dstpath\n * @param type can be either `'dir'` or `'file'` (default is `'file'`)\n * @param callback\n */\n public symlink(srcpath: string, dstpath: string, cb?: BFSOneArgCallback): void;\n public symlink(srcpath: string, dstpath: string, type?: string, cb?: BFSOneArgCallback): void;\n public symlink(srcpath: string, dstpath: string, arg3?: any, cb: BFSOneArgCallback = nopCb): void {\n const type = typeof arg3 === 'string' ? arg3 : 'file';\n cb = typeof arg3 === 'function' ? arg3 : cb;\n const newCb = wrapCb(cb, 1);\n try {\n if (type !== 'file' && type !== 'dir') {\n return newCb(new ApiError(ErrorCode.EINVAL, \"Invalid type: \" + type));\n }\n srcpath = normalizePath(srcpath);\n dstpath = normalizePath(dstpath);\n assertRoot(this.root).symlink(srcpath, dstpath, type, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `symlink`.\n * @param srcpath\n * @param dstpath\n * @param type can be either `'dir'` or `'file'` (default is `'file'`)\n */\n public symlinkSync(srcpath: string, dstpath: string, type?: string): void {\n if (!type) {\n type = 'file';\n } else if (type !== 'file' && type !== 'dir') {\n throw new ApiError(ErrorCode.EINVAL, \"Invalid type: \" + type);\n }\n srcpath = normalizePath(srcpath);\n dstpath = normalizePath(dstpath);\n return assertRoot(this.root).symlinkSync(srcpath, dstpath, type);\n }\n\n /**\n * Asynchronous readlink.\n * @param path\n * @param callback\n */\n public readlink(path: string, cb: BFSCallback = nopCb): void {\n const newCb = wrapCb(cb, 2);\n try {\n path = normalizePath(path);\n assertRoot(this.root).readlink(path, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous readlink.\n * @param path\n * @return [String]\n */\n public readlinkSync(path: string): string {\n path = normalizePath(path);\n return assertRoot(this.root).readlinkSync(path);\n }\n\n // PROPERTY OPERATIONS\n\n /**\n * Asynchronous `chown`.\n * @param path\n * @param uid\n * @param gid\n * @param callback\n */\n public chown(path: string, uid: number, gid: number, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n path = normalizePath(path);\n assertRoot(this.root).chown(path, false, uid, gid, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `chown`.\n * @param path\n * @param uid\n * @param gid\n */\n public chownSync(path: string, uid: number, gid: number): void {\n path = normalizePath(path);\n assertRoot(this.root).chownSync(path, false, uid, gid);\n }\n\n /**\n * Asynchronous `lchown`.\n * @param path\n * @param uid\n * @param gid\n * @param callback\n */\n public lchown(path: string, uid: number, gid: number, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n path = normalizePath(path);\n assertRoot(this.root).chown(path, true, uid, gid, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `lchown`.\n * @param path\n * @param uid\n * @param gid\n */\n public lchownSync(path: string, uid: number, gid: number): void {\n path = normalizePath(path);\n assertRoot(this.root).chownSync(path, true, uid, gid);\n }\n\n /**\n * Asynchronous `chmod`.\n * @param path\n * @param mode\n * @param callback\n */\n public chmod(path: string, mode: number | string, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n const numMode = normalizeMode(mode, -1);\n if (numMode < 0) {\n throw new ApiError(ErrorCode.EINVAL, `Invalid mode.`);\n }\n assertRoot(this.root).chmod(normalizePath(path), false, numMode, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `chmod`.\n * @param path\n * @param mode\n */\n public chmodSync(path: string, mode: string | number): void {\n const numMode = normalizeMode(mode, -1);\n if (numMode < 0) {\n throw new ApiError(ErrorCode.EINVAL, `Invalid mode.`);\n }\n path = normalizePath(path);\n assertRoot(this.root).chmodSync(path, false, numMode);\n }\n\n /**\n * Asynchronous `lchmod`.\n * @param path\n * @param mode\n * @param callback\n */\n public lchmod(path: string, mode: number | string, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n const numMode = normalizeMode(mode, -1);\n if (numMode < 0) {\n throw new ApiError(ErrorCode.EINVAL, `Invalid mode.`);\n }\n assertRoot(this.root).chmod(normalizePath(path), true, numMode, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `lchmod`.\n * @param path\n * @param mode\n */\n public lchmodSync(path: string, mode: number | string): void {\n const numMode = normalizeMode(mode, -1);\n if (numMode < 1) {\n throw new ApiError(ErrorCode.EINVAL, `Invalid mode.`);\n }\n assertRoot(this.root).chmodSync(normalizePath(path), true, numMode);\n }\n\n /**\n * Change file timestamps of the file referenced by the supplied path.\n * @param path\n * @param atime\n * @param mtime\n * @param callback\n */\n public utimes(path: string, atime: number | Date, mtime: number | Date, cb: BFSOneArgCallback = nopCb): void {\n const newCb = wrapCb(cb, 1);\n try {\n assertRoot(this.root).utimes(normalizePath(path), normalizeTime(atime), normalizeTime(mtime), newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Change file timestamps of the file referenced by the supplied path.\n * @param path\n * @param atime\n * @param mtime\n */\n public utimesSync(path: string, atime: number | Date, mtime: number | Date): void {\n assertRoot(this.root).utimesSync(normalizePath(path), normalizeTime(atime), normalizeTime(mtime));\n }\n\n /**\n * Asynchronous `realpath`. The callback gets two arguments\n * `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths.\n *\n * @example Usage example\n * let cache = {'/etc':'/private/etc'};\n * fs.realpath('/etc/passwd', cache, function (err, resolvedPath) {\n * if (err) throw err;\n * console.log(resolvedPath);\n * });\n *\n * @param path\n * @param cache An object literal of mapped paths that can be used to\n * force a specific path resolution or avoid additional `fs.stat` calls for\n * known real paths.\n * @param callback\n */\n public realpath(path: string, cb?: BFSCallback): void;\n public realpath(path: string, cache: {[path: string]: string}, cb: BFSCallback): void;\n public realpath(path: string, arg2?: any, cb: BFSCallback = nopCb): void {\n const cache = typeof(arg2) === 'object' ? arg2 : {};\n cb = typeof(arg2) === 'function' ? arg2 : nopCb;\n const newCb = <(err: ApiError, resolvedPath?: string) => any> wrapCb(cb, 2);\n try {\n path = normalizePath(path);\n assertRoot(this.root).realpath(path, cache, newCb);\n } catch (e) {\n newCb(e);\n }\n }\n\n /**\n * Synchronous `realpath`.\n * @param path\n * @param cache An object literal of mapped paths that can be used to\n * force a specific path resolution or avoid additional `fs.stat` calls for\n * known real paths.\n * @return [String]\n */\n public realpathSync(path: string, cache: {[path: string]: string} = {}): string {\n path = normalizePath(path);\n return assertRoot(this.root).realpathSync(path, cache);\n }\n\n public watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void;\n public watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void;\n public watchFile(filename: string, arg2: any, listener: (curr: Stats, prev: Stats) => void = nopCb): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n\n public unwatchFile(filename: string, listener: (curr: Stats, prev: Stats) => void = nopCb): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n\n public watch(filename: string, listener?: (event: string, filename: string) => any): _fs.FSWatcher;\n public watch(filename: string, options: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): _fs.FSWatcher;\n public watch(filename: string, arg2: any, listener: (event: string, filename: string) => any = nopCb): _fs.FSWatcher {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n\n public access(path: string, callback: (err: ApiError) => void): void;\n public access(path: string, mode: number, callback: (err: ApiError) => void): void;\n public access(path: string, arg2: any, cb: (e: ApiError) => void = nopCb): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n\n public accessSync(path: string, mode?: number): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n\n public createReadStream(path: string, options?: {\n flags?: string;\n encoding?: string;\n fd?: number;\n mode?: number;\n autoClose?: boolean;\n }): _fs.ReadStream {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n\n public createWriteStream(path: string, options?: {\n flags?: string;\n encoding?: string;\n fd?: number;\n mode?: number;\n }): _fs.WriteStream {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n\n /**\n * For unit testing. Passes all incoming callbacks to cbWrapper for wrapping.\n */\n public wrapCallbacks(cbWrapper: (cb: Function, args: number) => Function) {\n wrapCb = cbWrapper;\n }\n\n private getFdForFile(file: File): number {\n const fd = this.nextFd++;\n this.fdMap[fd] = file;\n return fd;\n }\n private fd2file(fd: number): File {\n const rv = this.fdMap[fd];\n if (rv) {\n return rv;\n } else {\n throw new ApiError(ErrorCode.EBADF, 'Invalid file descriptor.');\n }\n }\n private closeFd(fd: number): void {\n delete this.fdMap[fd];\n }\n}\n\nexport interface FSModule extends FS {\n /**\n * The FS constructor.\n */\n FS: typeof FS;\n /**\n * Retrieve the FS object backing the fs module.\n */\n getFSModule(): FS;\n /**\n * Set the FS object backing the fs module.\n */\n changeFSModule(newFs: FS): void;\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/FS.ts","import {default as FS, FSModule} from './FS';\n\n// Manually export the individual public functions of fs.\n// Required because some code will invoke functions off of the module.\n// e.g.:\n// let writeFile = fs.writeFile;\n// writeFile(...)\n\n/**\n * @hidden\n */\nlet fs: any = new FS();\n/**\n * @hidden\n */\nconst _fsMock: FSModule = {};\n/**\n * @hidden\n */\nconst fsProto = FS.prototype;\nObject.keys(fsProto).forEach((key) => {\n if (typeof fs[key] === 'function') {\n ( _fsMock)[key] = function() {\n return ( fs[key]).apply(fs, arguments);\n };\n } else {\n ( _fsMock)[key] = fs[key];\n }\n});\n\n_fsMock['changeFSModule'] = function(newFs: FS): void {\n fs = newFs;\n};\n_fsMock['getFSModule'] = function(): FS {\n return fs;\n};\n_fsMock['FS'] = FS;\n\nexport default _fsMock;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/node_fs.ts","/*\n * Levenshtein distance, from the `js-levenshtein` NPM module.\n * Copied here to avoid complexity of adding another CommonJS module dependency.\n */\n\nfunction _min(d0: number, d1: number, d2: number, bx: number, ay: number): number {\n return d0 < d1 || d2 < d1\n ? d0 > d2\n ? d2 + 1\n : d0 + 1\n : bx === ay\n ? d1\n : d1 + 1;\n}\n\n/**\n * Calculates levenshtein distance.\n * @param a\n * @param b\n */\nexport default function levenshtein(a: string, b: string): number {\n if (a === b) {\n return 0;\n }\n\n if (a.length > b.length) {\n const tmp = a;\n a = b;\n b = tmp;\n }\n\n let la = a.length;\n let lb = b.length;\n\n while (la > 0 && (a.charCodeAt(la - 1) === b.charCodeAt(lb - 1))) {\n la--;\n lb--;\n }\n\n let offset = 0;\n\n while (offset < la && (a.charCodeAt(offset) === b.charCodeAt(offset))) {\n offset++;\n }\n\n la -= offset;\n lb -= offset;\n\n if (la === 0 || lb === 1) {\n return lb;\n }\n\n const vector = new Array(la << 1);\n\n for (let y = 0; y < la; ) {\n vector[la + y] = a.charCodeAt(offset + y);\n vector[y] = ++y;\n }\n\n let x: number;\n let d0: number;\n let d1: number;\n let d2: number;\n let d3: number;\n for (x = 0; (x + 3) < lb; ) {\n const bx0 = b.charCodeAt(offset + (d0 = x));\n const bx1 = b.charCodeAt(offset + (d1 = x + 1));\n const bx2 = b.charCodeAt(offset + (d2 = x + 2));\n const bx3 = b.charCodeAt(offset + (d3 = x + 3));\n let dd = (x += 4);\n for (let y = 0; y < la; ) {\n const ay = vector[la + y];\n const dy = vector[y];\n d0 = _min(dy, d0, d1, bx0, ay);\n d1 = _min(d0, d1, d2, bx1, ay);\n d2 = _min(d1, d2, d3, bx2, ay);\n dd = _min(d2, d3, dd, bx3, ay);\n vector[y++] = dd;\n d3 = d2;\n d2 = d1;\n d1 = d0;\n d0 = dy;\n }\n }\n\n let dd: number = 0;\n for (; x < lb; ) {\n const bx0 = b.charCodeAt(offset + (d0 = x));\n dd = ++x;\n for (let y = 0; y < la; y++) {\n const dy = vector[y];\n vector[y] = dd = dy < d0 || dd < d0\n ? dy > dd ? dd + 1 : dy + 1\n : bx0 === vector[la + y]\n ? d0\n : d0 + 1;\n d0 = dy;\n }\n }\n\n return dd;\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/levenshtein.ts","/**\n * Grab bag of utility functions used across the code.\n */\nimport {FileSystem, BFSOneArgCallback, FileSystemConstructor} from './file_system';\nimport {ErrorCode, ApiError} from './api_error';\nimport levenshtein from './levenshtein';\nimport * as path from 'path';\n\nexport function deprecationMessage(print: boolean, fsName: string, opts: any): void {\n if (print) {\n console.warn(`[${fsName}] Direct file system constructor usage is deprecated for this file system, and will be removed in the next major version. Please use the '${fsName}.Create(${JSON.stringify(opts)}, callback)' method instead. See https://github.com/jvilk/BrowserFS/issues/176 for more details.`);\n }\n}\n\n/**\n * Checks for any IE version, including IE11 which removed MSIE from the\n * userAgent string.\n * @hidden\n */\nexport const isIE: boolean = typeof navigator !== \"undefined\" && !!(/(msie) ([\\w.]+)/.exec(navigator.userAgent.toLowerCase()) || navigator.userAgent.indexOf('Trident') !== -1);\n\n/**\n * Check if we're in a web worker.\n * @hidden\n */\nexport const isWebWorker: boolean = typeof window === \"undefined\";\n\n/**\n * @hidden\n */\nexport interface Arrayish {\n [idx: number]: T;\n length: number;\n}\n\n/**\n * Throws an exception. Called on code paths that should be impossible.\n * @hidden\n */\nexport function fail() {\n throw new Error(\"BFS has reached an impossible code path; please file a bug.\");\n}\n\n/**\n * Synchronous recursive makedir.\n * @hidden\n */\nexport function mkdirpSync(p: string, mode: number, fs: FileSystem): void {\n if (!fs.existsSync(p)) {\n mkdirpSync(path.dirname(p), mode, fs);\n fs.mkdirSync(p, mode);\n }\n}\n\n/**\n * Converts a buffer into an array buffer. Attempts to do so in a\n * zero-copy manner, e.g. the array references the same memory.\n * @hidden\n */\nexport function buffer2ArrayBuffer(buff: Buffer): ArrayBuffer {\n const u8 = buffer2Uint8array(buff),\n u8offset = u8.byteOffset,\n u8Len = u8.byteLength;\n if (u8offset === 0 && u8Len === u8.buffer.byteLength) {\n return u8.buffer;\n } else {\n return u8.buffer.slice(u8offset, u8offset + u8Len);\n }\n}\n\n/**\n * Converts a buffer into a Uint8Array. Attempts to do so in a\n * zero-copy manner, e.g. the array references the same memory.\n * @hidden\n */\nexport function buffer2Uint8array(buff: Buffer): Uint8Array {\n if (buff instanceof Uint8Array) {\n // BFS & Node v4.0 buffers *are* Uint8Arrays.\n return buff;\n } else {\n // Uint8Arrays can be constructed from arrayish numbers.\n // At this point, we assume this isn't a BFS array.\n return new Uint8Array(buff);\n }\n}\n\n/**\n * Converts the given arrayish object into a Buffer. Attempts to\n * be zero-copy.\n * @hidden\n */\nexport function arrayish2Buffer(arr: Arrayish): Buffer {\n if (arr instanceof Buffer) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return uint8Array2Buffer(arr);\n } else {\n return Buffer.from( arr);\n }\n}\n\n/**\n * Converts the given Uint8Array into a Buffer. Attempts to be zero-copy.\n * @hidden\n */\nexport function uint8Array2Buffer(u8: Uint8Array): Buffer {\n if (u8 instanceof Buffer) {\n return u8;\n } else if (u8.byteOffset === 0 && u8.byteLength === u8.buffer.byteLength) {\n return arrayBuffer2Buffer(u8.buffer);\n } else {\n return Buffer.from(u8.buffer, u8.byteOffset, u8.byteLength);\n }\n}\n\n/**\n * Converts the given array buffer into a Buffer. Attempts to be\n * zero-copy.\n * @hidden\n */\nexport function arrayBuffer2Buffer(ab: ArrayBuffer): Buffer {\n return Buffer.from(ab);\n}\n\n/**\n * Copies a slice of the given buffer\n * @hidden\n */\nexport function copyingSlice(buff: Buffer, start: number = 0, end = buff.length): Buffer {\n if (start < 0 || end < 0 || end > buff.length || start > end) {\n throw new TypeError(`Invalid slice bounds on buffer of length ${buff.length}: [${start}, ${end}]`);\n }\n if (buff.length === 0) {\n // Avoid s0 corner case in ArrayBuffer case.\n return emptyBuffer();\n } else {\n const u8 = buffer2Uint8array(buff),\n s0 = buff[0],\n newS0 = (s0 + 1) % 0xFF;\n\n buff[0] = newS0;\n if (u8[0] === newS0) {\n // Same memory. Revert & copy.\n u8[0] = s0;\n return uint8Array2Buffer(u8.slice(start, end));\n } else {\n // Revert.\n buff[0] = s0;\n return uint8Array2Buffer(u8.subarray(start, end));\n }\n }\n}\n\n/**\n * @hidden\n */\nlet emptyBuff: Buffer | null = null;\n/**\n * Returns an empty buffer.\n * @hidden\n */\nexport function emptyBuffer(): Buffer {\n if (emptyBuff) {\n return emptyBuff;\n }\n return emptyBuff = Buffer.alloc(0);\n}\n\n/**\n * Option validator for a Buffer file system option.\n * @hidden\n */\nexport function bufferValidator(v: object, cb: BFSOneArgCallback): void {\n if (Buffer.isBuffer(v)) {\n cb();\n } else {\n cb(new ApiError(ErrorCode.EINVAL, `option must be a Buffer.`));\n }\n}\n\n/**\n * Checks that the given options object is valid for the file system options.\n * @hidden\n */\nexport function checkOptions(fsType: FileSystemConstructor, opts: any, cb: BFSOneArgCallback): void {\n const optsInfo = fsType.Options;\n const fsName = fsType.Name;\n\n let pendingValidators = 0;\n let callbackCalled = false;\n let loopEnded = false;\n function validatorCallback(e?: ApiError): void {\n if (!callbackCalled) {\n if (e) {\n callbackCalled = true;\n cb(e);\n }\n pendingValidators--;\n if (pendingValidators === 0 && loopEnded) {\n cb();\n }\n }\n }\n\n // Check for required options.\n for (const optName in optsInfo) {\n if (optsInfo.hasOwnProperty(optName)) {\n const opt = optsInfo[optName];\n const providedValue = opts[optName];\n\n if (providedValue === undefined || providedValue === null) {\n if (!opt.optional) {\n // Required option, not provided.\n // Any incorrect options provided? Which ones are close to the provided one?\n // (edit distance 5 === close)\n const incorrectOptions = Object.keys(opts).filter((o) => !(o in optsInfo)).map((a: string) => {\n return {str: a, distance: levenshtein(optName, a)};\n }).filter((o) => o.distance < 5).sort((a, b) => a.distance - b.distance);\n // Validators may be synchronous.\n if (callbackCalled) {\n return;\n }\n callbackCalled = true;\n return cb(new ApiError(ErrorCode.EINVAL, `[${fsName}] Required option '${optName}' not provided.${incorrectOptions.length > 0 ? ` You provided unrecognized option '${incorrectOptions[0].str}'; perhaps you meant to type '${optName}'.` : ''}\\nOption description: ${opt.description}`));\n }\n // Else: Optional option, not provided. That is OK.\n } else {\n // Option provided! Check type.\n let typeMatches = false;\n if (Array.isArray(opt.type)) {\n typeMatches = opt.type.indexOf(typeof(providedValue)) !== -1;\n } else {\n typeMatches = typeof(providedValue) === opt.type;\n }\n if (!typeMatches) {\n // Validators may be synchronous.\n if (callbackCalled) {\n return;\n }\n callbackCalled = true;\n return cb(new ApiError(ErrorCode.EINVAL, `[${fsName}] Value provided for option ${optName} is not the proper type. Expected ${Array.isArray(opt.type) ? `one of {${opt.type.join(\", \")}}` : opt.type}, but received ${typeof(providedValue)}\\nOption description: ${opt.description}`));\n } else if (opt.validator) {\n pendingValidators++;\n opt.validator(providedValue, validatorCallback);\n }\n // Otherwise: All good!\n }\n }\n }\n loopEnded = true;\n if (pendingValidators === 0 && !callbackCalled) {\n cb();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/util.ts","/**\n * Defines an Emscripten file system object for use in the Emscripten virtual\n * filesystem. Allows you to use synchronous BrowserFS file systems from within\n * Emscripten.\n *\n * You can construct a BFSEmscriptenFS, mount it using its mount command,\n * and then mount it into Emscripten.\n *\n * Adapted from Emscripten's NodeFS:\n * https://raw.github.com/kripken/emscripten/master/src/library_nodefs.js\n */\nimport FS from '../core/FS';\nimport fs from '../core/node_fs';\nimport NodeStats from '../core/node_fs_stats';\nimport {uint8Array2Buffer} from '../core/util';\n\nexport interface Stats {\n dev: number;\n ino: number;\n mode: number;\n nlink: number;\n uid: number;\n gid: number;\n rdev: number;\n size: number;\n blksize: number;\n blocks: number;\n atime: Date;\n mtime: Date;\n ctime: Date;\n timestamp?: number;\n}\n\nexport interface EmscriptenFSNode {\n name: string;\n mode: number;\n parent: EmscriptenFSNode;\n mount: {opts: {root: string}};\n stream_ops: EmscriptenStreamOps;\n node_ops: EmscriptenNodeOps;\n}\n\nexport interface EmscriptenStream {\n node: EmscriptenFSNode;\n nfd: any;\n flags: string;\n position: number;\n}\n\nexport interface EmscriptenNodeOps {\n getattr(node: EmscriptenFSNode): Stats;\n setattr(node: EmscriptenFSNode, attr: Stats): void;\n lookup(parent: EmscriptenFSNode, name: string): EmscriptenFSNode;\n mknod(parent: EmscriptenFSNode, name: string, mode: number, dev: any): EmscriptenFSNode;\n rename(oldNode: EmscriptenFSNode, newDir: EmscriptenFSNode, newName: string): void;\n unlink(parent: EmscriptenFSNode, name: string): void;\n rmdir(parent: EmscriptenFSNode, name: string): void;\n readdir(node: EmscriptenFSNode): string[];\n symlink(parent: EmscriptenFSNode, newName: string, oldPath: string): void;\n readlink(node: EmscriptenFSNode): string;\n}\n\nexport interface EmscriptenStreamOps {\n open(stream: EmscriptenStream): void;\n close(stream: EmscriptenStream): void;\n read(stream: EmscriptenStream, buffer: Uint8Array, offset: number, length: number, position: number): number;\n write(stream: EmscriptenStream, buffer: Uint8Array, offset: number, length: number, position: number): number;\n llseek(stream: EmscriptenStream, offset: number, whence: number): number;\n}\n\nexport interface EmscriptenFS {\n node_ops: EmscriptenNodeOps;\n stream_ops: EmscriptenStreamOps;\n mount(mount: {opts: {root: string}}): EmscriptenFSNode;\n createNode(parent: EmscriptenFSNode, name: string, mode: number, dev?: any): EmscriptenFSNode;\n getMode(path: string): number;\n realPath(node: EmscriptenFSNode): string;\n}\n\nclass BFSEmscriptenStreamOps implements EmscriptenStreamOps {\n private FS: any;\n private PATH: any;\n private ERRNO_CODES: any;\n private nodefs: FS;\n\n constructor(private fs: BFSEmscriptenFS) {\n this.nodefs = fs.getNodeFS();\n this.FS = fs.getFS();\n this.PATH = fs.getPATH();\n this.ERRNO_CODES = fs.getERRNO_CODES();\n }\n\n public open(stream: EmscriptenStream): void {\n const path = this.fs.realPath(stream.node);\n const FS = this.FS;\n try {\n if (FS.isFile(stream.node.mode)) {\n stream.nfd = this.nodefs.openSync(path, this.fs.flagsToPermissionString(stream.flags));\n }\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n\n public close(stream: EmscriptenStream): void {\n const FS = this.FS;\n try {\n if (FS.isFile(stream.node.mode) && stream.nfd) {\n this.nodefs.closeSync(stream.nfd);\n }\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n\n public read(stream: EmscriptenStream, buffer: Uint8Array, offset: number, length: number, position: number): number {\n // Avoid copying overhead by reading directly into buffer.\n try {\n return this.nodefs.readSync(stream.nfd, uint8Array2Buffer(buffer), offset, length, position);\n } catch (e) {\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n\n public write(stream: EmscriptenStream, buffer: Uint8Array, offset: number, length: number, position: number): number {\n // Avoid copying overhead.\n try {\n return this.nodefs.writeSync(stream.nfd, uint8Array2Buffer(buffer), offset, length, position);\n } catch (e) {\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n\n public llseek(stream: EmscriptenStream, offset: number, whence: number): number {\n let position = offset;\n if (whence === 1) { // SEEK_CUR.\n position += stream.position;\n } else if (whence === 2) { // SEEK_END.\n if (this.FS.isFile(stream.node.mode)) {\n try {\n const stat = this.nodefs.fstatSync(stream.nfd);\n position += stat.size;\n } catch (e) {\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n }\n\n if (position < 0) {\n throw new this.FS.ErrnoError(this.ERRNO_CODES.EINVAL);\n }\n\n stream.position = position;\n return position;\n }\n}\n\nclass BFSEmscriptenNodeOps implements EmscriptenNodeOps {\n private FS: any;\n private PATH: any;\n private ERRNO_CODES: any;\n private nodefs: FS;\n\n constructor(private fs: BFSEmscriptenFS) {\n this.nodefs = fs.getNodeFS();\n this.FS = fs.getFS();\n this.PATH = fs.getPATH();\n this.ERRNO_CODES = fs.getERRNO_CODES();\n }\n\n public getattr(node: EmscriptenFSNode): Stats {\n const path = this.fs.realPath(node);\n let stat: NodeStats;\n try {\n stat = this.nodefs.lstatSync(path);\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n return {\n dev: stat.dev,\n ino: stat.ino,\n mode: stat.mode,\n nlink: stat.nlink,\n uid: stat.uid,\n gid: stat.gid,\n rdev: stat.rdev,\n size: stat.size,\n atime: stat.atime,\n mtime: stat.mtime,\n ctime: stat.ctime,\n blksize: stat.blksize,\n blocks: stat.blocks\n };\n }\n\n public setattr(node: EmscriptenFSNode, attr: Stats): void {\n const path = this.fs.realPath(node);\n try {\n if (attr.mode !== undefined) {\n this.nodefs.chmodSync(path, attr.mode);\n // update the common node structure mode as well\n node.mode = attr.mode;\n }\n if (attr.timestamp !== undefined) {\n const date = new Date(attr.timestamp);\n this.nodefs.utimesSync(path, date, date);\n }\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n // Ignore not supported errors. Emscripten does utimesSync when it\n // writes files, but never really requires the value to be set.\n if (e.code !== \"ENOTSUP\") {\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n if (attr.size !== undefined) {\n try {\n this.nodefs.truncateSync(path, attr.size);\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n }\n\n public lookup(parent: EmscriptenFSNode, name: string): EmscriptenFSNode {\n const path = this.PATH.join2(this.fs.realPath(parent), name);\n const mode = this.fs.getMode(path);\n return this.fs.createNode(parent, name, mode);\n }\n\n public mknod(parent: EmscriptenFSNode, name: string, mode: number, dev: any): EmscriptenFSNode {\n const node = this.fs.createNode(parent, name, mode, dev);\n // create the backing node for this in the fs root as well\n const path = this.fs.realPath(node);\n try {\n if (this.FS.isDir(node.mode)) {\n this.nodefs.mkdirSync(path, node.mode);\n } else {\n this.nodefs.writeFileSync(path, '', { mode: node.mode });\n }\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n return node;\n }\n\n public rename(oldNode: EmscriptenFSNode, newDir: EmscriptenFSNode, newName: string): void {\n const oldPath = this.fs.realPath(oldNode);\n const newPath = this.PATH.join2(this.fs.realPath(newDir), newName);\n try {\n this.nodefs.renameSync(oldPath, newPath);\n // This logic is missing from the original NodeFS,\n // causing Emscripten's filesystem to think that the old file still exists.\n oldNode.name = newName;\n oldNode.parent = newDir;\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n\n public unlink(parent: EmscriptenFSNode, name: string): void {\n const path = this.PATH.join2(this.fs.realPath(parent), name);\n try {\n this.nodefs.unlinkSync(path);\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n\n public rmdir(parent: EmscriptenFSNode, name: string) {\n const path = this.PATH.join2(this.fs.realPath(parent), name);\n try {\n this.nodefs.rmdirSync(path);\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n\n public readdir(node: EmscriptenFSNode): string[] {\n const path = this.fs.realPath(node);\n try {\n // Node does not list . and .. in directory listings,\n // but Emscripten expects it.\n const contents = this.nodefs.readdirSync(path);\n contents.push('.', '..');\n return contents;\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n\n public symlink(parent: EmscriptenFSNode, newName: string, oldPath: string): void {\n const newPath = this.PATH.join2(this.fs.realPath(parent), newName);\n try {\n this.nodefs.symlinkSync(oldPath, newPath);\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n\n public readlink(node: EmscriptenFSNode): string {\n const path = this.fs.realPath(node);\n try {\n return this.nodefs.readlinkSync(path);\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n }\n}\n\nexport default class BFSEmscriptenFS implements EmscriptenFS {\n // This maps the integer permission modes from http://linux.die.net/man/3/open\n // to node.js-specific file open permission strings at http://nodejs.org/api/fs.html#fs_fs_open_path_flags_mode_callback\n public flagsToPermissionStringMap = {\n 0/*O_RDONLY*/: 'r',\n 1/*O_WRONLY*/: 'r+',\n 2/*O_RDWR*/: 'r+',\n 64/*O_CREAT*/: 'r',\n 65/*O_WRONLY|O_CREAT*/: 'r+',\n 66/*O_RDWR|O_CREAT*/: 'r+',\n 129/*O_WRONLY|O_EXCL*/: 'rx+',\n 193/*O_WRONLY|O_CREAT|O_EXCL*/: 'rx+',\n 514/*O_RDWR|O_TRUNC*/: 'w+',\n 577/*O_WRONLY|O_CREAT|O_TRUNC*/: 'w',\n 578/*O_CREAT|O_RDWR|O_TRUNC*/: 'w+',\n 705/*O_WRONLY|O_CREAT|O_EXCL|O_TRUNC*/: 'wx',\n 706/*O_RDWR|O_CREAT|O_EXCL|O_TRUNC*/: 'wx+',\n 1024/*O_APPEND*/: 'a',\n 1025/*O_WRONLY|O_APPEND*/: 'a',\n 1026/*O_RDWR|O_APPEND*/: 'a+',\n 1089/*O_WRONLY|O_CREAT|O_APPEND*/: 'a',\n 1090/*O_RDWR|O_CREAT|O_APPEND*/: 'a+',\n 1153/*O_WRONLY|O_EXCL|O_APPEND*/: 'ax',\n 1154/*O_RDWR|O_EXCL|O_APPEND*/: 'ax+',\n 1217/*O_WRONLY|O_CREAT|O_EXCL|O_APPEND*/: 'ax',\n 1218/*O_RDWR|O_CREAT|O_EXCL|O_APPEND*/: 'ax+',\n 4096/*O_RDONLY|O_DSYNC*/: 'rs',\n 4098/*O_RDWR|O_DSYNC*/: 'rs+'\n };\n /* tslint:disable:variable-name */\n public node_ops: EmscriptenNodeOps;\n public stream_ops: EmscriptenStreamOps;\n /* tslint:enable:variable-name */\n\n private FS: any;\n private PATH: any;\n private ERRNO_CODES: any;\n private nodefs: FS;\n constructor(_FS = ( self)['FS'], _PATH = ( self)['PATH'], _ERRNO_CODES = ( self)['ERRNO_CODES'], nodefs: FS = fs) {\n this.nodefs = nodefs;\n this.FS = _FS;\n this.PATH = _PATH;\n this.ERRNO_CODES = _ERRNO_CODES;\n this.node_ops = new BFSEmscriptenNodeOps(this);\n this.stream_ops = new BFSEmscriptenStreamOps(this);\n }\n\n public mount(m: {opts: {root: string}}): EmscriptenFSNode {\n return this.createNode(null, '/', this.getMode(m.opts.root), 0);\n }\n\n public createNode(parent: EmscriptenFSNode | null, name: string, mode: number, dev?: any): EmscriptenFSNode {\n const FS = this.FS;\n if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) {\n throw new FS.ErrnoError(this.ERRNO_CODES.EINVAL);\n }\n const node = FS.createNode(parent, name, mode);\n node.node_ops = this.node_ops;\n node.stream_ops = this.stream_ops;\n return node;\n }\n\n public getMode(path: string): number {\n let stat: NodeStats;\n try {\n stat = this.nodefs.lstatSync(path);\n } catch (e) {\n if (!e.code) {\n throw e;\n }\n throw new this.FS.ErrnoError(this.ERRNO_CODES[e.code]);\n }\n return stat.mode;\n }\n\n public realPath(node: EmscriptenFSNode): string {\n const parts: string[] = [];\n while (node.parent !== node) {\n parts.push(node.name);\n node = node.parent;\n }\n parts.push(node.mount.opts.root);\n parts.reverse();\n return this.PATH.join.apply(null, parts);\n }\n\n public flagsToPermissionString(flags: string | number): string {\n let parsedFlags = (typeof flags === \"string\") ? parseInt(flags, 10) : flags;\n parsedFlags &= 0x1FFF;\n if (parsedFlags in this.flagsToPermissionStringMap) {\n return ( this.flagsToPermissionStringMap)[parsedFlags];\n } else {\n return flags;\n }\n }\n\n public getNodeFS() {\n return this.nodefs;\n }\n\n public getFS() {\n return this.FS;\n }\n\n public getPATH() {\n return this.PATH;\n }\n\n public getERRNO_CODES() {\n return this.ERRNO_CODES;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/emscripten_fs.ts","import {ApiError, ErrorCode} from './api_error';\nimport Stats from './node_fs_stats';\nimport {File} from './file';\nimport {FileFlag, ActionType} from './file_flag';\nimport * as path from 'path';\nimport {fail} from './util';\n\nexport type BFSOneArgCallback = (e?: ApiError | null) => any;\nexport type BFSCallback = (e: ApiError | null | undefined, rv?: T) => any;\nexport type BFSThreeArgCallback =\n (e: ApiError | null | undefined, arg1?: T, arg2?: U) => any;\n\n/**\n * Interface for a filesystem. **All** BrowserFS FileSystems should implement\n * this interface.\n *\n * Below, we denote each API method as **Core**, **Supplemental**, or\n * **Optional**.\n *\n * ### Core Methods\n *\n * **Core** API methods *need* to be implemented for basic read/write\n * functionality.\n *\n * Note that read-only FileSystems can choose to not implement core methods\n * that mutate files or metadata. The default implementation will pass a\n * NOT_SUPPORTED error to the callback.\n *\n * ### Supplemental Methods\n *\n * **Supplemental** API methods do not need to be implemented by a filesystem.\n * The default implementation implements all of the supplemental API methods in\n * terms of the **core** API methods.\n *\n * Note that a file system may choose to implement supplemental methods for\n * efficiency reasons.\n *\n * The code for some supplemental methods was adapted directly from NodeJS's\n * fs.js source code.\n *\n * ### Optional Methods\n *\n * **Optional** API methods provide functionality that may not be available in\n * all filesystems. For example, all symlink/hardlink-related API methods fall\n * under this category.\n *\n * The default implementation will pass a NOT_SUPPORTED error to the callback.\n *\n * ### Argument Assumptions\n *\n * You can assume the following about arguments passed to each API method:\n *\n * * **Every path is an absolute path.** Meaning, `.`, `..`, and other items\n * are resolved into an absolute form.\n * * **All arguments are present.** Any optional arguments at the Node API level\n * have been passed in with their default values.\n * * **The callback will reset the stack depth.** When your filesystem calls the\n * callback with the requested information, it will use `setImmediate` to\n * reset the JavaScript stack depth before calling the user-supplied callback.\n */\nexport interface FileSystem {\n /**\n * **Optional**: Returns the name of the file system.\n */\n getName(): string;\n /**\n * **Optional**: Passes the following information to the callback:\n *\n * * Total number of bytes available on this file system.\n * * number of free bytes available on this file system.\n *\n * @todo This info is not available through the Node API. Perhaps we could do a\n * polyfill of diskspace.js, or add a new Node API function.\n * @param path The path to the location that is being queried. Only\n * useful for filesystems that support mount points.\n */\n diskSpace(p: string, cb: (total: number, free: number) => any): void;\n /**\n * **Core**: Is this filesystem read-only?\n * @return True if this FileSystem is inherently read-only.\n */\n isReadOnly(): boolean;\n /**\n * **Core**: Does the filesystem support optional symlink/hardlink-related\n * commands?\n * @return True if the FileSystem supports the optional\n * symlink/hardlink-related commands.\n */\n supportsLinks(): boolean;\n /**\n * **Core**: Does the filesystem support optional property-related commands?\n * @return True if the FileSystem supports the optional\n * property-related commands (permissions, utimes, etc).\n */\n supportsProps(): boolean;\n /**\n * **Core**: Does the filesystem support the optional synchronous interface?\n * @return True if the FileSystem supports synchronous operations.\n */\n supportsSynch(): boolean;\n // **CORE API METHODS**\n // File or directory operations\n /**\n * **Core**: Asynchronous rename. No arguments other than a possible exception\n * are given to the completion callback.\n */\n rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void;\n /**\n * **Core**: Synchronous rename.\n */\n renameSync(oldPath: string, newPath: string): void;\n /**\n * **Core**: Asynchronous `stat` or `lstat`.\n * @param isLstat True if this is `lstat`, false if this is regular\n * `stat`.\n */\n stat(p: string, isLstat: boolean | null, cb: BFSCallback): void;\n /**\n * **Core**: Synchronous `stat` or `lstat`.\n * @param isLstat True if this is `lstat`, false if this is regular\n * `stat`.\n */\n statSync(p: string, isLstat: boolean | null): Stats;\n // File operations\n /**\n * **Core**: Asynchronous file open.\n * @see http://www.manpagez.com/man/2/open/\n * @param flags Handles the complexity of the various file\n * modes. See its API for more details.\n * @param mode Mode to use to open the file. Can be ignored if the\n * filesystem doesn't support permissions.\n */\n open(p: string, flag: FileFlag, mode: number, cb: BFSCallback): void;\n /**\n * **Core**: Synchronous file open.\n * @see http://www.manpagez.com/man/2/open/\n * @param flags Handles the complexity of the various file\n * modes. See its API for more details.\n * @param mode Mode to use to open the file. Can be ignored if the\n * filesystem doesn't support permissions.\n */\n openSync(p: string, flag: FileFlag, mode: number): File;\n /**\n * **Core**: Asynchronous `unlink`.\n */\n unlink(p: string, cb: BFSOneArgCallback): void;\n /**\n * **Core**: Synchronous `unlink`.\n */\n unlinkSync(p: string): void;\n // Directory operations\n /**\n * **Core**: Asynchronous `rmdir`.\n */\n rmdir(p: string, cb: BFSOneArgCallback): void;\n /**\n * **Core**: Synchronous `rmdir`.\n */\n rmdirSync(p: string): void;\n /**\n * **Core**: Asynchronous `mkdir`.\n * @param mode Mode to make the directory using. Can be ignored if\n * the filesystem doesn't support permissions.\n */\n mkdir(p: string, mode: number, cb: BFSOneArgCallback): void;\n /**\n * **Core**: Synchronous `mkdir`.\n * @param mode Mode to make the directory using. Can be ignored if\n * the filesystem doesn't support permissions.\n */\n mkdirSync(p: string, mode: number): void;\n /**\n * **Core**: Asynchronous `readdir`. Reads the contents of a directory.\n *\n * The callback gets two arguments `(err, files)` where `files` is an array of\n * the names of the files in the directory excluding `'.'` and `'..'`.\n */\n readdir(p: string, cb: BFSCallback): void;\n /**\n * **Core**: Synchronous `readdir`. Reads the contents of a directory.\n */\n readdirSync(p: string): string[];\n // **SUPPLEMENTAL INTERFACE METHODS**\n // File or directory operations\n /**\n * **Supplemental**: Test whether or not the given path exists by checking with\n * the file system. Then call the callback argument with either true or false.\n */\n exists(p: string, cb: (exists: boolean) => void): void;\n /**\n * **Supplemental**: Test whether or not the given path exists by checking with\n * the file system.\n */\n existsSync(p: string): boolean;\n /**\n * **Supplemental**: Asynchronous `realpath`. The callback gets two arguments\n * `(err, resolvedPath)`.\n *\n * Note that the Node API will resolve `path` to an absolute path.\n * @param cache An object literal of mapped paths that can be used to\n * force a specific path resolution or avoid additional `fs.stat` calls for\n * known real paths. If not supplied by the user, it'll be an empty object.\n */\n realpath(p: string, cache: {[path: string]: string}, cb: BFSCallback): void;\n /**\n * **Supplemental**: Synchronous `realpath`.\n *\n * Note that the Node API will resolve `path` to an absolute path.\n * @param cache An object literal of mapped paths that can be used to\n * force a specific path resolution or avoid additional `fs.stat` calls for\n * known real paths. If not supplied by the user, it'll be an empty object.\n */\n realpathSync(p: string, cache: {[path: string]: string}): string;\n // File operations\n /**\n * **Supplemental**: Asynchronous `truncate`.\n */\n truncate(p: string, len: number, cb: BFSOneArgCallback): void;\n /**\n * **Supplemental**: Synchronous `truncate`.\n */\n truncateSync(p: string, len: number): void;\n /**\n * **Supplemental**: Asynchronously reads the entire contents of a file.\n * @param encoding If non-null, the file's contents should be decoded\n * into a string using that encoding. Otherwise, if encoding is null, fetch\n * the file's contents as a Buffer.\n * @param cb If no encoding is specified, then the raw buffer is returned.\n */\n readFile(fname: string, encoding: string | null, flag: FileFlag, cb: BFSCallback): void;\n /**\n * **Supplemental**: Synchronously reads the entire contents of a file.\n * @param encoding If non-null, the file's contents should be decoded\n * into a string using that encoding. Otherwise, if encoding is null, fetch\n * the file's contents as a Buffer.\n */\n readFileSync(fname: string, encoding: string | null, flag: FileFlag): any;\n /**\n * **Supplemental**: Asynchronously writes data to a file, replacing the file\n * if it already exists.\n *\n * The encoding option is ignored if data is a buffer.\n */\n writeFile(fname: string, data: any, encoding: string | null, flag: FileFlag, mode: number, cb: BFSOneArgCallback): void;\n /**\n * **Supplemental**: Synchronously writes data to a file, replacing the file\n * if it already exists.\n *\n * The encoding option is ignored if data is a buffer.\n */\n writeFileSync(fname: string, data: string | Buffer, encoding: string | null, flag: FileFlag, mode: number): void;\n /**\n * **Supplemental**: Asynchronously append data to a file, creating the file if\n * it not yet exists.\n */\n appendFile(fname: string, data: string | Buffer, encoding: string | null, flag: FileFlag, mode: number, cb: BFSOneArgCallback): void;\n /**\n * **Supplemental**: Synchronously append data to a file, creating the file if\n * it not yet exists.\n */\n appendFileSync(fname: string, data: string | Buffer, encoding: string | null, flag: FileFlag, mode: number): void;\n // **OPTIONAL INTERFACE METHODS**\n // Property operations\n // This isn't always possible on some filesystem types (e.g. Dropbox).\n /**\n * **Optional**: Asynchronous `chmod` or `lchmod`.\n * @param isLchmod `True` if `lchmod`, false if `chmod`. Has no\n * bearing on result if links aren't supported.\n */\n chmod(p: string, isLchmod: boolean, mode: number, cb: BFSOneArgCallback): void;\n /**\n * **Optional**: Synchronous `chmod` or `lchmod`.\n * @param isLchmod `True` if `lchmod`, false if `chmod`. Has no\n * bearing on result if links aren't supported.\n */\n chmodSync(p: string, isLchmod: boolean, mode: number): void;\n /**\n * **Optional**: Asynchronous `chown` or `lchown`.\n * @param isLchown `True` if `lchown`, false if `chown`. Has no\n * bearing on result if links aren't supported.\n */\n chown(p: string, isLchown: boolean, uid: number, gid: number, cb: BFSOneArgCallback): void;\n /**\n * **Optional**: Synchronous `chown` or `lchown`.\n * @param isLchown `True` if `lchown`, false if `chown`. Has no\n * bearing on result if links aren't supported.\n */\n chownSync(p: string, isLchown: boolean, uid: number, gid: number): void;\n /**\n * **Optional**: Change file timestamps of the file referenced by the supplied\n * path.\n */\n utimes(p: string, atime: Date, mtime: Date, cb: BFSOneArgCallback): void;\n /**\n * **Optional**: Change file timestamps of the file referenced by the supplied\n * path.\n */\n utimesSync(p: string, atime: Date, mtime: Date): void;\n // Symlink operations\n // Symlinks aren't always supported.\n /**\n * **Optional**: Asynchronous `link`.\n */\n link(srcpath: string, dstpath: string, cb: BFSOneArgCallback): void;\n /**\n * **Optional**: Synchronous `link`.\n */\n linkSync(srcpath: string, dstpath: string): void;\n /**\n * **Optional**: Asynchronous `symlink`.\n * @param type can be either `'dir'` or `'file'`\n */\n symlink(srcpath: string, dstpath: string, type: string, cb: BFSOneArgCallback): void;\n /**\n * **Optional**: Synchronous `symlink`.\n * @param type can be either `'dir'` or `'file'`\n */\n symlinkSync(srcpath: string, dstpath: string, type: string): void;\n /**\n * **Optional**: Asynchronous readlink.\n */\n readlink(p: string, cb: BFSCallback): void;\n /**\n * **Optional**: Synchronous readlink.\n */\n readlinkSync(p: string): string;\n}\n\n/**\n * Describes a file system option.\n */\nexport interface FileSystemOption {\n // The basic JavaScript type(s) for this option.\n type: string | string[];\n // Whether or not the option is optional (e.g., can be set to null or undefined).\n // Defaults to `false`.\n optional?: boolean;\n // Description of the option. Used in error messages and documentation.\n description: string;\n // A custom validation function to check if the option is valid.\n // Calls the callback with an error object on an error.\n // (Can call callback synchronously.)\n // Defaults to `(opt, cb) => cb()`.\n validator?(opt: T, cb: BFSOneArgCallback): void;\n}\n\n/**\n * Describes all of the options available in a file system.\n */\nexport interface FileSystemOptions {\n [name: string]: FileSystemOption;\n}\n\n/**\n * Contains typings for static functions on the file system constructor.\n */\nexport interface FileSystemConstructor {\n /**\n * **Core**: Name to identify this particular file system.\n */\n Name: string;\n /**\n * **Core**: Describes all of the options available for this file system.\n */\n Options: FileSystemOptions;\n /**\n * **Core**: Creates a file system of this given type with the given\n * options.\n */\n Create(options: object, cb: BFSCallback): void;\n /**\n * **Core**: Returns 'true' if this filesystem is available in the current\n * environment. For example, a `localStorage`-backed filesystem will return\n * 'false' if the browser does not support that API.\n *\n * Defaults to 'false', as the FileSystem base class isn't usable alone.\n */\n isAvailable(): boolean;\n}\n\n/**\n * Basic filesystem class. Most filesystems should extend this class, as it\n * provides default implementations for a handful of methods.\n */\nexport class BaseFileSystem {\n public supportsLinks(): boolean {\n return false;\n }\n public diskSpace(p: string, cb: (total: number, free: number) => any): void {\n cb(0, 0);\n }\n /**\n * Opens the file at path p with the given flag. The file must exist.\n * @param p The path to open.\n * @param flag The flag to use when opening the file.\n */\n public openFile(p: string, flag: FileFlag, cb: BFSCallback): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n /**\n * Create the file at path p with the given mode. Then, open it with the given\n * flag.\n */\n public createFile(p: string, flag: FileFlag, mode: number, cb: BFSCallback): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public open(p: string, flag: FileFlag, mode: number, cb: BFSCallback): void {\n const mustBeFile = (e: ApiError, stats?: Stats): void => {\n if (e) {\n // File does not exist.\n switch (flag.pathNotExistsAction()) {\n case ActionType.CREATE_FILE:\n // Ensure parent exists.\n return this.stat(path.dirname(p), false, (e: ApiError, parentStats?: Stats) => {\n if (e) {\n cb(e);\n } else if (parentStats && !parentStats.isDirectory()) {\n cb(ApiError.ENOTDIR(path.dirname(p)));\n } else {\n this.createFile(p, flag, mode, cb);\n }\n });\n case ActionType.THROW_EXCEPTION:\n return cb(ApiError.ENOENT(p));\n default:\n return cb(new ApiError(ErrorCode.EINVAL, 'Invalid FileFlag object.'));\n }\n } else {\n // File exists.\n if (stats && stats.isDirectory()) {\n return cb(ApiError.EISDIR(p));\n }\n switch (flag.pathExistsAction()) {\n case ActionType.THROW_EXCEPTION:\n return cb(ApiError.EEXIST(p));\n case ActionType.TRUNCATE_FILE:\n // NOTE: In a previous implementation, we deleted the file and\n // re-created it. However, this created a race condition if another\n // asynchronous request was trying to read the file, as the file\n // would not exist for a small period of time.\n return this.openFile(p, flag, (e: ApiError, fd?: File): void => {\n if (e) {\n cb(e);\n } else if (fd) {\n fd.truncate(0, () => {\n fd.sync(() => {\n cb(null, fd);\n });\n });\n } else {\n fail();\n }\n });\n case ActionType.NOP:\n return this.openFile(p, flag, cb);\n default:\n return cb(new ApiError(ErrorCode.EINVAL, 'Invalid FileFlag object.'));\n }\n }\n };\n this.stat(p, false, mustBeFile);\n }\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public renameSync(oldPath: string, newPath: string): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public stat(p: string, isLstat: boolean | null, cb: BFSCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public statSync(p: string, isLstat: boolean | null): Stats {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n /**\n * Opens the file at path p with the given flag. The file must exist.\n * @param p The path to open.\n * @param flag The flag to use when opening the file.\n * @return A File object corresponding to the opened file.\n */\n public openFileSync(p: string, flag: FileFlag, mode: number): File {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n /**\n * Create the file at path p with the given mode. Then, open it with the given\n * flag.\n */\n public createFileSync(p: string, flag: FileFlag, mode: number): File {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public openSync(p: string, flag: FileFlag, mode: number): File {\n // Check if the path exists, and is a file.\n let stats: Stats;\n try {\n stats = this.statSync(p, false);\n } catch (e) {\n // File does not exist.\n switch (flag.pathNotExistsAction()) {\n case ActionType.CREATE_FILE:\n // Ensure parent exists.\n const parentStats = this.statSync(path.dirname(p), false);\n if (!parentStats.isDirectory()) {\n throw ApiError.ENOTDIR(path.dirname(p));\n }\n return this.createFileSync(p, flag, mode);\n case ActionType.THROW_EXCEPTION:\n throw ApiError.ENOENT(p);\n default:\n throw new ApiError(ErrorCode.EINVAL, 'Invalid FileFlag object.');\n }\n }\n\n // File exists.\n if (stats.isDirectory()) {\n throw ApiError.EISDIR(p);\n }\n switch (flag.pathExistsAction()) {\n case ActionType.THROW_EXCEPTION:\n throw ApiError.EEXIST(p);\n case ActionType.TRUNCATE_FILE:\n // Delete file.\n this.unlinkSync(p);\n // Create file. Use the same mode as the old file.\n // Node itself modifies the ctime when this occurs, so this action\n // will preserve that behavior if the underlying file system\n // supports those properties.\n return this.createFileSync(p, flag, stats.mode);\n case ActionType.NOP:\n return this.openFileSync(p, flag, mode);\n default:\n throw new ApiError(ErrorCode.EINVAL, 'Invalid FileFlag object.');\n }\n }\n public unlink(p: string, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public unlinkSync(p: string): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public rmdir(p: string, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public rmdirSync(p: string): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public mkdir(p: string, mode: number, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public mkdirSync(p: string, mode: number): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public readdir(p: string, cb: BFSCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public readdirSync(p: string): string[] {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public exists(p: string, cb: (exists: boolean) => void): void {\n this.stat(p, null, function(err) {\n cb(!err);\n });\n }\n public existsSync(p: string): boolean {\n try {\n this.statSync(p, true);\n return true;\n } catch (e) {\n return false;\n }\n }\n public realpath(p: string, cache: {[path: string]: string}, cb: BFSCallback): void {\n if (this.supportsLinks()) {\n // The path could contain symlinks. Split up the path,\n // resolve any symlinks, return the resolved string.\n const splitPath = p.split(path.sep);\n // TODO: Simpler to just pass through file, find sep and such.\n for (let i = 0; i < splitPath.length; i++) {\n const addPaths = splitPath.slice(0, i + 1);\n splitPath[i] = path.join.apply(null, addPaths);\n }\n } else {\n // No symlinks. We just need to verify that it exists.\n this.exists(p, function(doesExist) {\n if (doesExist) {\n cb(null, p);\n } else {\n cb(ApiError.ENOENT(p));\n }\n });\n }\n }\n public realpathSync(p: string, cache: {[path: string]: string}): string {\n if (this.supportsLinks()) {\n // The path could contain symlinks. Split up the path,\n // resolve any symlinks, return the resolved string.\n const splitPath = p.split(path.sep);\n // TODO: Simpler to just pass through file, find sep and such.\n for (let i = 0; i < splitPath.length; i++) {\n const addPaths = splitPath.slice(0, i + 1);\n splitPath[i] = path.join.apply(path, addPaths);\n }\n return splitPath.join(path.sep);\n } else {\n // No symlinks. We just need to verify that it exists.\n if (this.existsSync(p)) {\n return p;\n } else {\n throw ApiError.ENOENT(p);\n }\n }\n }\n public truncate(p: string, len: number, cb: BFSOneArgCallback): void {\n this.open(p, FileFlag.getFileFlag('r+'), 0x1a4, (function(er: ApiError, fd?: File) {\n if (er) {\n return cb(er);\n }\n fd!.truncate(len, (function(er: any) {\n fd!.close((function(er2: any) {\n cb(er || er2);\n }));\n }));\n }));\n }\n public truncateSync(p: string, len: number): void {\n const fd = this.openSync(p, FileFlag.getFileFlag('r+'), 0x1a4);\n // Need to safely close FD, regardless of whether or not truncate succeeds.\n try {\n fd.truncateSync(len);\n } catch (e) {\n throw e;\n } finally {\n fd.closeSync();\n }\n }\n public readFile(fname: string, encoding: string | null, flag: FileFlag, cb: BFSCallback): void {\n // Wrap cb in file closing code.\n const oldCb = cb;\n // Get file.\n this.open(fname, flag, 0x1a4, (err, fd) => {\n if (err) {\n return cb(err);\n }\n cb = function(err?: ApiError | null, arg?: string | Buffer) {\n fd!.close(function(err2: any) {\n if (!err) {\n err = err2;\n }\n return oldCb(err, arg);\n });\n };\n fd!.stat((err, stat?) => {\n if (err) {\n return cb(err);\n }\n // Allocate buffer.\n const buf = Buffer.alloc(stat!.size);\n fd!.read(buf, 0, stat!.size, 0, (err?: ApiError | null) => {\n if (err) {\n return cb(err);\n } else if (encoding === null) {\n return cb(err, buf);\n }\n try {\n cb(null, buf.toString(encoding));\n } catch (e) {\n cb(e);\n }\n });\n });\n });\n }\n public readFileSync(fname: string, encoding: string | null, flag: FileFlag): any {\n // Get file.\n const fd = this.openSync(fname, flag, 0x1a4);\n try {\n const stat = fd.statSync();\n // Allocate buffer.\n const buf = Buffer.alloc(stat.size);\n fd.readSync(buf, 0, stat.size, 0);\n fd.closeSync();\n if (encoding === null) {\n return buf;\n }\n return buf.toString(encoding);\n } finally {\n fd.closeSync();\n }\n }\n public writeFile(fname: string, data: any, encoding: string | null, flag: FileFlag, mode: number, cb: BFSOneArgCallback): void {\n // Wrap cb in file closing code.\n const oldCb = cb;\n // Get file.\n this.open(fname, flag, 0x1a4, function(err: ApiError, fd?: File) {\n if (err) {\n return cb(err);\n }\n cb = function(err: ApiError) {\n fd!.close(function(err2: any) {\n oldCb(err ? err : err2);\n });\n };\n\n try {\n if (typeof data === 'string') {\n data = Buffer.from(data, encoding!);\n }\n } catch (e) {\n return cb(e);\n }\n // Write into file.\n fd!.write(data, 0, data.length, 0, cb);\n });\n }\n public writeFileSync(fname: string, data: any, encoding: string | null, flag: FileFlag, mode: number): void {\n // Get file.\n const fd = this.openSync(fname, flag, mode);\n try {\n if (typeof data === 'string') {\n data = Buffer.from(data, encoding!);\n }\n // Write into file.\n fd.writeSync(data, 0, data.length, 0);\n } finally {\n fd.closeSync();\n }\n }\n public appendFile(fname: string, data: any, encoding: string | null, flag: FileFlag, mode: number, cb: BFSOneArgCallback): void {\n // Wrap cb in file closing code.\n const oldCb = cb;\n this.open(fname, flag, mode, function(err: ApiError, fd?: File) {\n if (err) {\n return cb(err);\n }\n cb = function(err: ApiError) {\n fd!.close(function(err2: any) {\n oldCb(err ? err : err2);\n });\n };\n if (typeof data === 'string') {\n data = Buffer.from(data, encoding!);\n }\n fd!.write(data, 0, data.length, null, cb);\n });\n }\n public appendFileSync(fname: string, data: any, encoding: string | null, flag: FileFlag, mode: number): void {\n const fd = this.openSync(fname, flag, mode);\n try {\n if (typeof data === 'string') {\n data = Buffer.from(data, encoding!);\n }\n fd.writeSync(data, 0, data.length, null);\n } finally {\n fd.closeSync();\n }\n }\n public chmod(p: string, isLchmod: boolean, mode: number, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public chmodSync(p: string, isLchmod: boolean, mode: number) {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public chown(p: string, isLchown: boolean, uid: number, gid: number, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public chownSync(p: string, isLchown: boolean, uid: number, gid: number): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public utimes(p: string, atime: Date, mtime: Date, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public utimesSync(p: string, atime: Date, mtime: Date): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public link(srcpath: string, dstpath: string, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public linkSync(srcpath: string, dstpath: string): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public symlink(srcpath: string, dstpath: string, type: string, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public symlinkSync(srcpath: string, dstpath: string, type: string): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public readlink(p: string, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public readlinkSync(p: string): string {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n}\n\n/**\n * Implements the asynchronous API in terms of the synchronous API.\n * @class SynchronousFileSystem\n */\nexport class SynchronousFileSystem extends BaseFileSystem {\n public supportsSynch(): boolean {\n return true;\n }\n\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void {\n try {\n this.renameSync(oldPath, newPath);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n public stat(p: string, isLstat: boolean | null, cb: BFSCallback): void {\n try {\n cb(null, this.statSync(p, isLstat));\n } catch (e) {\n cb(e);\n }\n }\n\n public open(p: string, flags: FileFlag, mode: number, cb: BFSCallback): void {\n try {\n cb(null, this.openSync(p, flags, mode));\n } catch (e) {\n cb(e);\n }\n }\n\n public unlink(p: string, cb: BFSOneArgCallback): void {\n try {\n this.unlinkSync(p);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n public rmdir(p: string, cb: BFSOneArgCallback): void {\n try {\n this.rmdirSync(p);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n public mkdir(p: string, mode: number, cb: BFSOneArgCallback): void {\n try {\n this.mkdirSync(p, mode);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n public readdir(p: string, cb: BFSCallback): void {\n try {\n cb(null, this.readdirSync(p));\n } catch (e) {\n cb(e);\n }\n }\n\n public chmod(p: string, isLchmod: boolean, mode: number, cb: BFSOneArgCallback): void {\n try {\n this.chmodSync(p, isLchmod, mode);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n public chown(p: string, isLchown: boolean, uid: number, gid: number, cb: BFSOneArgCallback): void {\n try {\n this.chownSync(p, isLchown, uid, gid);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n public utimes(p: string, atime: Date, mtime: Date, cb: BFSOneArgCallback): void {\n try {\n this.utimesSync(p, atime, mtime);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n public link(srcpath: string, dstpath: string, cb: BFSOneArgCallback): void {\n try {\n this.linkSync(srcpath, dstpath);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n public symlink(srcpath: string, dstpath: string, type: string, cb: BFSOneArgCallback): void {\n try {\n this.symlinkSync(srcpath, dstpath, type);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n public readlink(p: string, cb: BFSCallback): void {\n try {\n cb(null, this.readlinkSync(p));\n } catch (e) {\n cb(e);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/file_system.ts","import {ApiError, ErrorCode} from './api_error';\nimport Stats from './node_fs_stats';\nimport {BFSCallback, BFSOneArgCallback, BFSThreeArgCallback} from './file_system';\n\nexport interface File {\n /**\n * **Core**: Get the current file position.\n */\n getPos(): number | undefined;\n /**\n * **Core**: Asynchronous `stat`.\n */\n stat(cb: BFSCallback): void;\n /**\n * **Core**: Synchronous `stat`.\n */\n statSync(): Stats;\n /**\n * **Core**: Asynchronous close.\n */\n close(cb: BFSOneArgCallback): void;\n /**\n * **Core**: Synchronous close.\n */\n closeSync(): void;\n /**\n * **Core**: Asynchronous truncate.\n */\n truncate(len: number, cb: BFSOneArgCallback): void;\n /**\n * **Core**: Synchronous truncate.\n */\n truncateSync(len: number): void;\n /**\n * **Core**: Asynchronous sync.\n */\n sync(cb: BFSOneArgCallback): void;\n /**\n * **Core**: Synchronous sync.\n */\n syncSync(): void;\n /**\n * **Core**: Write buffer to the file.\n * Note that it is unsafe to use fs.write multiple times on the same file\n * without waiting for the callback.\n * @param buffer Buffer containing the data to write to\n * the file.\n * @param offset Offset in the buffer to start reading data from.\n * @param length The amount of bytes to write to the file.\n * @param position Offset from the beginning of the file where this\n * data should be written. If position is null, the data will be written at\n * the current position.\n * @param cb The number specifies the number of bytes written into the file.\n */\n write(buffer: Buffer, offset: number, length: number, position: number | null, cb: BFSThreeArgCallback): void;\n /**\n * **Core**: Write buffer to the file.\n * Note that it is unsafe to use fs.writeSync multiple times on the same file\n * without waiting for it to return.\n * @param buffer Buffer containing the data to write to\n * the file.\n * @param offset Offset in the buffer to start reading data from.\n * @param length The amount of bytes to write to the file.\n * @param position Offset from the beginning of the file where this\n * data should be written. If position is null, the data will be written at\n * the current position.\n */\n writeSync(buffer: Buffer, offset: number, length: number, position: number | null): number;\n /**\n * **Core**: Read data from the file.\n * @param buffer The buffer that the data will be\n * written to.\n * @param offset The offset within the buffer where writing will\n * start.\n * @param length An integer specifying the number of bytes to read.\n * @param position An integer specifying where to begin reading from\n * in the file. If position is null, data will be read from the current file\n * position.\n * @param cb The number is the number of bytes read\n */\n read(buffer: Buffer, offset: number, length: number, position: number | null, cb: BFSThreeArgCallback): void;\n /**\n * **Core**: Read data from the file.\n * @param buffer The buffer that the data will be written to.\n * @param offset The offset within the buffer where writing will start.\n * @param length An integer specifying the number of bytes to read.\n * @param position An integer specifying where to begin reading from\n * in the file. If position is null, data will be read from the current file\n * position.\n */\n readSync(buffer: Buffer, offset: number, length: number, position: number): number;\n /**\n * **Supplementary**: Asynchronous `datasync`.\n *\n * Default implementation maps to `sync`.\n */\n datasync(cb: BFSOneArgCallback): void;\n /**\n * **Supplementary**: Synchronous `datasync`.\n *\n * Default implementation maps to `syncSync`.\n */\n datasyncSync(): void;\n /**\n * **Optional**: Asynchronous `chown`.\n */\n chown(uid: number, gid: number, cb: BFSOneArgCallback): void;\n /**\n * **Optional**: Synchronous `chown`.\n */\n chownSync(uid: number, gid: number): void;\n /**\n * **Optional**: Asynchronous `fchmod`.\n */\n chmod(mode: number, cb: BFSOneArgCallback): void;\n /**\n * **Optional**: Synchronous `fchmod`.\n */\n chmodSync(mode: number): void;\n /**\n * **Optional**: Change the file timestamps of the file.\n */\n utimes(atime: Date, mtime: Date, cb: BFSOneArgCallback): void;\n /**\n * **Optional**: Change the file timestamps of the file.\n */\n utimesSync(atime: Date, mtime: Date): void;\n}\n\n/**\n * Base class that contains shared implementations of functions for the file\n * object.\n */\nexport class BaseFile {\n public sync(cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public syncSync(): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public datasync(cb: BFSOneArgCallback): void {\n this.sync(cb);\n }\n public datasyncSync(): void {\n return this.syncSync();\n }\n public chown(uid: number, gid: number, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public chownSync(uid: number, gid: number): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public chmod(mode: number, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public chmodSync(mode: number): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n public utimes(atime: Date, mtime: Date, cb: BFSOneArgCallback): void {\n cb(new ApiError(ErrorCode.ENOTSUP));\n }\n public utimesSync(atime: Date, mtime: Date): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/file.ts","import {BaseFile, File} from '../core/file';\nimport {FileSystem, BFSOneArgCallback, BFSCallback, BFSThreeArgCallback} from '../core/file_system';\nimport Stats from '../core/node_fs_stats';\nimport {FileFlag} from '../core/file_flag';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport fs from '../core/node_fs';\nimport {emptyBuffer} from '../core/util';\n\n/**\n * An implementation of the File interface that operates on a file that is\n * completely in-memory. PreloadFiles are backed by a Buffer.\n *\n * This is also an abstract class, as it lacks an implementation of 'sync' and\n * 'close'. Each filesystem that wishes to use this file representation must\n * extend this class and implement those two methods.\n * @todo 'close' lever that disables functionality once closed.\n */\nexport default class PreloadFile extends BaseFile {\n protected _fs: T;\n private _pos: number = 0;\n private _path: string;\n private _stat: Stats;\n private _flag: FileFlag;\n private _buffer: Buffer;\n private _dirty: boolean = false;\n /**\n * Creates a file with the given path and, optionally, the given contents. Note\n * that, if contents is specified, it will be mutated by the file!\n * @param _fs The file system that created the file.\n * @param _path\n * @param _mode The mode that the file was opened using.\n * Dictates permissions and where the file pointer starts.\n * @param _stat The stats object for the given file.\n * PreloadFile will mutate this object. Note that this object must contain\n * the appropriate mode that the file was opened as.\n * @param contents A buffer containing the entire\n * contents of the file. PreloadFile will mutate this buffer. If not\n * specified, we assume it is a new file.\n */\n constructor(_fs: T, _path: string, _flag: FileFlag, _stat: Stats, contents?: Buffer) {\n super();\n this._fs = _fs;\n this._path = _path;\n this._flag = _flag;\n this._stat = _stat;\n if (contents) {\n this._buffer = contents;\n } else {\n // Empty buffer. It'll expand once we write stuff to it.\n this._buffer = emptyBuffer();\n }\n // Note: This invariant is *not* maintained once the file starts getting\n // modified.\n // Note: Only actually matters if file is readable, as writeable modes may\n // truncate/append to file.\n if (this._stat.size !== this._buffer.length && this._flag.isReadable()) {\n throw new Error(`Invalid buffer: Buffer is ${this._buffer.length} long, yet Stats object specifies that file is ${this._stat.size} long.`);\n }\n }\n\n /**\n * NONSTANDARD: Get the underlying buffer for this file. !!DO NOT MUTATE!! Will mess up dirty tracking.\n */\n public getBuffer(): Buffer {\n return this._buffer;\n }\n\n /**\n * NONSTANDARD: Get underlying stats for this file. !!DO NOT MUTATE!!\n */\n public getStats(): Stats {\n return this._stat;\n }\n\n public getFlag(): FileFlag {\n return this._flag;\n }\n\n /**\n * Get the path to this file.\n * @return [String] The path to the file.\n */\n public getPath(): string {\n return this._path;\n }\n\n /**\n * Get the current file position.\n *\n * We emulate the following bug mentioned in the Node documentation:\n * > On Linux, positional writes don't work when the file is opened in append\n * mode. The kernel ignores the position argument and always appends the data\n * to the end of the file.\n * @return [Number] The current file position.\n */\n public getPos(): number {\n if (this._flag.isAppendable()) {\n return this._stat.size;\n }\n return this._pos;\n }\n\n /**\n * Advance the current file position by the indicated number of positions.\n * @param [Number] delta\n */\n public advancePos(delta: number): number {\n return this._pos += delta;\n }\n\n /**\n * Set the file position.\n * @param [Number] newPos\n */\n public setPos(newPos: number): number {\n return this._pos = newPos;\n }\n\n /**\n * **Core**: Asynchronous sync. Must be implemented by subclasses of this\n * class.\n * @param [Function(BrowserFS.ApiError)] cb\n */\n public sync(cb: BFSOneArgCallback): void {\n try {\n this.syncSync();\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n /**\n * **Core**: Synchronous sync.\n */\n public syncSync(): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n\n /**\n * **Core**: Asynchronous close. Must be implemented by subclasses of this\n * class.\n * @param [Function(BrowserFS.ApiError)] cb\n */\n public close(cb: BFSOneArgCallback): void {\n try {\n this.closeSync();\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n /**\n * **Core**: Synchronous close.\n */\n public closeSync(): void {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n\n /**\n * Asynchronous `stat`.\n * @param [Function(BrowserFS.ApiError, BrowserFS.node.fs.Stats)] cb\n */\n public stat(cb: BFSCallback): void {\n try {\n cb(null, this._stat.clone());\n } catch (e) {\n cb(e);\n }\n }\n\n /**\n * Synchronous `stat`.\n */\n public statSync(): Stats {\n return this._stat.clone();\n }\n\n /**\n * Asynchronous truncate.\n * @param [Number] len\n * @param [Function(BrowserFS.ApiError)] cb\n */\n public truncate(len: number, cb: BFSOneArgCallback): void {\n try {\n this.truncateSync(len);\n if (this._flag.isSynchronous() && !fs.getRootFS()!.supportsSynch()) {\n this.sync(cb);\n }\n cb();\n } catch (e) {\n return cb(e);\n }\n }\n\n /**\n * Synchronous truncate.\n * @param [Number] len\n */\n public truncateSync(len: number): void {\n this._dirty = true;\n if (!this._flag.isWriteable()) {\n throw new ApiError(ErrorCode.EPERM, 'File not opened with a writeable mode.');\n }\n this._stat.mtime = new Date();\n if (len > this._buffer.length) {\n const buf = Buffer.alloc(len - this._buffer.length, 0);\n // Write will set @_stat.size for us.\n this.writeSync(buf, 0, buf.length, this._buffer.length);\n if (this._flag.isSynchronous() && fs.getRootFS()!.supportsSynch()) {\n this.syncSync();\n }\n return;\n }\n this._stat.size = len;\n // Truncate buffer to 'len'.\n const newBuff = Buffer.alloc(len);\n this._buffer.copy(newBuff, 0, 0, len);\n this._buffer = newBuff;\n if (this._flag.isSynchronous() && fs.getRootFS()!.supportsSynch()) {\n this.syncSync();\n }\n }\n\n /**\n * Write buffer to the file.\n * Note that it is unsafe to use fs.write multiple times on the same file\n * without waiting for the callback.\n * @param [BrowserFS.node.Buffer] buffer Buffer containing the data to write to\n * the file.\n * @param [Number] offset Offset in the buffer to start reading data from.\n * @param [Number] length The amount of bytes to write to the file.\n * @param [Number] position Offset from the beginning of the file where this\n * data should be written. If position is null, the data will be written at\n * the current position.\n * @param [Function(BrowserFS.ApiError, Number, BrowserFS.node.Buffer)]\n * cb The number specifies the number of bytes written into the file.\n */\n public write(buffer: Buffer, offset: number, length: number, position: number, cb: BFSThreeArgCallback): void {\n try {\n cb(null, this.writeSync(buffer, offset, length, position), buffer);\n } catch (e) {\n cb(e);\n }\n }\n\n /**\n * Write buffer to the file.\n * Note that it is unsafe to use fs.writeSync multiple times on the same file\n * without waiting for the callback.\n * @param [BrowserFS.node.Buffer] buffer Buffer containing the data to write to\n * the file.\n * @param [Number] offset Offset in the buffer to start reading data from.\n * @param [Number] length The amount of bytes to write to the file.\n * @param [Number] position Offset from the beginning of the file where this\n * data should be written. If position is null, the data will be written at\n * the current position.\n * @return [Number]\n */\n public writeSync(buffer: Buffer, offset: number, length: number, position: number): number {\n this._dirty = true;\n if (position === undefined || position === null) {\n position = this.getPos();\n }\n if (!this._flag.isWriteable()) {\n throw new ApiError(ErrorCode.EPERM, 'File not opened with a writeable mode.');\n }\n const endFp = position + length;\n if (endFp > this._stat.size) {\n this._stat.size = endFp;\n if (endFp > this._buffer.length) {\n // Extend the buffer!\n const newBuff = Buffer.alloc(endFp);\n this._buffer.copy(newBuff);\n this._buffer = newBuff;\n }\n }\n const len = buffer.copy(this._buffer, position, offset, offset + length);\n this._stat.mtime = new Date();\n if (this._flag.isSynchronous()) {\n this.syncSync();\n return len;\n }\n this.setPos(position + len);\n return len;\n }\n\n /**\n * Read data from the file.\n * @param [BrowserFS.node.Buffer] buffer The buffer that the data will be\n * written to.\n * @param [Number] offset The offset within the buffer where writing will\n * start.\n * @param [Number] length An integer specifying the number of bytes to read.\n * @param [Number] position An integer specifying where to begin reading from\n * in the file. If position is null, data will be read from the current file\n * position.\n * @param [Function(BrowserFS.ApiError, Number, BrowserFS.node.Buffer)] cb The\n * number is the number of bytes read\n */\n public read(buffer: Buffer, offset: number, length: number, position: number, cb: BFSThreeArgCallback): void {\n try {\n cb(null, this.readSync(buffer, offset, length, position), buffer);\n } catch (e) {\n cb(e);\n }\n }\n\n /**\n * Read data from the file.\n * @param [BrowserFS.node.Buffer] buffer The buffer that the data will be\n * written to.\n * @param [Number] offset The offset within the buffer where writing will\n * start.\n * @param [Number] length An integer specifying the number of bytes to read.\n * @param [Number] position An integer specifying where to begin reading from\n * in the file. If position is null, data will be read from the current file\n * position.\n * @return [Number]\n */\n public readSync(buffer: Buffer, offset: number, length: number, position: number): number {\n if (!this._flag.isReadable()) {\n throw new ApiError(ErrorCode.EPERM, 'File not opened with a readable mode.');\n }\n if (position === undefined || position === null) {\n position = this.getPos();\n }\n const endRead = position + length;\n if (endRead > this._stat.size) {\n length = this._stat.size - position;\n }\n const rv = this._buffer.copy(buffer, offset, position, position + length);\n this._stat.atime = new Date();\n this._pos = position + length;\n return rv;\n }\n\n /**\n * Asynchronous `fchmod`.\n * @param [Number|String] mode\n * @param [Function(BrowserFS.ApiError)] cb\n */\n public chmod(mode: number, cb: BFSOneArgCallback): void {\n try {\n this.chmodSync(mode);\n cb();\n } catch (e) {\n cb(e);\n }\n }\n\n /**\n * Asynchronous `fchmod`.\n * @param [Number] mode\n */\n public chmodSync(mode: number): void {\n if (!this._fs.supportsProps()) {\n throw new ApiError(ErrorCode.ENOTSUP);\n }\n this._dirty = true;\n this._stat.chmod(mode);\n this.syncSync();\n }\n\n protected isDirty(): boolean {\n return this._dirty;\n }\n\n /**\n * Resets the dirty bit. Should only be called after a sync has completed successfully.\n */\n protected resetDirty() {\n this._dirty = false;\n }\n}\n\n/**\n * File class for the InMemory and XHR file systems.\n * Doesn't sync to anything, so it works nicely for memory-only files.\n */\nexport class NoSyncFile extends PreloadFile implements File {\n constructor(_fs: T, _path: string, _flag: FileFlag, _stat: Stats, contents?: Buffer) {\n super(_fs, _path, _flag, _stat, contents);\n }\n /**\n * Asynchronous sync. Doesn't do anything, simply calls the cb.\n * @param [Function(BrowserFS.ApiError)] cb\n */\n public sync(cb: BFSOneArgCallback): void {\n cb();\n }\n /**\n * Synchronous sync. Doesn't do anything.\n */\n public syncSync(): void {\n // NOP.\n }\n /**\n * Asynchronous close. Doesn't do anything, simply calls the cb.\n * @param [Function(BrowserFS.ApiError)] cb\n */\n public close(cb: BFSOneArgCallback): void {\n cb();\n }\n /**\n * Synchronous close. Doesn't do anything.\n */\n public closeSync(): void {\n // NOP.\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/preload_file.ts","import {FileSystem, SynchronousFileSystem, BFSOneArgCallback, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport {FileFlag} from '../core/file_flag';\nimport {File} from '../core/file';\nimport Stats from '../core/node_fs_stats';\nimport PreloadFile from '../generic/preload_file';\nimport {deprecationMessage} from '../core/util';\nimport * as path from 'path';\n\n/**\n * @hidden\n */\ninterface IAsyncOperation {\n apiMethod: string;\n arguments: any[];\n}\n\n/**\n * We define our own file to interpose on syncSync() for mirroring purposes.\n */\nclass MirrorFile extends PreloadFile implements File {\n constructor(fs: AsyncMirror, path: string, flag: FileFlag, stat: Stats, data: Buffer) {\n super(fs, path, flag, stat, data);\n }\n\n public syncSync(): void {\n if (this.isDirty()) {\n this._fs._syncSync(this);\n this.resetDirty();\n }\n }\n\n public closeSync(): void {\n this.syncSync();\n }\n}\n\n/**\n * Configuration options for the AsyncMirror file system.\n */\nexport interface AsyncMirrorOptions {\n // The synchronous file system to mirror the asynchronous file system to.\n sync: FileSystem;\n // The asynchronous file system to mirror.\n async: FileSystem;\n}\n\n/**\n * AsyncMirrorFS mirrors a synchronous filesystem into an asynchronous filesystem\n * by:\n *\n * * Performing operations over the in-memory copy, while asynchronously pipelining them\n * to the backing store.\n * * During application loading, the contents of the async file system can be reloaded into\n * the synchronous store, if desired.\n *\n * The two stores will be kept in sync. The most common use-case is to pair a synchronous\n * in-memory filesystem with an asynchronous backing store.\n *\n * Example: Mirroring an IndexedDB file system to an in memory file system. Now, you can use\n * IndexedDB synchronously.\n *\n * ```javascript\n * BrowserFS.configure({\n * fs: \"AsyncMirror\",\n * options: {\n * sync: { fs: \"InMemory\" },\n * async: { fs: \"IndexedDB\" }\n * }\n * }, function(e) {\n * // BrowserFS is initialized and ready-to-use!\n * });\n * ```\n *\n * Or, alternatively:\n *\n * ```javascript\n * BrowserFS.FileSystem.IndexedDB.Create(function(e, idbfs) {\n * BrowserFS.FileSystem.InMemory.Create(function(e, inMemory) {\n * BrowserFS.FileSystem.AsyncMirror({\n * sync: inMemory, async: idbfs\n * }, function(e, mirrored) {\n * BrowserFS.initialize(mirrored);\n * });\n * });\n * });\n * ```\n */\nexport default class AsyncMirror extends SynchronousFileSystem implements FileSystem {\n public static readonly Name = \"AsyncMirror\";\n\n public static readonly Options: FileSystemOptions = {\n sync: {\n type: \"object\",\n description: \"The synchronous file system to mirror the asynchronous file system to.\"\n },\n async: {\n type: \"object\",\n description: \"The asynchronous file system to mirror.\"\n }\n };\n\n /**\n * Constructs and initializes an AsyncMirror file system with the given options.\n */\n public static Create(opts: AsyncMirrorOptions, cb: BFSCallback): void {\n try {\n const fs = new AsyncMirror(opts.sync, opts.async, false);\n fs.initialize((e?) => {\n if (e) {\n cb(e);\n } else {\n cb(null, fs);\n }\n }, false);\n } catch (e) {\n cb(e);\n }\n }\n\n public static isAvailable(): boolean {\n return true;\n }\n\n /**\n * Queue of pending asynchronous operations.\n */\n private _queue: IAsyncOperation[] = [];\n private _queueRunning: boolean = false;\n private _sync: FileSystem;\n private _async: FileSystem;\n private _isInitialized: boolean = false;\n private _initializeCallbacks: ((e?: ApiError) => void)[] = [];\n\n /**\n * **Deprecated; use AsyncMirror.Create() method instead.**\n *\n * Mirrors the synchronous file system into the asynchronous file system.\n *\n * **IMPORTANT**: You must call `initialize` on the file system before it can be used.\n * @param sync The synchronous file system to mirror the asynchronous file system to.\n * @param async The asynchronous file system to mirror.\n */\n constructor(sync: FileSystem, async: FileSystem, deprecateMsg = true) {\n super();\n this._sync = sync;\n this._async = async;\n if (!sync.supportsSynch()) {\n throw new Error(\"The first argument to AsyncMirror needs to be a synchronous file system.\");\n }\n deprecationMessage(deprecateMsg, AsyncMirror.Name, { sync: \"sync file system instance\", async: \"async file system instance\"});\n }\n\n public getName(): string {\n return AsyncMirror.Name;\n }\n\n public _syncSync(fd: PreloadFile) {\n this._sync.writeFileSync(fd.getPath(), fd.getBuffer(), null, FileFlag.getFileFlag('w'), fd.getStats().mode);\n this.enqueueOp({\n apiMethod: 'writeFile',\n arguments: [fd.getPath(), fd.getBuffer(), null, fd.getFlag(), fd.getStats().mode]\n });\n }\n\n /**\n * Called once to load up files from async storage into sync storage.\n */\n public initialize(userCb: BFSOneArgCallback, deprecateMsg = true): void {\n if (deprecateMsg) {\n console.warn(`[AsyncMirror] AsyncMirror.initialize() is deprecated and will be removed in the next major version. Please use 'AsyncMirror.Create({ sync: (sync file system instance), async: (async file system instance)}, cb)' to create and initialize AsyncMirror instances.`);\n }\n const callbacks = this._initializeCallbacks;\n\n const end = (e?: ApiError): void => {\n this._isInitialized = !e;\n this._initializeCallbacks = [];\n callbacks.forEach((cb) => cb(e));\n };\n\n if (!this._isInitialized) {\n // First call triggers initialization, the rest wait.\n if (callbacks.push(userCb) === 1) {\n const copyDirectory = (p: string, mode: number, cb: BFSOneArgCallback) => {\n if (p !== '/') {\n this._sync.mkdirSync(p, mode);\n }\n this._async.readdir(p, (err, files) => {\n let i = 0;\n // NOTE: This function must not be in a lexically nested statement,\n // such as an if or while statement. Safari refuses to run the\n // script since it is undefined behavior.\n function copyNextFile(err?: ApiError) {\n if (err) {\n cb(err);\n } else if (i < files!.length) {\n copyItem(path.join(p, files![i]), copyNextFile);\n i++;\n } else {\n cb();\n }\n }\n if (err) {\n cb(err);\n } else {\n copyNextFile();\n }\n });\n }, copyFile = (p: string, mode: number, cb: BFSOneArgCallback) => {\n this._async.readFile(p, null, FileFlag.getFileFlag('r'), (err, data) => {\n if (err) {\n cb(err);\n } else {\n try {\n this._sync.writeFileSync(p, data!, null, FileFlag.getFileFlag('w'), mode);\n } catch (e) {\n err = e;\n } finally {\n cb(err);\n }\n }\n });\n }, copyItem = (p: string, cb: BFSOneArgCallback) => {\n this._async.stat(p, false, (err, stats) => {\n if (err) {\n cb(err);\n } else if (stats!.isDirectory()) {\n copyDirectory(p, stats!.mode, cb);\n } else {\n copyFile(p, stats!.mode, cb);\n }\n });\n };\n copyDirectory('/', 0, end);\n }\n } else {\n userCb();\n }\n }\n\n public isReadOnly(): boolean { return false; }\n public supportsSynch(): boolean { return true; }\n public supportsLinks(): boolean { return false; }\n public supportsProps(): boolean { return this._sync.supportsProps() && this._async.supportsProps(); }\n\n public renameSync(oldPath: string, newPath: string): void {\n this.checkInitialized();\n this._sync.renameSync(oldPath, newPath);\n this.enqueueOp({\n apiMethod: 'rename',\n arguments: [oldPath, newPath]\n });\n }\n\n public statSync(p: string, isLstat: boolean): Stats {\n this.checkInitialized();\n return this._sync.statSync(p, isLstat);\n }\n\n public openSync(p: string, flag: FileFlag, mode: number): File {\n this.checkInitialized();\n // Sanity check: Is this open/close permitted?\n const fd = this._sync.openSync(p, flag, mode);\n fd.closeSync();\n return new MirrorFile(this, p, flag, this._sync.statSync(p, false), this._sync.readFileSync(p, null, FileFlag.getFileFlag('r')));\n }\n\n public unlinkSync(p: string): void {\n this.checkInitialized();\n this._sync.unlinkSync(p);\n this.enqueueOp({\n apiMethod: 'unlink',\n arguments: [p]\n });\n }\n\n public rmdirSync(p: string): void {\n this.checkInitialized();\n this._sync.rmdirSync(p);\n this.enqueueOp({\n apiMethod: 'rmdir',\n arguments: [p]\n });\n }\n\n public mkdirSync(p: string, mode: number): void {\n this.checkInitialized();\n this._sync.mkdirSync(p, mode);\n this.enqueueOp({\n apiMethod: 'mkdir',\n arguments: [p, mode]\n });\n }\n\n public readdirSync(p: string): string[] {\n this.checkInitialized();\n return this._sync.readdirSync(p);\n }\n\n public existsSync(p: string): boolean {\n this.checkInitialized();\n return this._sync.existsSync(p);\n }\n\n public chmodSync(p: string, isLchmod: boolean, mode: number): void {\n this.checkInitialized();\n this._sync.chmodSync(p, isLchmod, mode);\n this.enqueueOp({\n apiMethod: 'chmod',\n arguments: [p, isLchmod, mode]\n });\n }\n\n public chownSync(p: string, isLchown: boolean, uid: number, gid: number): void {\n this.checkInitialized();\n this._sync.chownSync(p, isLchown, uid, gid);\n this.enqueueOp({\n apiMethod: 'chown',\n arguments: [p, isLchown, uid, gid]\n });\n }\n\n public utimesSync(p: string, atime: Date, mtime: Date): void {\n this.checkInitialized();\n this._sync.utimesSync(p, atime, mtime);\n this.enqueueOp({\n apiMethod: 'utimes',\n arguments: [p, atime, mtime]\n });\n }\n\n private checkInitialized(): void {\n if (!this._isInitialized) {\n throw new ApiError(ErrorCode.EPERM, \"AsyncMirrorFS is not initialized. Please initialize AsyncMirrorFS using its initialize() method before using it.\");\n }\n }\n\n private enqueueOp(op: IAsyncOperation) {\n this._queue.push(op);\n if (!this._queueRunning) {\n this._queueRunning = true;\n const doNextOp = (err?: ApiError) => {\n if (err) {\n console.error(`WARNING: File system has desynchronized. Received following error: ${err}\\n$`);\n }\n if (this._queue.length > 0) {\n const op = this._queue.shift()!,\n args = op.arguments;\n args.push(doNextOp);\n ( ( this._async)[op.apiMethod]).apply(this._async, args);\n } else {\n this._queueRunning = false;\n }\n };\n doNextOp();\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/AsyncMirror.ts","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_apply.js","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_overRest.js","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/identity.js","import _overRest from 'lodash-es/_overRest';\nimport identity from 'lodash-es/identity';\n\n// Lodash rest function without function.toString()\n// remappings\nexport default function rest(func, start) {\n return _overRest(func, start, identity);\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/rest.js","import rest from './rest';\n\nexport default function (fn) {\n return rest(function (args/*..., callback*/) {\n var callback = args.pop();\n fn.call(this, args, callback);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/initialParams.js","import rest from './rest';\nimport initialParams from './initialParams';\n\nexport default function applyEach(eachfn) {\n return rest(function(fns, args) {\n var go = initialParams(function(args, callback) {\n var that = this;\n return eachfn(fns, function (fn, cb) {\n fn.apply(that, args.concat(cb));\n }, callback);\n });\n if (args.length) {\n return go.apply(this, args);\n }\n else {\n return go;\n }\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/applyEach.js","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_freeGlobal.js","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_root.js","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_Symbol.js","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_getRawTag.js","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_objectToString.js","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseGetTag.js","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/isObject.js","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/isFunction.js","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/isLength.js","import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/isArrayLike.js","// A temporary value used to identify if the loop should be broken.\n// See #1064, #1293\nexport default {};\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/breakLoop.js","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nexport default noop;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/noop.js","export default function once(fn) {\n return function () {\n if (fn === null) return;\n var callFn = fn;\n fn = null;\n callFn.apply(this, arguments);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/once.js","var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator;\n\nexport default function (coll) {\n return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol]();\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/getIterator.js","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseTimes.js","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/isObjectLike.js","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseIsArguments.js","import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/isArguments.js","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/isArray.js","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/stubFalse.js","import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/isBuffer.js","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_isIndex.js","import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseIsTypedArray.js","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseUnary.js","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_nodeUtil.js","import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/isTypedArray.js","import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_arrayLikeKeys.js","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_isPrototype.js","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_overArg.js","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_nativeKeys.js","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseKeys.js","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/keys.js","import isArrayLike from 'lodash-es/isArrayLike';\nimport getIterator from './getIterator';\nimport keys from 'lodash-es/keys';\n\nfunction createArrayIterator(coll) {\n var i = -1;\n var len = coll.length;\n return function next() {\n return ++i < len ? {value: coll[i], key: i} : null;\n }\n}\n\nfunction createES2015Iterator(iterator) {\n var i = -1;\n return function next() {\n var item = iterator.next();\n if (item.done)\n return null;\n i++;\n return {value: item.value, key: i};\n }\n}\n\nfunction createObjectIterator(obj) {\n var okeys = keys(obj);\n var i = -1;\n var len = okeys.length;\n return function next() {\n var key = okeys[++i];\n return i < len ? {value: obj[key], key: key} : null;\n };\n}\n\nexport default function iterator(coll) {\n if (isArrayLike(coll)) {\n return createArrayIterator(coll);\n }\n\n var iterator = getIterator(coll);\n return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/iterator.js","export default function onlyOnce(fn) {\n return function() {\n if (fn === null) throw new Error(\"Callback was already called.\");\n var callFn = fn;\n fn = null;\n callFn.apply(this, arguments);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/onlyOnce.js","import noop from 'lodash-es/noop';\nimport once from './once';\n\nimport iterator from './iterator';\nimport onlyOnce from './onlyOnce';\n\nimport breakLoop from './breakLoop';\n\nexport default function _eachOfLimit(limit) {\n return function (obj, iteratee, callback) {\n callback = once(callback || noop);\n if (limit <= 0 || !obj) {\n return callback(null);\n }\n var nextElem = iterator(obj);\n var done = false;\n var running = 0;\n\n function iterateeCallback(err, value) {\n running -= 1;\n if (err) {\n done = true;\n callback(err);\n }\n else if (value === breakLoop || (done && running <= 0)) {\n done = true;\n return callback(null);\n }\n else {\n replenish();\n }\n }\n\n function replenish () {\n while (running < limit && !done) {\n var elem = nextElem();\n if (elem === null) {\n done = true;\n if (running <= 0) {\n callback(null);\n }\n return;\n }\n running += 1;\n iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));\n }\n }\n\n replenish();\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/eachOfLimit.js","import _eachOfLimit from './internal/eachOfLimit';\n\n/**\n * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a\n * time.\n *\n * @name eachOfLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.eachOf]{@link module:Collections.eachOf}\n * @alias forEachOfLimit\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {Function} iteratee - A function to apply to each\n * item in `coll`. The `key` is the item's key, or index in the case of an\n * array. The iteratee is passed a `callback(err)` which must be called once it\n * has completed. If no error has occurred, the callback should be run without\n * arguments or with an explicit `null` argument. Invoked with\n * (item, key, callback).\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n */\nexport default function eachOfLimit(coll, limit, iteratee, callback) {\n _eachOfLimit(limit)(coll, iteratee, callback);\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/eachOfLimit.js","export default function doLimit(fn, limit) {\n return function (iterable, iteratee, callback) {\n return fn(iterable, limit, iteratee, callback);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/doLimit.js","import isArrayLike from 'lodash-es/isArrayLike';\n\nimport breakLoop from './internal/breakLoop';\nimport eachOfLimit from './eachOfLimit';\nimport doLimit from './internal/doLimit';\nimport noop from 'lodash-es/noop';\nimport once from './internal/once';\nimport onlyOnce from './internal/onlyOnce';\n\n// eachOf implementation optimized for array-likes\nfunction eachOfArrayLike(coll, iteratee, callback) {\n callback = once(callback || noop);\n var index = 0,\n completed = 0,\n length = coll.length;\n if (length === 0) {\n callback(null);\n }\n\n function iteratorCallback(err, value) {\n if (err) {\n callback(err);\n } else if ((++completed === length) || value === breakLoop) {\n callback(null);\n }\n }\n\n for (; index < length; index++) {\n iteratee(coll[index], index, onlyOnce(iteratorCallback));\n }\n}\n\n// a generic version of eachOf which can handle array, object, and iterator cases.\nvar eachOfGeneric = doLimit(eachOfLimit, Infinity);\n\n/**\n * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument\n * to the iteratee.\n *\n * @name eachOf\n * @static\n * @memberOf module:Collections\n * @method\n * @alias forEachOf\n * @category Collection\n * @see [async.each]{@link module:Collections.each}\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each\n * item in `coll`. The `key` is the item's key, or index in the case of an\n * array. The iteratee is passed a `callback(err)` which must be called once it\n * has completed. If no error has occurred, the callback should be run without\n * arguments or with an explicit `null` argument. Invoked with\n * (item, key, callback).\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n * @example\n *\n * var obj = {dev: \"/dev.json\", test: \"/test.json\", prod: \"/prod.json\"};\n * var configs = {};\n *\n * async.forEachOf(obj, function (value, key, callback) {\n * fs.readFile(__dirname + value, \"utf8\", function (err, data) {\n * if (err) return callback(err);\n * try {\n * configs[key] = JSON.parse(data);\n * } catch (e) {\n * return callback(e);\n * }\n * callback();\n * });\n * }, function (err) {\n * if (err) console.error(err.message);\n * // configs is now a map of JSON data\n * doSomethingWith(configs);\n * });\n */\nexport default function(coll, iteratee, callback) {\n var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;\n eachOfImplementation(coll, iteratee, callback);\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/eachOf.js","import eachOf from '../eachOf';\n\nexport default function doParallel(fn) {\n return function (obj, iteratee, callback) {\n return fn(eachOf, obj, iteratee, callback);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/doParallel.js","import noop from 'lodash-es/noop';\n\nexport default function _asyncMap(eachfn, arr, iteratee, callback) {\n callback = callback || noop;\n arr = arr || [];\n var results = [];\n var counter = 0;\n\n eachfn(arr, function (value, _, callback) {\n var index = counter++;\n iteratee(value, function (err, v) {\n results[index] = v;\n callback(err);\n });\n }, function (err) {\n callback(err, results);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/map.js","import doParallel from './internal/doParallel';\nimport map from './internal/map';\n\n/**\n * Produces a new collection of values by mapping each value in `coll` through\n * the `iteratee` function. The `iteratee` is called with an item from `coll`\n * and a callback for when it has finished processing. Each of these callback\n * takes 2 arguments: an `error`, and the transformed item from `coll`. If\n * `iteratee` passes an error to its callback, the main `callback` (for the\n * `map` function) is immediately called with the error.\n *\n * Note, that since this function applies the `iteratee` to each item in\n * parallel, there is no guarantee that the `iteratee` functions will complete\n * in order. However, the results array will be in the same order as the\n * original `coll`.\n *\n * If `map` is passed an Object, the results will be an Array. The results\n * will roughly be in the order of the original Objects' keys (but this can\n * vary across JavaScript engines)\n *\n * @name map\n * @static\n * @memberOf module:Collections\n * @method\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each item in `coll`.\n * The iteratee is passed a `callback(err, transformed)` which must be called\n * once it has completed with an error (which can be `null`) and a\n * transformed item. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called when all `iteratee`\n * functions have finished, or an error occurs. Results is an Array of the\n * transformed items from the `coll`. Invoked with (err, results).\n * @example\n *\n * async.map(['file1','file2','file3'], fs.stat, function(err, results) {\n * // results is now an array of stats for each file\n * });\n */\nexport default doParallel(map);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/map.js","import applyEach from './internal/applyEach';\nimport map from './map';\n\n/**\n * Applies the provided arguments to each function in the array, calling\n * `callback` after all functions have completed. If you only provide the first\n * argument, `fns`, then it will return a function which lets you pass in the\n * arguments as if it were a single function call. If more arguments are\n * provided, `callback` is required while `args` is still optional.\n *\n * @name applyEach\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @category Control Flow\n * @param {Array|Iterable|Object} fns - A collection of asynchronous functions\n * to all call with the same arguments\n * @param {...*} [args] - any number of separate arguments to pass to the\n * function.\n * @param {Function} [callback] - the final argument should be the callback,\n * called when all functions have completed processing.\n * @returns {Function} - If only the first argument, `fns`, is provided, it will\n * return a function which lets you pass in the arguments as if it were a single\n * function call. The signature is `(..args, callback)`. If invoked with any\n * arguments, `callback` is required.\n * @example\n *\n * async.applyEach([enableSearch, updateSchema], 'bucket', callback);\n *\n * // partial application example:\n * async.each(\n * buckets,\n * async.applyEach([enableSearch, updateSchema]),\n * callback\n * );\n */\nexport default applyEach(map);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/applyEach.js","import eachOfLimit from './eachOfLimit';\n\nexport default function doParallelLimit(fn) {\n return function (obj, limit, iteratee, callback) {\n return fn(eachOfLimit(limit), obj, iteratee, callback);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/doParallelLimit.js","import doParallelLimit from './internal/doParallelLimit';\nimport map from './internal/map';\n\n/**\n * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.\n *\n * @name mapLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.map]{@link module:Collections.map}\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {Function} iteratee - A function to apply to each item in `coll`.\n * The iteratee is passed a `callback(err, transformed)` which must be called\n * once it has completed with an error (which can be `null`) and a transformed\n * item. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called when all `iteratee`\n * functions have finished, or an error occurs. Results is an array of the\n * transformed items from the `coll`. Invoked with (err, results).\n */\nexport default doParallelLimit(map);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/mapLimit.js","import mapLimit from './mapLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.\n *\n * @name mapSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.map]{@link module:Collections.map}\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each item in `coll`.\n * The iteratee is passed a `callback(err, transformed)` which must be called\n * once it has completed with an error (which can be `null`) and a\n * transformed item. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called when all `iteratee`\n * functions have finished, or an error occurs. Results is an array of the\n * transformed items from the `coll`. Invoked with (err, results).\n */\nexport default doLimit(mapLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/mapSeries.js","import applyEach from './internal/applyEach';\nimport mapSeries from './mapSeries';\n\n/**\n * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.\n *\n * @name applyEachSeries\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @see [async.applyEach]{@link module:ControlFlow.applyEach}\n * @category Control Flow\n * @param {Array|Iterable|Object} fns - A collection of asynchronous functions to all\n * call with the same arguments\n * @param {...*} [args] - any number of separate arguments to pass to the\n * function.\n * @param {Function} [callback] - the final argument should be the callback,\n * called when all functions have completed processing.\n * @returns {Function} - If only the first argument is provided, it will return\n * a function which lets you pass in the arguments as if it were a single\n * function call.\n */\nexport default applyEach(mapSeries);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/applyEachSeries.js","import rest from './internal/rest';\n\n/**\n * Creates a continuation function with some arguments already applied.\n *\n * Useful as a shorthand when combined with other control flow functions. Any\n * arguments passed to the returned function are added to the arguments\n * originally passed to apply.\n *\n * @name apply\n * @static\n * @memberOf module:Utils\n * @method\n * @category Util\n * @param {Function} function - The function you want to eventually apply all\n * arguments to. Invokes with (arguments...).\n * @param {...*} arguments... - Any number of arguments to automatically apply\n * when the continuation is called.\n * @example\n *\n * // using apply\n * async.parallel([\n * async.apply(fs.writeFile, 'testfile1', 'test1'),\n * async.apply(fs.writeFile, 'testfile2', 'test2')\n * ]);\n *\n *\n * // the same process without using apply\n * async.parallel([\n * function(callback) {\n * fs.writeFile('testfile1', 'test1', callback);\n * },\n * function(callback) {\n * fs.writeFile('testfile2', 'test2', callback);\n * }\n * ]);\n *\n * // It's possible to pass any number of additional arguments when calling the\n * // continuation:\n *\n * node> var fn = async.apply(sys.puts, 'one');\n * node> fn('two', 'three');\n * one\n * two\n * three\n */\nexport default rest(function(fn, args) {\n return rest(function(callArgs) {\n return fn.apply(null, args.concat(callArgs));\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/apply.js","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEach;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_arrayEach.js","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_createBaseFor.js","import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseFor.js","import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseForOwn.js","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default baseFindIndex;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseFindIndex.js","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nexport default baseIsNaN;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseIsNaN.js","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nexport default strictIndexOf;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_strictIndexOf.js","import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictIndexOf from './_strictIndexOf.js';\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nexport default baseIndexOf;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseIndexOf.js","import arrayEach from 'lodash-es/_arrayEach';\nimport forOwn from 'lodash-es/_baseForOwn';\nimport indexOf from 'lodash-es/_baseIndexOf';\nimport isArray from 'lodash-es/isArray';\nimport okeys from 'lodash-es/keys';\nimport noop from 'lodash-es/noop';\nimport rest from './internal/rest';\n\nimport once from './internal/once';\nimport onlyOnce from './internal/onlyOnce';\n\n/**\n * Determines the best order for running the functions in `tasks`, based on\n * their requirements. Each function can optionally depend on other functions\n * being completed first, and each function is run as soon as its requirements\n * are satisfied.\n *\n * If any of the functions pass an error to their callback, the `auto` sequence\n * will stop. Further tasks will not execute (so any other functions depending\n * on it will not run), and the main `callback` is immediately called with the\n * error.\n *\n * Functions also receive an object containing the results of functions which\n * have completed so far as the first argument, if they have dependencies. If a\n * task function has no dependencies, it will only be passed a callback.\n *\n * @name auto\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @category Control Flow\n * @param {Object} tasks - An object. Each of its properties is either a\n * function or an array of requirements, with the function itself the last item\n * in the array. The object's key of a property serves as the name of the task\n * defined by that property, i.e. can be used when specifying requirements for\n * other tasks. The function receives one or two arguments:\n * * a `results` object, containing the results of the previously executed\n * functions, only passed if the task has any dependencies,\n * * a `callback(err, result)` function, which must be called when finished,\n * passing an `error` (which can be `null`) and the result of the function's\n * execution.\n * @param {number} [concurrency=Infinity] - An optional `integer` for\n * determining the maximum number of tasks that can be run in parallel. By\n * default, as many as possible.\n * @param {Function} [callback] - An optional callback which is called when all\n * the tasks have been completed. It receives the `err` argument if any `tasks`\n * pass an error to their callback. Results are always returned; however, if an\n * error occurs, no further `tasks` will be performed, and the results object\n * will only contain partial results. Invoked with (err, results).\n * @returns undefined\n * @example\n *\n * async.auto({\n * // this function will just be passed a callback\n * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'),\n * showData: ['readData', function(results, cb) {\n * // results.readData is the file's contents\n * // ...\n * }]\n * }, callback);\n *\n * async.auto({\n * get_data: function(callback) {\n * console.log('in get_data');\n * // async code to get some data\n * callback(null, 'data', 'converted to array');\n * },\n * make_folder: function(callback) {\n * console.log('in make_folder');\n * // async code to create a directory to store a file in\n * // this is run at the same time as getting the data\n * callback(null, 'folder');\n * },\n * write_file: ['get_data', 'make_folder', function(results, callback) {\n * console.log('in write_file', JSON.stringify(results));\n * // once there is some data and the directory exists,\n * // write the data to a file in the directory\n * callback(null, 'filename');\n * }],\n * email_link: ['write_file', function(results, callback) {\n * console.log('in email_link', JSON.stringify(results));\n * // once the file is written let's email a link to it...\n * // results.write_file contains the filename returned by write_file.\n * callback(null, {'file':results.write_file, 'email':'user@example.com'});\n * }]\n * }, function(err, results) {\n * console.log('err = ', err);\n * console.log('results = ', results);\n * });\n */\nexport default function (tasks, concurrency, callback) {\n if (typeof concurrency === 'function') {\n // concurrency is optional, shift the args.\n callback = concurrency;\n concurrency = null;\n }\n callback = once(callback || noop);\n var keys = okeys(tasks);\n var numTasks = keys.length;\n if (!numTasks) {\n return callback(null);\n }\n if (!concurrency) {\n concurrency = numTasks;\n }\n\n var results = {};\n var runningTasks = 0;\n var hasError = false;\n\n var listeners = Object.create(null);\n\n var readyTasks = [];\n\n // for cycle detection:\n var readyToCheck = []; // tasks that have been identified as reachable\n // without the possibility of returning to an ancestor task\n var uncheckedDependencies = {};\n\n forOwn(tasks, function (task, key) {\n if (!isArray(task)) {\n // no dependencies\n enqueueTask(key, [task]);\n readyToCheck.push(key);\n return;\n }\n\n var dependencies = task.slice(0, task.length - 1);\n var remainingDependencies = dependencies.length;\n if (remainingDependencies === 0) {\n enqueueTask(key, task);\n readyToCheck.push(key);\n return;\n }\n uncheckedDependencies[key] = remainingDependencies;\n\n arrayEach(dependencies, function (dependencyName) {\n if (!tasks[dependencyName]) {\n throw new Error('async.auto task `' + key +\n '` has a non-existent dependency `' +\n dependencyName + '` in ' +\n dependencies.join(', '));\n }\n addListener(dependencyName, function () {\n remainingDependencies--;\n if (remainingDependencies === 0) {\n enqueueTask(key, task);\n }\n });\n });\n });\n\n checkForDeadlocks();\n processQueue();\n\n function enqueueTask(key, task) {\n readyTasks.push(function () {\n runTask(key, task);\n });\n }\n\n function processQueue() {\n if (readyTasks.length === 0 && runningTasks === 0) {\n return callback(null, results);\n }\n while(readyTasks.length && runningTasks < concurrency) {\n var run = readyTasks.shift();\n run();\n }\n\n }\n\n function addListener(taskName, fn) {\n var taskListeners = listeners[taskName];\n if (!taskListeners) {\n taskListeners = listeners[taskName] = [];\n }\n\n taskListeners.push(fn);\n }\n\n function taskComplete(taskName) {\n var taskListeners = listeners[taskName] || [];\n arrayEach(taskListeners, function (fn) {\n fn();\n });\n processQueue();\n }\n\n\n function runTask(key, task) {\n if (hasError) return;\n\n var taskCallback = onlyOnce(rest(function(err, args) {\n runningTasks--;\n if (args.length <= 1) {\n args = args[0];\n }\n if (err) {\n var safeResults = {};\n forOwn(results, function(val, rkey) {\n safeResults[rkey] = val;\n });\n safeResults[key] = args;\n hasError = true;\n listeners = Object.create(null);\n\n callback(err, safeResults);\n } else {\n results[key] = args;\n taskComplete(key);\n }\n }));\n\n runningTasks++;\n var taskFn = task[task.length - 1];\n if (task.length > 1) {\n taskFn(results, taskCallback);\n } else {\n taskFn(taskCallback);\n }\n }\n\n function checkForDeadlocks() {\n // Kahn's algorithm\n // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm\n // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html\n var currentTask;\n var counter = 0;\n while (readyToCheck.length) {\n currentTask = readyToCheck.pop();\n counter++;\n arrayEach(getDependents(currentTask), function (dependent) {\n if (--uncheckedDependencies[dependent] === 0) {\n readyToCheck.push(dependent);\n }\n });\n }\n\n if (counter !== numTasks) {\n throw new Error(\n 'async.auto cannot execute tasks due to a recursive dependency'\n );\n }\n }\n\n function getDependents(taskName) {\n var result = [];\n forOwn(tasks, function (task, key) {\n if (isArray(task) && indexOf(task, taskName, 0) >= 0) {\n result.push(key);\n }\n });\n return result;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/auto.js","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_arrayMap.js","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexport default baseSlice;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseSlice.js","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nexport default asciiToArray;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_asciiToArray.js","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nexport default hasUnicode;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_hasUnicode.js","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nexport default unicodeToArray;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_unicodeToArray.js","'use strict';\n\nimport rest from './rest';\n\nexport var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;\nexport var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';\n\nexport function fallback(fn) {\n setTimeout(fn, 0);\n}\n\nexport function wrap(defer) {\n return rest(function (fn, args) {\n defer(function () {\n fn.apply(null, args);\n });\n });\n}\n\nvar _defer;\n\nif (hasSetImmediate) {\n _defer = setImmediate;\n} else if (hasNextTick) {\n _defer = process.nextTick;\n} else {\n _defer = fallback;\n}\n\nexport default wrap(_defer);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/setImmediate.js","// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation\n// used for queues. This implementation assumes that the node provided by the user can be modified\n// to adjust the next and last properties. We implement only the minimal functionality\n// for queue support.\nexport default function DLL() {\n this.head = this.tail = null;\n this.length = 0;\n}\n\nfunction setInitial(dll, node) {\n dll.length = 1;\n dll.head = dll.tail = node;\n}\n\nDLL.prototype.removeLink = function(node) {\n if (node.prev) node.prev.next = node.next;\n else this.head = node.next\n if (node.next) node.next.prev = node.prev;\n else this.tail = node.prev;\n\n node.prev = node.next = null;\n this.length -= 1;\n return node;\n}\n\nDLL.prototype.empty = DLL;\n\nDLL.prototype.insertAfter = function(node, newNode) {\n newNode.prev = node;\n newNode.next = node.next;\n if (node.next) node.next.prev = newNode;\n else this.tail = newNode;\n node.next = newNode;\n this.length += 1;\n}\n\nDLL.prototype.insertBefore = function(node, newNode) {\n newNode.prev = node.prev;\n newNode.next = node;\n if (node.prev) node.prev.next = newNode;\n else this.head = newNode;\n node.prev = newNode;\n this.length += 1;\n}\n\nDLL.prototype.unshift = function(node) {\n if (this.head) this.insertBefore(this.head, node);\n else setInitial(this, node);\n};\n\nDLL.prototype.push = function(node) {\n if (this.tail) this.insertAfter(this.tail, node);\n else setInitial(this, node);\n};\n\nDLL.prototype.shift = function() {\n return this.head && this.removeLink(this.head);\n};\n\nDLL.prototype.pop = function() {\n return this.tail && this.removeLink(this.tail);\n};\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/DoublyLinkedList.js","import eachOfLimit from './eachOfLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.\n *\n * @name eachOfSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.eachOf]{@link module:Collections.eachOf}\n * @alias forEachOfSeries\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each item in `coll`. The\n * `key` is the item's key, or index in the case of an array. The iteratee is\n * passed a `callback(err)` which must be called once it has completed. If no\n * error has occurred, the callback should be run without arguments or with an\n * explicit `null` argument. Invoked with (item, key, callback).\n * @param {Function} [callback] - A callback which is called when all `iteratee`\n * functions have finished, or an error occurs. Invoked with (err).\n */\nexport default doLimit(eachOfLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/eachOfSeries.js","import eachOfSeries from './eachOfSeries';\nimport noop from 'lodash-es/noop';\nimport once from './internal/once';\n\n/**\n * Reduces `coll` into a single value using an async `iteratee` to return each\n * successive step. `memo` is the initial state of the reduction. This function\n * only operates in series.\n *\n * For performance reasons, it may make sense to split a call to this function\n * into a parallel map, and then use the normal `Array.prototype.reduce` on the\n * results. This function is for situations where each step in the reduction\n * needs to be async; if you can get the data before reducing it, then it's\n * probably a good idea to do so.\n *\n * @name reduce\n * @static\n * @memberOf module:Collections\n * @method\n * @alias inject\n * @alias foldl\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {*} memo - The initial state of the reduction.\n * @param {Function} iteratee - A function applied to each item in the\n * array to produce the next step in the reduction. The `iteratee` is passed a\n * `callback(err, reduction)` which accepts an optional error as its first\n * argument, and the state of the reduction as the second. If an error is\n * passed to the callback, the reduction is stopped and the main `callback` is\n * immediately called with the error. Invoked with (memo, item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Result is the reduced value. Invoked with\n * (err, result).\n * @example\n *\n * async.reduce([1,2,3], 0, function(memo, item, callback) {\n * // pointless async:\n * process.nextTick(function() {\n * callback(null, memo + item)\n * });\n * }, function(err, result) {\n * // result is now equal to the last value of memo, which is 6\n * });\n */\nexport default function reduce(coll, memo, iteratee, callback) {\n callback = once(callback || noop);\n eachOfSeries(coll, function(x, i, callback) {\n iteratee(memo, x, function(err, v) {\n memo = v;\n callback(err);\n });\n }, function(err) {\n callback(err, memo);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/reduce.js","import noop from 'lodash-es/noop';\nimport rest from './internal/rest';\nimport reduce from './reduce';\n\n/**\n * Version of the compose function that is more natural to read. Each function\n * consumes the return value of the previous function. It is the equivalent of\n * [compose]{@link module:ControlFlow.compose} with the arguments reversed.\n *\n * Each function is executed with the `this` binding of the composed function.\n *\n * @name seq\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @see [async.compose]{@link module:ControlFlow.compose}\n * @category Control Flow\n * @param {...Function} functions - the asynchronous functions to compose\n * @returns {Function} a function that composes the `functions` in order\n * @example\n *\n * // Requires lodash (or underscore), express3 and dresende's orm2.\n * // Part of an app, that fetches cats of the logged user.\n * // This example uses `seq` function to avoid overnesting and error\n * // handling clutter.\n * app.get('/cats', function(request, response) {\n * var User = request.models.User;\n * async.seq(\n * _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))\n * function(user, fn) {\n * user.getCats(fn); // 'getCats' has signature (callback(err, data))\n * }\n * )(req.session.user_id, function (err, cats) {\n * if (err) {\n * console.error(err);\n * response.json({ status: 'error', message: err.message });\n * } else {\n * response.json({ status: 'ok', message: 'Cats found', data: cats });\n * }\n * });\n * });\n */\nexport default rest(function seq(functions) {\n return rest(function(args) {\n var that = this;\n\n var cb = args[args.length - 1];\n if (typeof cb == 'function') {\n args.pop();\n } else {\n cb = noop;\n }\n\n reduce(functions, args, function(newargs, fn, cb) {\n fn.apply(that, newargs.concat(rest(function(err, nextargs) {\n cb(err, nextargs);\n })));\n },\n function(err, results) {\n cb.apply(that, [err].concat(results));\n });\n });\n})\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/seq.js","import seq from './seq';\nimport rest from './internal/rest';\n\n/**\n * Creates a function which is a composition of the passed asynchronous\n * functions. Each function consumes the return value of the function that\n * follows. Composing functions `f()`, `g()`, and `h()` would produce the result\n * of `f(g(h()))`, only this version uses callbacks to obtain the return values.\n *\n * Each function is executed with the `this` binding of the composed function.\n *\n * @name compose\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @category Control Flow\n * @param {...Function} functions - the asynchronous functions to compose\n * @returns {Function} an asynchronous function that is the composed\n * asynchronous `functions`\n * @example\n *\n * function add1(n, callback) {\n * setTimeout(function () {\n * callback(null, n + 1);\n * }, 10);\n * }\n *\n * function mul3(n, callback) {\n * setTimeout(function () {\n * callback(null, n * 3);\n * }, 10);\n * }\n *\n * var add1mul3 = async.compose(mul3, add1);\n * add1mul3(4, function (err, result) {\n * // result now equals 15\n * });\n */\nexport default rest(function(args) {\n return seq.apply(null, args.reverse());\n});\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/compose.js","import concat from './internal/concat';\nimport doParallel from './internal/doParallel';\n\n/**\n * Applies `iteratee` to each item in `coll`, concatenating the results. Returns\n * the concatenated list. The `iteratee`s are called in parallel, and the\n * results are concatenated as they return. There is no guarantee that the\n * results array will be returned in the original order of `coll` passed to the\n * `iteratee` function.\n *\n * @name concat\n * @static\n * @memberOf module:Collections\n * @method\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each item in `coll`.\n * The iteratee is passed a `callback(err, results)` which must be called once\n * it has completed with an error (which can be `null`) and an array of results.\n * Invoked with (item, callback).\n * @param {Function} [callback(err)] - A callback which is called after all the\n * `iteratee` functions have finished, or an error occurs. Results is an array\n * containing the concatenated results of the `iteratee` function. Invoked with\n * (err, results).\n * @example\n *\n * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) {\n * // files is now a list of filenames that exist in the 3 directories\n * });\n */\nexport default doParallel(concat);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/concat.js","import concat from './internal/concat';\nimport doSeries from './internal/doSeries';\n\n/**\n * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.\n *\n * @name concatSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.concat]{@link module:Collections.concat}\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each item in `coll`.\n * The iteratee is passed a `callback(err, results)` which must be called once\n * it has completed with an error (which can be `null`) and an array of results.\n * Invoked with (item, callback).\n * @param {Function} [callback(err)] - A callback which is called after all the\n * `iteratee` functions have finished, or an error occurs. Results is an array\n * containing the concatenated results of the `iteratee` function. Invoked with\n * (err, results).\n */\nexport default doSeries(concat);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/concatSeries.js","import rest from './internal/rest';\nimport initialParams from './internal/initialParams';\n\n/**\n * Returns a function that when called, calls-back with the values provided.\n * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to\n * [`auto`]{@link module:ControlFlow.auto}.\n *\n * @name constant\n * @static\n * @memberOf module:Utils\n * @method\n * @category Util\n * @param {...*} arguments... - Any number of arguments to automatically invoke\n * callback with.\n * @returns {Function} Returns a function that when invoked, automatically\n * invokes the callback with the previous given arguments.\n * @example\n *\n * async.waterfall([\n * async.constant(42),\n * function (value, next) {\n * // value === 42\n * },\n * //...\n * ], callback);\n *\n * async.waterfall([\n * async.constant(filename, \"utf8\"),\n * fs.readFile,\n * function (fileData, next) {\n * //...\n * }\n * //...\n * ], callback);\n *\n * async.auto({\n * hostname: async.constant(\"https://server.net/\"),\n * port: findFreePort,\n * launchServer: [\"hostname\", \"port\", function (options, cb) {\n * startServer(options, cb);\n * }],\n * //...\n * }, callback);\n */\nexport default rest(function(values) {\n var args = [null].concat(values);\n return initialParams(function (ignoredArgs, callback) {\n return callback.apply(this, args);\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/constant.js","import identity from 'lodash-es/identity';\n\nimport createTester from './internal/createTester';\nimport doParallel from './internal/doParallel';\nimport findGetResult from './internal/findGetResult';\n\n/**\n * Returns the first value in `coll` that passes an async truth test. The\n * `iteratee` is applied in parallel, meaning the first iteratee to return\n * `true` will fire the detect `callback` with that result. That means the\n * result might not be the first item in the original `coll` (in terms of order)\n * that passes the test.\n\n * If order within the original `coll` is important, then look at\n * [`detectSeries`]{@link module:Collections.detectSeries}.\n *\n * @name detect\n * @static\n * @memberOf module:Collections\n * @method\n * @alias find\n * @category Collections\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The iteratee is passed a `callback(err, truthValue)` which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called as soon as any\n * iteratee returns `true`, or after all the `iteratee` functions have finished.\n * Result will be the first item in the array that passes the truth test\n * (iteratee) or the value `undefined` if none passed. Invoked with\n * (err, result).\n * @example\n *\n * async.detect(['file1','file2','file3'], function(filePath, callback) {\n * fs.access(filePath, function(err) {\n * callback(null, !err)\n * });\n * }, function(err, result) {\n * // result now equals the first file in the list that exists\n * });\n */\nexport default doParallel(createTester(identity, findGetResult));\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/detect.js","import identity from 'lodash-es/identity';\n\nimport createTester from './internal/createTester';\nimport doParallelLimit from './internal/doParallelLimit';\nimport findGetResult from './internal/findGetResult';\n\n/**\n * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a\n * time.\n *\n * @name detectLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.detect]{@link module:Collections.detect}\n * @alias findLimit\n * @category Collections\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The iteratee is passed a `callback(err, truthValue)` which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called as soon as any\n * iteratee returns `true`, or after all the `iteratee` functions have finished.\n * Result will be the first item in the array that passes the truth test\n * (iteratee) or the value `undefined` if none passed. Invoked with\n * (err, result).\n */\nexport default doParallelLimit(createTester(identity, findGetResult));\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/detectLimit.js","import detectLimit from './detectLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.\n *\n * @name detectSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.detect]{@link module:Collections.detect}\n * @alias findSeries\n * @category Collections\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The iteratee is passed a `callback(err, truthValue)` which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called as soon as any\n * iteratee returns `true`, or after all the `iteratee` functions have finished.\n * Result will be the first item in the array that passes the truth test\n * (iteratee) or the value `undefined` if none passed. Invoked with\n * (err, result).\n */\nexport default doLimit(detectLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/detectSeries.js","import arrayEach from 'lodash-es/_arrayEach';\nimport rest from './rest';\n\nexport default function consoleFunc(name) {\n return rest(function (fn, args) {\n fn.apply(null, args.concat(rest(function (err, args) {\n if (typeof console === 'object') {\n if (err) {\n if (console.error) {\n console.error(err);\n }\n }\n else if (console[name]) {\n arrayEach(args, function (x) {\n console[name](x);\n });\n }\n }\n })));\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/consoleFunc.js","import consoleFunc from './internal/consoleFunc';\n\n/**\n * Logs the result of an `async` function to the `console` using `console.dir`\n * to display the properties of the resulting object. Only works in Node.js or\n * in browsers that support `console.dir` and `console.error` (such as FF and\n * Chrome). If multiple arguments are returned from the async function,\n * `console.dir` is called on each argument in order.\n *\n * @name dir\n * @static\n * @memberOf module:Utils\n * @method\n * @category Util\n * @param {Function} function - The function you want to eventually apply all\n * arguments to.\n * @param {...*} arguments... - Any number of arguments to apply to the function.\n * @example\n *\n * // in a module\n * var hello = function(name, callback) {\n * setTimeout(function() {\n * callback(null, {hello: name});\n * }, 1000);\n * };\n *\n * // in the node repl\n * node> async.dir(hello, 'world');\n * {hello: 'world'}\n */\nexport default consoleFunc('dir');\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/dir.js","export default function _withoutIndex(iteratee) {\n return function (value, index, callback) {\n return iteratee(value, callback);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/internal/withoutIndex.js","import eachOf from './eachOf';\nimport withoutIndex from './internal/withoutIndex';\n\n/**\n * Applies the function `iteratee` to each item in `coll`, in parallel.\n * The `iteratee` is called with an item from the list, and a callback for when\n * it has finished. If the `iteratee` passes an error to its `callback`, the\n * main `callback` (for the `each` function) is immediately called with the\n * error.\n *\n * Note, that since this function applies `iteratee` to each item in parallel,\n * there is no guarantee that the iteratee functions will complete in order.\n *\n * @name each\n * @static\n * @memberOf module:Collections\n * @method\n * @alias forEach\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each item\n * in `coll`. The iteratee is passed a `callback(err)` which must be called once\n * it has completed. If no error has occurred, the `callback` should be run\n * without arguments or with an explicit `null` argument. The array index is not\n * passed to the iteratee. Invoked with (item, callback). If you need the index,\n * use `eachOf`.\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n * @example\n *\n * // assuming openFiles is an array of file names and saveFile is a function\n * // to save the modified contents of that file:\n *\n * async.each(openFiles, saveFile, function(err){\n * // if any of the saves produced an error, err would equal that error\n * });\n *\n * // assuming openFiles is an array of file names\n * async.each(openFiles, function(file, callback) {\n *\n * // Perform operation on file here.\n * console.log('Processing file ' + file);\n *\n * if( file.length > 32 ) {\n * console.log('This file name is too long');\n * callback('File name too long');\n * } else {\n * // Do work to process file here\n * console.log('File processed');\n * callback();\n * }\n * }, function(err) {\n * // if any of the file processing produced an error, err would equal that error\n * if( err ) {\n * // One of the iterations produced an error.\n * // All processing will now stop.\n * console.log('A file failed to process');\n * } else {\n * console.log('All files have been processed successfully');\n * }\n * });\n */\nexport default function eachLimit(coll, iteratee, callback) {\n eachOf(coll, withoutIndex(iteratee), callback);\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/each.js","import eachLimit from './eachLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.\n *\n * @name eachSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.each]{@link module:Collections.each}\n * @alias forEachSeries\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each\n * item in `coll`. The iteratee is passed a `callback(err)` which must be called\n * once it has completed. If no error has occurred, the `callback` should be run\n * without arguments or with an explicit `null` argument. The array index is\n * not passed to the iteratee. Invoked with (item, callback). If you need the\n * index, use `eachOfSeries`.\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n */\nexport default doLimit(eachLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/eachSeries.js","import createTester from './internal/createTester';\nimport doParallel from './internal/doParallel';\nimport notId from './internal/notId';\n\n/**\n * Returns `true` if every element in `coll` satisfies an async test. If any\n * iteratee call returns `false`, the main `callback` is immediately called.\n *\n * @name every\n * @static\n * @memberOf module:Collections\n * @method\n * @alias all\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in the\n * collection in parallel. The iteratee is passed a `callback(err, truthValue)`\n * which must be called with a boolean argument once it has completed. Invoked\n * with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Result will be either `true` or `false`\n * depending on the values of the async tests. Invoked with (err, result).\n * @example\n *\n * async.every(['file1','file2','file3'], function(filePath, callback) {\n * fs.access(filePath, function(err) {\n * callback(null, !err)\n * });\n * }, function(err, result) {\n * // if result is true then every file exists\n * });\n */\nexport default doParallel(createTester(notId, notId));\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/every.js","import createTester from './internal/createTester';\nimport doParallelLimit from './internal/doParallelLimit';\nimport notId from './internal/notId';\n\n/**\n * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.\n *\n * @name everyLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.every]{@link module:Collections.every}\n * @alias allLimit\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {Function} iteratee - A truth test to apply to each item in the\n * collection in parallel. The iteratee is passed a `callback(err, truthValue)`\n * which must be called with a boolean argument once it has completed. Invoked\n * with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Result will be either `true` or `false`\n * depending on the values of the async tests. Invoked with (err, result).\n */\nexport default doParallelLimit(createTester(notId, notId));\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/everyLimit.js","import everyLimit from './everyLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.\n *\n * @name everySeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.every]{@link module:Collections.every}\n * @alias allSeries\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in the\n * collection in parallel. The iteratee is passed a `callback(err, truthValue)`\n * which must be called with a boolean argument once it has completed. Invoked\n * with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Result will be either `true` or `false`\n * depending on the values of the async tests. Invoked with (err, result).\n */\nexport default doLimit(everyLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/everySeries.js","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default baseProperty;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseProperty.js","import filter from './internal/filter';\nimport doParallel from './internal/doParallel';\n\n/**\n * Returns a new array of all the values in `coll` which pass an async truth\n * test. This operation is performed in parallel, but the results array will be\n * in the same order as the original.\n *\n * @name filter\n * @static\n * @memberOf module:Collections\n * @method\n * @alias select\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Invoked with (err, results).\n * @example\n *\n * async.filter(['file1','file2','file3'], function(filePath, callback) {\n * fs.access(filePath, function(err) {\n * callback(null, !err)\n * });\n * }, function(err, results) {\n * // results now equals an array of the existing files\n * });\n */\nexport default doParallel(filter);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/filter.js","import filter from './internal/filter';\nimport doParallelLimit from './internal/doParallelLimit';\n\n/**\n * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a\n * time.\n *\n * @name filterLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.filter]{@link module:Collections.filter}\n * @alias selectLimit\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Invoked with (err, results).\n */\nexport default doParallelLimit(filter);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/filterLimit.js","import filterLimit from './filterLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.\n *\n * @name filterSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.filter]{@link module:Collections.filter}\n * @alias selectSeries\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Invoked with (err, results)\n */\nexport default doLimit(filterLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/filterSeries.js","import consoleFunc from './internal/consoleFunc';\n\n/**\n * Logs the result of an `async` function to the `console`. Only works in\n * Node.js or in browsers that support `console.log` and `console.error` (such\n * as FF and Chrome). If multiple arguments are returned from the async\n * function, `console.log` is called on each argument in order.\n *\n * @name log\n * @static\n * @memberOf module:Utils\n * @method\n * @category Util\n * @param {Function} function - The function you want to eventually apply all\n * arguments to.\n * @param {...*} arguments... - Any number of arguments to apply to the function.\n * @example\n *\n * // in a module\n * var hello = function(name, callback) {\n * setTimeout(function() {\n * callback(null, 'hello ' + name);\n * }, 1000);\n * };\n *\n * // in the node repl\n * node> async.log(hello, 'world');\n * 'hello world'\n */\nexport default consoleFunc('log');\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/log.js","import mapValuesLimit from './mapValuesLimit';\nimport doLimit from './internal/doLimit';\n\n\n/**\n * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.\n *\n * Produces a new Object by mapping each value of `obj` through the `iteratee`\n * function. The `iteratee` is called each `value` and `key` from `obj` and a\n * callback for when it has finished processing. Each of these callbacks takes\n * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`\n * passes an error to its callback, the main `callback` (for the `mapValues`\n * function) is immediately called with the error.\n *\n * Note, the order of the keys in the result is not guaranteed. The keys will\n * be roughly in the order they complete, (but this is very engine-specific)\n *\n * @name mapValues\n * @static\n * @memberOf module:Collections\n * @method\n * @category Collection\n * @param {Object} obj - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each value and key in\n * `coll`. The iteratee is passed a `callback(err, transformed)` which must be\n * called once it has completed with an error (which can be `null`) and a\n * transformed value. Invoked with (value, key, callback).\n * @param {Function} [callback] - A callback which is called when all `iteratee`\n * functions have finished, or an error occurs. `result` is a new object consisting\n * of each key from `obj`, with each transformed value on the right-hand side.\n * Invoked with (err, result).\n * @example\n *\n * async.mapValues({\n * f1: 'file1',\n * f2: 'file2',\n * f3: 'file3'\n * }, function (file, key, callback) {\n * fs.stat(file, callback);\n * }, function(err, result) {\n * // result is now a map of stats for each file, e.g.\n * // {\n * // f1: [stats for file1],\n * // f2: [stats for file2],\n * // f3: [stats for file3]\n * // }\n * });\n */\n\nexport default doLimit(mapValuesLimit, Infinity);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/mapValues.js","import mapValuesLimit from './mapValuesLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.\n *\n * @name mapValuesSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.mapValues]{@link module:Collections.mapValues}\n * @category Collection\n * @param {Object} obj - A collection to iterate over.\n * @param {Function} iteratee - A function to apply to each value in `obj`.\n * The iteratee is passed a `callback(err, transformed)` which must be called\n * once it has completed with an error (which can be `null`) and a\n * transformed value. Invoked with (value, key, callback).\n * @param {Function} [callback] - A callback which is called when all `iteratee`\n * functions have finished, or an error occurs. `result` is a new object consisting\n * of each key from `obj`, with each transformed value on the right-hand side.\n * Invoked with (err, result).\n */\nexport default doLimit(mapValuesLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/mapValuesSeries.js","'use strict';\n\nimport { hasNextTick, hasSetImmediate, fallback, wrap } from './internal/setImmediate';\n\n/**\n * Calls `callback` on a later loop around the event loop. In Node.js this just\n * calls `setImmediate`. In the browser it will use `setImmediate` if\n * available, otherwise `setTimeout(callback, 0)`, which means other higher\n * priority events may precede the execution of `callback`.\n *\n * This is used internally for browser-compatibility purposes.\n *\n * @name nextTick\n * @static\n * @memberOf module:Utils\n * @method\n * @alias setImmediate\n * @category Util\n * @param {Function} callback - The function to call on a later loop around\n * the event loop. Invoked with (args...).\n * @param {...*} args... - any number of additional arguments to pass to the\n * callback on the next tick.\n * @example\n *\n * var call_order = [];\n * async.nextTick(function() {\n * call_order.push('two');\n * // call_order now equals ['one','two']\n * });\n * call_order.push('one');\n *\n * async.setImmediate(function (a, b, c) {\n * // a, b, and c equal 1, 2, and 3\n * }, 1, 2, 3);\n */\nvar _defer;\n\nif (hasNextTick) {\n _defer = process.nextTick;\n} else if (hasSetImmediate) {\n _defer = setImmediate;\n} else {\n _defer = fallback;\n}\n\nexport default wrap(_defer);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/nextTick.js","import setImmediate from './internal/setImmediate';\n\n/**\n * Calls `callback` on a later loop around the event loop. In Node.js this just\n * calls `setImmediate`. In the browser it will use `setImmediate` if\n * available, otherwise `setTimeout(callback, 0)`, which means other higher\n * priority events may precede the execution of `callback`.\n *\n * This is used internally for browser-compatibility purposes.\n *\n * @name setImmediate\n * @static\n * @memberOf module:Utils\n * @method\n * @alias nextTick\n * @category Util\n * @param {Function} callback - The function to call on a later loop around\n * the event loop. Invoked with (args...).\n * @param {...*} args... - any number of additional arguments to pass to the\n * callback on the next tick.\n * @example\n *\n * var call_order = [];\n * async.nextTick(function() {\n * call_order.push('two');\n * // call_order now equals ['one','two']\n * });\n * call_order.push('one');\n *\n * async.setImmediate(function (a, b, c) {\n * // a, b, and c equal 1, 2, and 3\n * }, 1, 2, 3);\n */\nexport default setImmediate;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/setImmediate.js","import queue from './internal/queue';\n\n/**\n * A queue of tasks for the worker function to complete.\n * @typedef {Object} QueueObject\n * @memberOf module:ControlFlow\n * @property {Function} length - a function returning the number of items\n * waiting to be processed. Invoke with `queue.length()`.\n * @property {boolean} started - a boolean indicating whether or not any\n * items have been pushed and processed by the queue.\n * @property {Function} running - a function returning the number of items\n * currently being processed. Invoke with `queue.running()`.\n * @property {Function} workersList - a function returning the array of items\n * currently being processed. Invoke with `queue.workersList()`.\n * @property {Function} idle - a function returning false if there are items\n * waiting or being processed, or true if not. Invoke with `queue.idle()`.\n * @property {number} concurrency - an integer for determining how many `worker`\n * functions should be run in parallel. This property can be changed after a\n * `queue` is created to alter the concurrency on-the-fly.\n * @property {Function} push - add a new task to the `queue`. Calls `callback`\n * once the `worker` has finished processing the task. Instead of a single task,\n * a `tasks` array can be submitted. The respective callback is used for every\n * task in the list. Invoke with `queue.push(task, [callback])`,\n * @property {Function} unshift - add a new task to the front of the `queue`.\n * Invoke with `queue.unshift(task, [callback])`.\n * @property {Function} saturated - a callback that is called when the number of\n * running workers hits the `concurrency` limit, and further tasks will be\n * queued.\n * @property {Function} unsaturated - a callback that is called when the number\n * of running workers is less than the `concurrency` & `buffer` limits, and\n * further tasks will not be queued.\n * @property {number} buffer - A minimum threshold buffer in order to say that\n * the `queue` is `unsaturated`.\n * @property {Function} empty - a callback that is called when the last item\n * from the `queue` is given to a `worker`.\n * @property {Function} drain - a callback that is called when the last item\n * from the `queue` has returned from the `worker`.\n * @property {Function} error - a callback that is called when a task errors.\n * Has the signature `function(error, task)`.\n * @property {boolean} paused - a boolean for determining whether the queue is\n * in a paused state.\n * @property {Function} pause - a function that pauses the processing of tasks\n * until `resume()` is called. Invoke with `queue.pause()`.\n * @property {Function} resume - a function that resumes the processing of\n * queued tasks when the queue is paused. Invoke with `queue.resume()`.\n * @property {Function} kill - a function that removes the `drain` callback and\n * empties remaining tasks from the queue forcing it to go idle. Invoke with `queue.kill()`.\n */\n\n/**\n * Creates a `queue` object with the specified `concurrency`. Tasks added to the\n * `queue` are processed in parallel (up to the `concurrency` limit). If all\n * `worker`s are in progress, the task is queued until one becomes available.\n * Once a `worker` completes a `task`, that `task`'s callback is called.\n *\n * @name queue\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @category Control Flow\n * @param {Function} worker - An asynchronous function for processing a queued\n * task, which must call its `callback(err)` argument when finished, with an\n * optional `error` as an argument. If you want to handle errors from an\n * individual task, pass a callback to `q.push()`. Invoked with\n * (task, callback).\n * @param {number} [concurrency=1] - An `integer` for determining how many\n * `worker` functions should be run in parallel. If omitted, the concurrency\n * defaults to `1`. If the concurrency is `0`, an error is thrown.\n * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can\n * attached as certain properties to listen for specific events during the\n * lifecycle of the queue.\n * @example\n *\n * // create a queue object with concurrency 2\n * var q = async.queue(function(task, callback) {\n * console.log('hello ' + task.name);\n * callback();\n * }, 2);\n *\n * // assign a callback\n * q.drain = function() {\n * console.log('all items have been processed');\n * };\n *\n * // add some items to the queue\n * q.push({name: 'foo'}, function(err) {\n * console.log('finished processing foo');\n * });\n * q.push({name: 'bar'}, function (err) {\n * console.log('finished processing bar');\n * });\n *\n * // add some items to the queue (batch-wise)\n * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {\n * console.log('finished processing item');\n * });\n *\n * // add some items to the front of the queue\n * q.unshift({name: 'bar'}, function (err) {\n * console.log('finished processing bar');\n * });\n */\nexport default function (worker, concurrency) {\n return queue(function (items, cb) {\n worker(items[0], cb);\n }, concurrency, 1);\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/queue.js","import isArray from 'lodash-es/isArray';\nimport noop from 'lodash-es/noop';\n\nimport setImmediate from './setImmediate';\n\nimport queue from './queue';\n\n/**\n * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and\n * completed in ascending priority order.\n *\n * @name priorityQueue\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @see [async.queue]{@link module:ControlFlow.queue}\n * @category Control Flow\n * @param {Function} worker - An asynchronous function for processing a queued\n * task, which must call its `callback(err)` argument when finished, with an\n * optional `error` as an argument. If you want to handle errors from an\n * individual task, pass a callback to `q.push()`. Invoked with\n * (task, callback).\n * @param {number} concurrency - An `integer` for determining how many `worker`\n * functions should be run in parallel. If omitted, the concurrency defaults to\n * `1`. If the concurrency is `0`, an error is thrown.\n * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two\n * differences between `queue` and `priorityQueue` objects:\n * * `push(task, priority, [callback])` - `priority` should be a number. If an\n * array of `tasks` is given, all tasks will be assigned the same priority.\n * * The `unshift` method was removed.\n */\nexport default function(worker, concurrency) {\n // Start with a normal queue\n var q = queue(worker, concurrency);\n\n // Override push to accept second parameter representing priority\n q.push = function(data, priority, callback) {\n if (callback == null) callback = noop;\n if (typeof callback !== 'function') {\n throw new Error('task callback must be a function');\n }\n q.started = true;\n if (!isArray(data)) {\n data = [data];\n }\n if (data.length === 0) {\n // call drain immediately if there are no tasks\n return setImmediate(function() {\n q.drain();\n });\n }\n\n priority = priority || 0;\n var nextNode = q._tasks.head;\n while (nextNode && priority >= nextNode.priority) {\n nextNode = nextNode.next;\n }\n\n for (var i = 0, l = data.length; i < l; i++) {\n var item = {\n data: data[i],\n priority: priority,\n callback: callback\n };\n\n if (nextNode) {\n q._tasks.insertBefore(nextNode, item);\n } else {\n q._tasks.push(item);\n }\n }\n setImmediate(q.process);\n };\n\n // Remove unshift function\n delete q.unshift;\n\n return q;\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/priorityQueue.js","import reject from './internal/reject';\nimport doParallel from './internal/doParallel';\n\n/**\n * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.\n *\n * @name reject\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.filter]{@link module:Collections.filter}\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Invoked with (err, results).\n * @example\n *\n * async.reject(['file1','file2','file3'], function(filePath, callback) {\n * fs.access(filePath, function(err) {\n * callback(null, !err)\n * });\n * }, function(err, results) {\n * // results now equals an array of missing files\n * createFiles(results);\n * });\n */\nexport default doParallel(reject);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/reject.js","import reject from './internal/reject';\nimport doParallelLimit from './internal/doParallelLimit';\n\n/**\n * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a\n * time.\n *\n * @name rejectLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.reject]{@link module:Collections.reject}\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Invoked with (err, results).\n */\nexport default doParallelLimit(reject);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/rejectLimit.js","import rejectLimit from './rejectLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.\n *\n * @name rejectSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.reject]{@link module:Collections.reject}\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Invoked with (err, results).\n */\nexport default doLimit(rejectLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/rejectSeries.js","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/constant.js","import retry from './retry';\nimport initialParams from './internal/initialParams';\n\n/**\n * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method wraps a task and makes it\n * retryable, rather than immediately calling it with retries.\n *\n * @name retryable\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @see [async.retry]{@link module:ControlFlow.retry}\n * @category Control Flow\n * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional\n * options, exactly the same as from `retry`\n * @param {Function} task - the asynchronous function to wrap\n * @returns {Functions} The wrapped function, which when invoked, will retry on\n * an error, based on the parameters specified in `opts`.\n * @example\n *\n * async.auto({\n * dep1: async.retryable(3, getFromFlakyService),\n * process: [\"dep1\", async.retryable(3, function (results, cb) {\n * maybeProcessData(results.dep1, cb);\n * })]\n * }, callback);\n */\nexport default function (opts, task) {\n if (!task) {\n task = opts;\n opts = null;\n }\n return initialParams(function (args, callback) {\n function taskFn(cb) {\n task.apply(null, args.concat(cb));\n }\n\n if (opts) retry(opts, taskFn, callback);\n else retry(taskFn, callback);\n\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/retryable.js","import createTester from './internal/createTester';\nimport doParallel from './internal/doParallel';\nimport identity from 'lodash-es/identity';\n\n/**\n * Returns `true` if at least one element in the `coll` satisfies an async test.\n * If any iteratee call returns `true`, the main `callback` is immediately\n * called.\n *\n * @name some\n * @static\n * @memberOf module:Collections\n * @method\n * @alias any\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in the array\n * in parallel. The iteratee is passed a `callback(err, truthValue)` which must\n * be called with a boolean argument once it has completed. Invoked with\n * (item, callback).\n * @param {Function} [callback] - A callback which is called as soon as any\n * iteratee returns `true`, or after all the iteratee functions have finished.\n * Result will be either `true` or `false` depending on the values of the async\n * tests. Invoked with (err, result).\n * @example\n *\n * async.some(['file1','file2','file3'], function(filePath, callback) {\n * fs.access(filePath, function(err) {\n * callback(null, !err)\n * });\n * }, function(err, result) {\n * // if result is true then at least one of the files exists\n * });\n */\nexport default doParallel(createTester(Boolean, identity));\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/some.js","import createTester from './internal/createTester';\nimport doParallelLimit from './internal/doParallelLimit';\nimport identity from 'lodash-es/identity';\n\n/**\n * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.\n *\n * @name someLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.some]{@link module:Collections.some}\n * @alias anyLimit\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {Function} iteratee - A truth test to apply to each item in the array\n * in parallel. The iteratee is passed a `callback(err, truthValue)` which must\n * be called with a boolean argument once it has completed. Invoked with\n * (item, callback).\n * @param {Function} [callback] - A callback which is called as soon as any\n * iteratee returns `true`, or after all the iteratee functions have finished.\n * Result will be either `true` or `false` depending on the values of the async\n * tests. Invoked with (err, result).\n */\nexport default doParallelLimit(createTester(Boolean, identity));\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/someLimit.js","import someLimit from './someLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.\n *\n * @name someSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.some]{@link module:Collections.some}\n * @alias anySeries\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {Function} iteratee - A truth test to apply to each item in the array\n * in parallel. The iteratee is passed a `callback(err, truthValue)` which must\n * be called with a boolean argument once it has completed. Invoked with\n * (item, callback).\n * @param {Function} [callback] - A callback which is called as soon as any\n * iteratee returns `true`, or after all the iteratee functions have finished.\n * Result will be either `true` or `false` depending on the values of the async\n * tests. Invoked with (err, result).\n */\nexport default doLimit(someLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/someSeries.js","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nexport default baseRange;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/lodash-es/_baseRange.js","import timesLimit from './timesLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * Calls the `iteratee` function `n` times, and accumulates results in the same\n * manner you would use with [map]{@link module:Collections.map}.\n *\n * @name times\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @see [async.map]{@link module:Collections.map}\n * @category Control Flow\n * @param {number} n - The number of times to run the function.\n * @param {Function} iteratee - The function to call `n` times. Invoked with the\n * iteration index and a callback (n, next).\n * @param {Function} callback - see {@link module:Collections.map}.\n * @example\n *\n * // Pretend this is some complicated async factory\n * var createUser = function(id, callback) {\n * callback(null, {\n * id: 'user' + id\n * });\n * };\n *\n * // generate 5 users\n * async.times(5, function(n, next) {\n * createUser(n, function(err, user) {\n * next(err, user);\n * });\n * }, function(err, users) {\n * // we should now have 5 users\n * });\n */\nexport default doLimit(timesLimit, Infinity);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/times.js","import timesLimit from './timesLimit';\nimport doLimit from './internal/doLimit';\n\n/**\n * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.\n *\n * @name timesSeries\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @see [async.times]{@link module:ControlFlow.times}\n * @category Control Flow\n * @param {number} n - The number of times to run the function.\n * @param {Function} iteratee - The function to call `n` times. Invoked with the\n * iteration index and a callback (n, next).\n * @param {Function} callback - see {@link module:Collections.map}.\n */\nexport default doLimit(timesLimit, 1);\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/timesSeries.js","/**\n * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,\n * unmemoized form. Handy for testing.\n *\n * @name unmemoize\n * @static\n * @memberOf module:Utils\n * @method\n * @see [async.memoize]{@link module:Utils.memoize}\n * @category Util\n * @param {Function} fn - the memoized function\n * @returns {Function} a function that calls the original unmemoized function\n */\nexport default function unmemoize(fn) {\n return function () {\n return (fn.unmemoized || fn).apply(null, arguments);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/unmemoize.js","import isArray from 'lodash-es/isArray';\nimport noop from 'lodash-es/noop';\nimport once from './internal/once';\nimport rest from './internal/rest';\n\nimport onlyOnce from './internal/onlyOnce';\n\n/**\n * Runs the `tasks` array of functions in series, each passing their results to\n * the next in the array. However, if any of the `tasks` pass an error to their\n * own callback, the next function is not executed, and the main `callback` is\n * immediately called with the error.\n *\n * @name waterfall\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @category Control Flow\n * @param {Array} tasks - An array of functions to run, each function is passed\n * a `callback(err, result1, result2, ...)` it must call on completion. The\n * first argument is an error (which can be `null`) and any further arguments\n * will be passed as arguments in order to the next task.\n * @param {Function} [callback] - An optional callback to run once all the\n * functions have completed. This will be passed the results of the last task's\n * callback. Invoked with (err, [results]).\n * @returns undefined\n * @example\n *\n * async.waterfall([\n * function(callback) {\n * callback(null, 'one', 'two');\n * },\n * function(arg1, arg2, callback) {\n * // arg1 now equals 'one' and arg2 now equals 'two'\n * callback(null, 'three');\n * },\n * function(arg1, callback) {\n * // arg1 now equals 'three'\n * callback(null, 'done');\n * }\n * ], function (err, result) {\n * // result now equals 'done'\n * });\n *\n * // Or, with named functions:\n * async.waterfall([\n * myFirstFunction,\n * mySecondFunction,\n * myLastFunction,\n * ], function (err, result) {\n * // result now equals 'done'\n * });\n * function myFirstFunction(callback) {\n * callback(null, 'one', 'two');\n * }\n * function mySecondFunction(arg1, arg2, callback) {\n * // arg1 now equals 'one' and arg2 now equals 'two'\n * callback(null, 'three');\n * }\n * function myLastFunction(arg1, callback) {\n * // arg1 now equals 'three'\n * callback(null, 'done');\n * }\n */\nexport default function(tasks, callback) {\n callback = once(callback || noop);\n if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));\n if (!tasks.length) return callback();\n var taskIndex = 0;\n\n function nextTask(args) {\n if (taskIndex === tasks.length) {\n return callback.apply(null, [null].concat(args));\n }\n\n var taskCallback = onlyOnce(rest(function(err, args) {\n if (err) {\n return callback.apply(null, [err].concat(args));\n }\n nextTask(args);\n }));\n\n args.push(taskCallback);\n\n var task = tasks[taskIndex++];\n task.apply(null, args);\n }\n\n nextTask([]);\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/waterfall.js","/**\n * Async is a utility module which provides straight-forward, powerful functions\n * for working with asynchronous JavaScript. Although originally designed for\n * use with [Node.js](http://nodejs.org) and installable via\n * `npm install --save async`, it can also be used directly in the browser.\n * @module async\n */\n\n/**\n * A collection of `async` functions for manipulating collections, such as\n * arrays and objects.\n * @module Collections\n */\n\n/**\n * A collection of `async` functions for controlling the flow through a script.\n * @module ControlFlow\n */\n\n /**\n * A collection of `async` utility functions.\n * @module Utils\n */\nimport applyEach from './applyEach';\nimport applyEachSeries from './applyEachSeries';\nimport apply from './apply';\nimport asyncify from './asyncify';\nimport auto from './auto';\nimport autoInject from './autoInject';\nimport cargo from './cargo';\nimport compose from './compose';\nimport concat from './concat';\nimport concatSeries from './concatSeries';\nimport constant from './constant';\nimport detect from './detect';\nimport detectLimit from './detectLimit';\nimport detectSeries from './detectSeries';\nimport dir from './dir';\nimport doDuring from './doDuring';\nimport doUntil from './doUntil';\nimport doWhilst from './doWhilst';\nimport during from './during';\nimport each from './each';\nimport eachLimit from './eachLimit';\nimport eachOf from './eachOf';\nimport eachOfLimit from './eachOfLimit';\nimport eachOfSeries from './eachOfSeries';\nimport eachSeries from './eachSeries';\nimport ensureAsync from './ensureAsync';\nimport every from './every';\nimport everyLimit from './everyLimit';\nimport everySeries from './everySeries';\nimport filter from './filter';\nimport filterLimit from './filterLimit';\nimport filterSeries from './filterSeries';\nimport forever from './forever';\nimport log from './log';\nimport map from './map';\nimport mapLimit from './mapLimit';\nimport mapSeries from './mapSeries';\nimport mapValues from './mapValues';\nimport mapValuesLimit from './mapValuesLimit';\nimport mapValuesSeries from './mapValuesSeries';\nimport memoize from './memoize';\nimport nextTick from './nextTick';\nimport parallel from './parallel';\nimport parallelLimit from './parallelLimit';\nimport priorityQueue from './priorityQueue';\nimport queue from './queue';\nimport race from './race';\nimport reduce from './reduce';\nimport reduceRight from './reduceRight';\nimport reflect from './reflect';\nimport reject from './reject';\nimport reflectAll from './reflectAll';\nimport rejectLimit from './rejectLimit';\nimport rejectSeries from './rejectSeries';\nimport retry from './retry';\nimport retryable from './retryable';\nimport seq from './seq';\nimport series from './series';\nimport setImmediate from './setImmediate';\nimport some from './some';\nimport someLimit from './someLimit';\nimport someSeries from './someSeries';\nimport sortBy from './sortBy';\nimport timeout from './timeout';\nimport times from './times';\nimport timesLimit from './timesLimit';\nimport timesSeries from './timesSeries';\nimport transform from './transform';\nimport unmemoize from './unmemoize';\nimport until from './until';\nimport waterfall from './waterfall';\nimport whilst from './whilst';\n\nexport default {\n applyEach: applyEach,\n applyEachSeries: applyEachSeries,\n apply: apply,\n asyncify: asyncify,\n auto: auto,\n autoInject: autoInject,\n cargo: cargo,\n compose: compose,\n concat: concat,\n concatSeries: concatSeries,\n constant: constant,\n detect: detect,\n detectLimit: detectLimit,\n detectSeries: detectSeries,\n dir: dir,\n doDuring: doDuring,\n doUntil: doUntil,\n doWhilst: doWhilst,\n during: during,\n each: each,\n eachLimit: eachLimit,\n eachOf: eachOf,\n eachOfLimit: eachOfLimit,\n eachOfSeries: eachOfSeries,\n eachSeries: eachSeries,\n ensureAsync: ensureAsync,\n every: every,\n everyLimit: everyLimit,\n everySeries: everySeries,\n filter: filter,\n filterLimit: filterLimit,\n filterSeries: filterSeries,\n forever: forever,\n log: log,\n map: map,\n mapLimit: mapLimit,\n mapSeries: mapSeries,\n mapValues: mapValues,\n mapValuesLimit: mapValuesLimit,\n mapValuesSeries: mapValuesSeries,\n memoize: memoize,\n nextTick: nextTick,\n parallel: parallel,\n parallelLimit: parallelLimit,\n priorityQueue: priorityQueue,\n queue: queue,\n race: race,\n reduce: reduce,\n reduceRight: reduceRight,\n reflect: reflect,\n reflectAll: reflectAll,\n reject: reject,\n rejectLimit: rejectLimit,\n rejectSeries: rejectSeries,\n retry: retry,\n retryable: retryable,\n seq: seq,\n series: series,\n setImmediate: setImmediate,\n some: some,\n someLimit: someLimit,\n someSeries: someSeries,\n sortBy: sortBy,\n timeout: timeout,\n times: times,\n timesLimit: timesLimit,\n timesSeries: timesSeries,\n transform: transform,\n unmemoize: unmemoize,\n until: until,\n waterfall: waterfall,\n whilst: whilst,\n\n // aliases\n all: every,\n any: some,\n forEach: each,\n forEachSeries: eachSeries,\n forEachLimit: eachLimit,\n forEachOf: eachOf,\n forEachOfSeries: eachOfSeries,\n forEachOfLimit: eachOfLimit,\n inject: reduce,\n foldl: reduce,\n foldr: reduceRight,\n select: filter,\n selectLimit: filterLimit,\n selectSeries: filterSeries,\n wrapSync: asyncify\n};\n\nexport {\n applyEach as applyEach,\n applyEachSeries as applyEachSeries,\n apply as apply,\n asyncify as asyncify,\n auto as auto,\n autoInject as autoInject,\n cargo as cargo,\n compose as compose,\n concat as concat,\n concatSeries as concatSeries,\n constant as constant,\n detect as detect,\n detectLimit as detectLimit,\n detectSeries as detectSeries,\n dir as dir,\n doDuring as doDuring,\n doUntil as doUntil,\n doWhilst as doWhilst,\n during as during,\n each as each,\n eachLimit as eachLimit,\n eachOf as eachOf,\n eachOfLimit as eachOfLimit,\n eachOfSeries as eachOfSeries,\n eachSeries as eachSeries,\n ensureAsync as ensureAsync,\n every as every,\n everyLimit as everyLimit,\n everySeries as everySeries,\n filter as filter,\n filterLimit as filterLimit,\n filterSeries as filterSeries,\n forever as forever,\n log as log,\n map as map,\n mapLimit as mapLimit,\n mapSeries as mapSeries,\n mapValues as mapValues,\n mapValuesLimit as mapValuesLimit,\n mapValuesSeries as mapValuesSeries,\n memoize as memoize,\n nextTick as nextTick,\n parallel as parallel,\n parallelLimit as parallelLimit,\n priorityQueue as priorityQueue,\n queue as queue,\n race as race,\n reduce as reduce,\n reduceRight as reduceRight,\n reflect as reflect,\n reflectAll as reflectAll,\n reject as reject,\n rejectLimit as rejectLimit,\n rejectSeries as rejectSeries,\n retry as retry,\n retryable as retryable,\n seq as seq,\n series as series,\n setImmediate as setImmediate,\n some as some,\n someLimit as someLimit,\n someSeries as someSeries,\n sortBy as sortBy,\n timeout as timeout,\n times as times,\n timesLimit as timesLimit,\n timesSeries as timesSeries,\n transform as transform,\n unmemoize as unmemoize,\n until as until,\n waterfall as waterfall,\n whilst as whilst,\n\n // Aliases\n every as all,\n everyLimit as allLimit,\n everySeries as allSeries,\n some as any,\n someLimit as anyLimit,\n someSeries as anySeries,\n detect as find,\n detectLimit as findLimit,\n detectSeries as findSeries,\n each as forEach,\n eachSeries as forEachSeries,\n eachLimit as forEachLimit,\n eachOf as forEachOf,\n eachOfSeries as forEachOfSeries,\n eachOfLimit as forEachOfLimit,\n reduce as inject,\n reduce as foldl,\n reduceRight as foldr,\n filter as select,\n filterLimit as selectLimit,\n filterSeries as selectSeries,\n asyncify as wrapSync\n};\n\n\n\n// WEBPACK FOOTER //\n// ../../../../~/async-es/index.js","import PreloadFile from '../generic/preload_file';\nimport {BaseFileSystem, FileSystem, BFSOneArgCallback, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {FileFlag} from '../core/file_flag';\nimport {default as Stats, FileType} from '../core/node_fs_stats';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport {File} from '../core/file';\nimport {each as asyncEach} from 'async';\nimport * as path from 'path';\nimport {arrayBuffer2Buffer, buffer2ArrayBuffer, emptyBuffer, deprecationMessage} from '../core/util';\n\n/**\n * @hidden\n */\nlet errorCodeLookup: {[dropboxErrorCode: number]: ErrorCode};\n/**\n * Lazily construct error code lookup, since DropboxJS might be loaded *after* BrowserFS (or not at all!)\n * @hidden\n */\nfunction constructErrorCodeLookup() {\n if (errorCodeLookup) {\n return;\n }\n errorCodeLookup = {};\n // This indicates a network transmission error on modern browsers. Internet Explorer might cause this code to be reported on some API server errors.\n errorCodeLookup[Dropbox.ApiError.NETWORK_ERROR] = ErrorCode.EIO;\n // This happens when the contentHash parameter passed to a Dropbox.Client#readdir or Dropbox.Client#stat matches the most recent content, so the API call response is omitted, to save bandwidth.\n // errorCodeLookup[Dropbox.ApiError.NO_CONTENT];\n // The error property on {Dropbox.ApiError#response} should indicate which input parameter is invalid and why.\n errorCodeLookup[Dropbox.ApiError.INVALID_PARAM] = ErrorCode.EINVAL;\n // The OAuth token used for the request will never become valid again, so the user should be re-authenticated.\n errorCodeLookup[Dropbox.ApiError.INVALID_TOKEN] = ErrorCode.EPERM;\n // This indicates a bug in dropbox.js and should never occur under normal circumstances.\n // ^ Actually, that's false. This occurs when you try to move folders to themselves, or move a file over another file.\n errorCodeLookup[Dropbox.ApiError.OAUTH_ERROR] = ErrorCode.EPERM;\n // This happens when trying to read from a non-existing file, readdir a non-existing directory, write a file into a non-existing directory, etc.\n errorCodeLookup[Dropbox.ApiError.NOT_FOUND] = ErrorCode.ENOENT;\n // This indicates a bug in dropbox.js and should never occur under normal circumstances.\n errorCodeLookup[Dropbox.ApiError.INVALID_METHOD] = ErrorCode.EINVAL;\n // This happens when a Dropbox.Client#readdir or Dropbox.Client#stat call would return more than a maximum amount of directory entries.\n errorCodeLookup[Dropbox.ApiError.NOT_ACCEPTABLE] = ErrorCode.EINVAL;\n // This is used by some backend methods to indicate that the client needs to download server-side changes and perform conflict resolution. Under normal usage, errors with this code should never surface to the code using dropbox.js.\n errorCodeLookup[Dropbox.ApiError.CONFLICT] = ErrorCode.EINVAL;\n // Status value indicating that the application is making too many requests.\n errorCodeLookup[Dropbox.ApiError.RATE_LIMITED] = ErrorCode.EBUSY;\n // The request should be retried after some time.\n errorCodeLookup[Dropbox.ApiError.SERVER_ERROR] = ErrorCode.EBUSY;\n // Status value indicating that the user's Dropbox is over its storage quota.\n errorCodeLookup[Dropbox.ApiError.OVER_QUOTA] = ErrorCode.ENOSPC;\n}\n\n/**\n * @hidden\n */\ninterface ICachedPathInfo {\n stat: Dropbox.File.Stat;\n}\n\n/**\n * @hidden\n */\ninterface ICachedFileInfo extends ICachedPathInfo {\n contents: ArrayBuffer;\n}\n\n/**\n * @hidden\n */\nfunction isFileInfo(cache: ICachedPathInfo): cache is ICachedFileInfo {\n return cache && cache.stat.isFile;\n}\n\n/**\n * @hidden\n */\ninterface ICachedDirInfo extends ICachedPathInfo {\n contents: string[];\n}\n\n/**\n * @hidden\n */\nfunction isDirInfo(cache: ICachedPathInfo): cache is ICachedDirInfo {\n return cache && cache.stat.isFolder;\n}\n\n/**\n * @hidden\n */\nfunction isArrayBuffer(ab: any): ab is ArrayBuffer {\n // Accept null / undefined, too.\n return ab === null || ab === undefined || (typeof(ab) === 'object' && typeof(ab['byteLength']) === 'number');\n}\n\n/**\n * Wraps a Dropbox client and caches operations.\n * @hidden\n */\nclass CachedDropboxClient {\n private _cache: {[path: string]: ICachedPathInfo} = {};\n private _client: Dropbox.Client;\n\n constructor(client: Dropbox.Client) {\n this._client = client;\n }\n\n public readdir(p: string, cb: (error: Dropbox.ApiError | null, contents?: string[]) => void): void {\n const cacheInfo = this.getCachedDirInfo(p);\n\n this._wrap((interceptCb) => {\n if (cacheInfo !== null && cacheInfo.contents) {\n this._client.readdir(p, {\n contentHash: cacheInfo.stat.contentHash\n }, interceptCb);\n } else {\n this._client.readdir(p, interceptCb);\n }\n }, (err: Dropbox.ApiError, filenames: string[], stat: Dropbox.File.Stat, folderEntries: Dropbox.File.Stat[]) => {\n if (err) {\n if (err.status === Dropbox.ApiError.NO_CONTENT && cacheInfo !== null) {\n cb(null, cacheInfo.contents.slice(0));\n } else {\n cb(err);\n }\n } else {\n this.updateCachedDirInfo(p, stat, filenames.slice(0));\n folderEntries.forEach((entry) => {\n this.updateCachedInfo(path.join(p, entry.name), entry);\n });\n cb(null, filenames);\n }\n });\n }\n\n public remove(p: string, cb: (error?: Dropbox.ApiError | null) => void): void {\n this._wrap((interceptCb) => {\n this._client.remove(p, interceptCb);\n }, (err: Dropbox.ApiError, stat?: Dropbox.File.Stat) => {\n if (!err) {\n this.updateCachedInfo(p, stat!);\n }\n cb(err);\n });\n }\n\n public move(src: string, dest: string, cb: (error?: Dropbox.ApiError) => void): void {\n this._wrap((interceptCb) => {\n this._client.move(src, dest, interceptCb);\n }, (err: Dropbox.ApiError, stat: Dropbox.File.Stat) => {\n if (!err) {\n this.deleteCachedInfo(src);\n this.updateCachedInfo(dest, stat);\n }\n cb(err);\n });\n }\n\n public stat(p: string, cb: (error: Dropbox.ApiError, stat?: Dropbox.File.Stat) => void): void {\n this._wrap((interceptCb) => {\n this._client.stat(p, interceptCb);\n }, (err: Dropbox.ApiError, stat: Dropbox.File.Stat) => {\n if (!err) {\n this.updateCachedInfo(p, stat);\n }\n cb(err, stat);\n });\n }\n\n public readFile(p: string, cb: (error: Dropbox.ApiError, file?: ArrayBuffer, stat?: Dropbox.File.Stat) => void): void {\n const cacheInfo = this.getCachedFileInfo(p);\n if (cacheInfo !== null && cacheInfo.contents !== null) {\n // Try to use cached info; issue a stat to see if contents are up-to-date.\n this.stat(p, (error, stat?) => {\n if (error) {\n cb(error);\n } else if (stat!.contentHash === cacheInfo!.stat.contentHash) {\n // No file changes.\n cb(error, cacheInfo!.contents.slice(0), cacheInfo!.stat);\n } else {\n // File changes; rerun to trigger actual readFile.\n this.readFile(p, cb);\n }\n });\n } else {\n this._wrap((interceptCb) => {\n this._client.readFile(p, { arrayBuffer: true }, interceptCb);\n }, (err: Dropbox.ApiError, contents: any, stat: Dropbox.File.Stat) => {\n if (!err) {\n this.updateCachedInfo(p, stat, contents.slice(0));\n }\n cb(err, contents, stat);\n });\n }\n }\n\n public writeFile(p: string, contents: ArrayBuffer, cb: (error: Dropbox.ApiError, stat?: Dropbox.File.Stat) => void): void {\n this._wrap((interceptCb) => {\n this._client.writeFile(p, contents, interceptCb);\n }, (err: Dropbox.ApiError, stat: Dropbox.File.Stat) => {\n if (!err) {\n this.updateCachedInfo(p, stat, contents.slice(0));\n }\n cb(err, stat);\n });\n }\n\n public mkdir(p: string, cb: (error?: Dropbox.ApiError) => void): void {\n this._wrap((interceptCb) => {\n this._client.mkdir(p, interceptCb);\n }, (err: Dropbox.ApiError, stat: Dropbox.File.Stat) => {\n if (!err) {\n this.updateCachedInfo(p, stat, []);\n }\n cb(err);\n });\n }\n\n /**\n * Wraps an operation such that we retry a failed operation 3 times.\n * Necessary to deal with Dropbox rate limiting.\n *\n * @param performOp Function that performs the operation. Will be called up to three times.\n * @param cb Called when the operation succeeds, fails in a non-temporary manner, or fails three times.\n */\n private _wrap(performOp: (interceptCb: (error: Dropbox.ApiError) => void) => void, cb: Function): void {\n let numRun = 0;\n const interceptCb = function(error: Dropbox.ApiError): void {\n // Timeout duration, in seconds.\n const timeoutDuration: number = 2;\n if (error && 3 > (++numRun)) {\n switch (error.status) {\n case Dropbox.ApiError.SERVER_ERROR:\n case Dropbox.ApiError.NETWORK_ERROR:\n case Dropbox.ApiError.RATE_LIMITED:\n setTimeout(() => {\n performOp(interceptCb);\n }, timeoutDuration * 1000);\n break;\n default:\n cb.apply(null, arguments);\n break;\n }\n } else {\n cb.apply(null, arguments);\n }\n };\n\n performOp(interceptCb);\n }\n\n private getCachedInfo(p: string): ICachedPathInfo {\n return this._cache[p.toLowerCase()];\n }\n\n private putCachedInfo(p: string, cache: ICachedPathInfo): void {\n this._cache[p.toLowerCase()] = cache;\n }\n\n private deleteCachedInfo(p: string): void {\n delete this._cache[p.toLowerCase()];\n }\n\n private getCachedDirInfo(p: string): ICachedDirInfo | null {\n const info = this.getCachedInfo(p);\n if (isDirInfo(info)) {\n return info;\n } else {\n return null;\n }\n }\n\n private getCachedFileInfo(p: string): ICachedFileInfo | null {\n const info = this.getCachedInfo(p);\n if (isFileInfo(info)) {\n return info;\n } else {\n return null;\n }\n }\n\n private updateCachedDirInfo(p: string, stat: Dropbox.File.Stat, contents: string[] | null = null): void {\n const cachedInfo = this.getCachedInfo(p);\n // Dropbox uses the *contentHash* property for directories.\n // Ignore stat objects w/o a contentHash defined; those actually exist!!!\n // (Example: readdir returns an array of stat objs; stat objs for dirs in that context have no contentHash)\n if (stat.contentHash !== null && (cachedInfo === undefined || cachedInfo.stat.contentHash !== stat.contentHash)) {\n this.putCachedInfo(p, {\n stat: stat,\n contents: contents\n });\n }\n }\n\n private updateCachedFileInfo(p: string, stat: Dropbox.File.Stat, contents: ArrayBuffer | null = null): void {\n const cachedInfo = this.getCachedInfo(p);\n // Dropbox uses the *versionTag* property for files.\n // Ignore stat objects w/o a versionTag defined.\n if (stat.versionTag !== null && (cachedInfo === undefined || cachedInfo.stat.versionTag !== stat.versionTag)) {\n this.putCachedInfo(p, {\n stat: stat,\n contents: contents\n });\n }\n }\n\n private updateCachedInfo(p: string, stat: Dropbox.File.Stat, contents: ArrayBuffer | string[] | null = null): void {\n if (stat.isFile && isArrayBuffer(contents)) {\n this.updateCachedFileInfo(p, stat, contents);\n } else if (stat.isFolder && Array.isArray(contents)) {\n this.updateCachedDirInfo(p, stat, contents);\n }\n }\n}\n\nexport class DropboxFile extends PreloadFile implements File {\n constructor(_fs: DropboxFileSystem, _path: string, _flag: FileFlag, _stat: Stats, contents?: Buffer) {\n super(_fs, _path, _flag, _stat, contents);\n }\n\n public sync(cb: BFSOneArgCallback): void {\n if (this.isDirty()) {\n const buffer = this.getBuffer(),\n arrayBuffer = buffer2ArrayBuffer(buffer);\n this._fs._writeFileStrict(this.getPath(), arrayBuffer, (e?: ApiError) => {\n if (!e) {\n this.resetDirty();\n }\n cb(e);\n });\n } else {\n cb();\n }\n }\n\n public close(cb: BFSOneArgCallback): void {\n this.sync(cb);\n }\n}\n\n/**\n * Options for the Dropbox file system.\n */\nexport interface DropboxFileSystemOptions {\n // An *authenticated* Dropbox client. Must be from the 0.10 JS SDK.\n client: Dropbox.Client;\n}\n\n/**\n * A read/write file system backed by Dropbox cloud storage.\n *\n * Uses the Dropbox V1 API.\n *\n * NOTE: You must use the v0.10 version of the [Dropbox JavaScript SDK](https://www.npmjs.com/package/dropbox).\n */\nexport default class DropboxFileSystem extends BaseFileSystem implements FileSystem {\n public static readonly Name = \"Dropbox\";\n\n public static readonly Options: FileSystemOptions = {\n client: {\n type: \"object\",\n description: \"An *authenticated* Dropbox client. Must be from the 0.10 JS SDK.\",\n validator: (opt: Dropbox.Client, cb: BFSOneArgCallback): void => {\n if (opt.isAuthenticated && opt.isAuthenticated()) {\n cb();\n } else {\n cb(new ApiError(ErrorCode.EINVAL, `'client' option must be an authenticated Dropbox client from the v0.10 JS SDK.`));\n }\n }\n }\n };\n\n /**\n * Creates a new DropboxFileSystem instance with the given options.\n * Must be given an *authenticated* DropboxJS client from the old v0.10 version of the Dropbox JS SDK.\n */\n public static Create(opts: DropboxFileSystemOptions, cb: BFSCallback): void {\n cb(null, new DropboxFileSystem(opts.client, false));\n }\n\n public static isAvailable(): boolean {\n // Checks if the Dropbox library is loaded.\n return typeof Dropbox !== 'undefined';\n }\n\n // The Dropbox client.\n private _client: CachedDropboxClient;\n\n /**\n * **Deprecated. Please use Dropbox.Create() method instead.**\n *\n * Constructs a Dropbox-backed file system using the *authenticated* DropboxJS client.\n *\n * Note that you must use the old v0.10 version of the Dropbox JavaScript SDK.\n */\n constructor(client: Dropbox.Client, deprecateMsg = true) {\n super();\n this._client = new CachedDropboxClient(client);\n deprecationMessage(deprecateMsg, DropboxFileSystem.Name, { client: \"authenticated dropbox client instance\" });\n constructErrorCodeLookup();\n }\n\n public getName(): string {\n return DropboxFileSystem.Name;\n }\n\n public isReadOnly(): boolean {\n return false;\n }\n\n // Dropbox doesn't support symlinks, properties, or synchronous calls\n\n public supportsSymlinks(): boolean {\n return false;\n }\n\n public supportsProps(): boolean {\n return false;\n }\n\n public supportsSynch(): boolean {\n return false;\n }\n\n public empty(mainCb: BFSOneArgCallback): void {\n this._client.readdir('/', (error, files) => {\n if (error) {\n mainCb(this.convert(error, '/'));\n } else {\n const deleteFile = (file: string, cb: BFSOneArgCallback) => {\n const p = path.join('/', file);\n this._client.remove(p, (err) => {\n cb(err ? this.convert(err, p) : null);\n });\n };\n const finished = (err?: ApiError) => {\n if (err) {\n mainCb(err);\n } else {\n mainCb();\n }\n };\n // XXX: typing is to get around overly-restrictive ErrorCallback typing.\n asyncEach(files!, deleteFile, finished);\n }\n });\n }\n\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void {\n this._client.move(oldPath, newPath, (error) => {\n if (error) {\n // the move is permitted if newPath is a file.\n // Check if this is the case, and remove if so.\n this._client.stat(newPath, (error2, stat) => {\n if (error2 || stat!.isFolder) {\n const missingPath = ( error.response).error.indexOf(oldPath) > -1 ? oldPath : newPath;\n cb(this.convert(error, missingPath));\n } else {\n // Delete file, repeat rename.\n this._client.remove(newPath, (error2) => {\n if (error2) {\n cb(this.convert(error2, newPath));\n } else {\n this.rename(oldPath, newPath, cb);\n }\n });\n }\n });\n } else {\n cb();\n }\n });\n }\n\n public stat(path: string, isLstat: boolean, cb: BFSCallback): void {\n // Ignore lstat case -- Dropbox doesn't support symlinks\n // Stat the file\n this._client.stat(path, (error, stat) => {\n if (error) {\n cb(this.convert(error, path));\n } else if (stat && stat.isRemoved) {\n // Dropbox keeps track of deleted files, so if a file has existed in the\n // past but doesn't any longer, you wont get an error\n cb(ApiError.FileError(ErrorCode.ENOENT, path));\n } else {\n const stats = new Stats(this._statType(stat!), stat!.size);\n return cb(null, stats);\n }\n });\n }\n\n public open(path: string, flags: FileFlag, mode: number, cb: BFSCallback): void {\n // Try and get the file's contents\n this._client.readFile(path, (error, content, dbStat) => {\n if (error) {\n // If the file's being opened for reading and doesn't exist, return an\n // error\n if (flags.isReadable()) {\n cb(this.convert(error, path));\n } else {\n switch (error.status) {\n // If it's being opened for writing or appending, create it so that\n // it can be written to\n case Dropbox.ApiError.NOT_FOUND:\n const ab = new ArrayBuffer(0);\n return this._writeFileStrict(path, ab, (error2: ApiError, stat?: Dropbox.File.Stat) => {\n if (error2) {\n cb(error2);\n } else {\n const file = this._makeFile(path, flags, stat!, arrayBuffer2Buffer(ab));\n cb(null, file);\n }\n });\n default:\n return cb(this.convert(error, path));\n }\n }\n } else {\n // No error\n let buffer: Buffer;\n // Dropbox.js seems to set `content` to `null` rather than to an empty\n // buffer when reading an empty file. Not sure why this is.\n if (content === null) {\n buffer = emptyBuffer();\n } else {\n buffer = arrayBuffer2Buffer(content!);\n }\n const file = this._makeFile(path, flags, dbStat!, buffer);\n return cb(null, file);\n }\n });\n }\n\n public _writeFileStrict(p: string, data: ArrayBuffer, cb: BFSCallback): void {\n const parent = path.dirname(p);\n this.stat(parent, false, (error: ApiError, stat?: Stats): void => {\n if (error) {\n cb(ApiError.FileError(ErrorCode.ENOENT, parent));\n } else {\n this._client.writeFile(p, data, (error2, stat) => {\n if (error2) {\n cb(this.convert(error2, p));\n } else {\n cb(null, stat);\n }\n });\n }\n });\n }\n\n /**\n * Private\n * Returns a BrowserFS object representing the type of a Dropbox.js stat object\n */\n public _statType(stat: Dropbox.File.Stat): FileType {\n return stat.isFile ? FileType.FILE : FileType.DIRECTORY;\n }\n\n /**\n * Private\n * Returns a BrowserFS object representing a File, created from the data\n * returned by calls to the Dropbox API.\n */\n public _makeFile(path: string, flag: FileFlag, stat: Dropbox.File.Stat, buffer: Buffer): DropboxFile {\n const type = this._statType(stat);\n const stats = new Stats(type, stat.size);\n return new DropboxFile(this, path, flag, stats, buffer);\n }\n\n /**\n * Private\n * Delete a file or directory from Dropbox\n * isFile should reflect which call was made to remove the it (`unlink` or\n * `rmdir`). If this doesn't match what's actually at `path`, an error will be\n * returned\n */\n public _remove(path: string, cb: BFSOneArgCallback, isFile: boolean): void {\n this._client.stat(path, (error, stat) => {\n if (error) {\n cb(this.convert(error, path));\n } else {\n if (stat!.isFile && !isFile) {\n cb(ApiError.FileError(ErrorCode.ENOTDIR, path));\n } else if (!stat!.isFile && isFile) {\n cb(ApiError.FileError(ErrorCode.EISDIR, path));\n } else {\n this._client.remove(path, (error) => {\n if (error) {\n cb(this.convert(error, path));\n } else {\n cb(null);\n }\n });\n }\n }\n });\n }\n\n /**\n * Delete a file\n */\n public unlink(path: string, cb: BFSOneArgCallback): void {\n this._remove(path, cb, true);\n }\n\n /**\n * Delete a directory\n */\n public rmdir(path: string, cb: BFSOneArgCallback): void {\n this._remove(path, cb, false);\n }\n\n /**\n * Create a directory\n */\n public mkdir(p: string, mode: number, cb: BFSOneArgCallback): void {\n // Dropbox.js' client.mkdir() behaves like `mkdir -p`, i.e. it creates a\n // directory and all its ancestors if they don't exist.\n // Node's fs.mkdir() behaves like `mkdir`, i.e. it throws an error if an attempt\n // is made to create a directory without a parent.\n // To handle this inconsistency, a check for the existence of `path`'s parent\n // must be performed before it is created, and an error thrown if it does\n // not exist\n const parent = path.dirname(p);\n this._client.stat(parent, (error, stat) => {\n if (error) {\n cb(this.convert(error, parent));\n } else {\n this._client.mkdir(p, (error) => {\n if (error) {\n cb(ApiError.FileError(ErrorCode.EEXIST, p));\n } else {\n cb(null);\n }\n });\n }\n });\n }\n\n /**\n * Get the names of the files in a directory\n */\n public readdir(path: string, cb: BFSCallback): void {\n this._client.readdir(path, (error, files) => {\n if (error) {\n return cb(this.convert(error));\n } else {\n return cb(null, files);\n }\n });\n }\n\n /**\n * Converts a Dropbox-JS error into a BFS error.\n */\n public convert(err: Dropbox.ApiError, path: string | null = null): ApiError {\n let errorCode = errorCodeLookup[err.status];\n if (errorCode === undefined) {\n errorCode = ErrorCode.EIO;\n }\n\n if (!path) {\n return new ApiError(errorCode);\n } else {\n return ApiError.FileError(errorCode, path);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/Dropbox.ts","import {SynchronousFileSystem, BFSOneArgCallback, BFSCallback, BFSThreeArgCallback, FileSystemOptions} from '../core/file_system';\nimport {default as Stats, FileType} from '../core/node_fs_stats';\nimport {FileFlag} from '../core/file_flag';\nimport {BaseFile, File} from '../core/file';\nimport {uint8Array2Buffer, buffer2Uint8array} from '../core/util';\nimport {ApiError, ErrorCode, ErrorStrings} from '../core/api_error';\nimport {EmscriptenFSNode} from '../generic/emscripten_fs';\n\n/**\n * @hidden\n */\ninterface EmscriptenError {\n node: EmscriptenFSNode;\n errno: number;\n}\n\n/**\n * @hidden\n */\nfunction convertError(e: EmscriptenError, path: string = ''): ApiError {\n const errno = e.errno;\n let parent = e.node;\n const paths: string[] = [];\n while (parent) {\n paths.unshift(parent.name);\n if (parent === parent.parent) {\n break;\n }\n parent = parent.parent;\n }\n return new ApiError(errno, ErrorStrings[errno], paths.length > 0 ? '/' + paths.join('/') : path);\n}\n\nexport class EmscriptenFile extends BaseFile implements File {\n constructor(\n private _fs: EmscriptenFileSystem,\n private _FS: any,\n private _path: string,\n private _stream: any) {\n super();\n }\n public getPos(): number | undefined {\n return undefined;\n }\n public close(cb: BFSOneArgCallback): void {\n let err: ApiError | null = null;\n try {\n this.closeSync();\n } catch (e) {\n err = e;\n } finally {\n cb(err);\n }\n }\n public closeSync(): void {\n try {\n this._FS.close(this._stream);\n } catch (e) {\n throw convertError(e, this._path);\n }\n }\n public stat(cb: BFSCallback): void {\n try {\n cb(null, this.statSync());\n } catch (e) {\n cb(e);\n }\n }\n public statSync(): Stats {\n try {\n return this._fs.statSync(this._path, false);\n } catch (e) {\n throw convertError(e, this._path);\n }\n }\n public truncate(len: number, cb: BFSOneArgCallback): void {\n let err: ApiError | null = null;\n try {\n this.truncateSync(len);\n } catch (e) {\n err = e;\n } finally {\n cb(err);\n }\n }\n public truncateSync(len: number): void {\n try {\n this._FS.ftruncate(this._stream.fd, len);\n } catch (e) {\n throw convertError(e, this._path);\n }\n }\n public write(buffer: NodeBuffer, offset: number, length: number, position: number, cb: BFSThreeArgCallback): void {\n try {\n cb(null, this.writeSync(buffer, offset, length, position), buffer);\n } catch (e) {\n cb(e);\n }\n }\n public writeSync(buffer: NodeBuffer, offset: number, length: number, position: number | null): number {\n try {\n const u8 = buffer2Uint8array(buffer);\n // Emscripten is particular about what position is set to.\n const emPosition = position === null ? undefined : position;\n return this._FS.write(this._stream, u8, offset, length, emPosition);\n } catch (e) {\n throw convertError(e, this._path);\n }\n }\n public read(buffer: NodeBuffer, offset: number, length: number, position: number, cb: BFSThreeArgCallback): void {\n try {\n cb(null, this.readSync(buffer, offset, length, position), buffer);\n } catch (e) {\n cb(e);\n }\n }\n public readSync(buffer: NodeBuffer, offset: number, length: number, position: number | null): number {\n try {\n const u8 = buffer2Uint8array(buffer);\n // Emscripten is particular about what position is set to.\n const emPosition = position === null ? undefined : position;\n return this._FS.read(this._stream, u8, offset, length, emPosition);\n } catch (e) {\n throw convertError(e, this._path);\n }\n }\n public sync(cb: BFSOneArgCallback): void {\n // NOP.\n cb();\n }\n public syncSync(): void {\n // NOP.\n }\n public chown(uid: number, gid: number, cb: BFSOneArgCallback): void {\n let err: ApiError | null = null;\n try {\n this.chownSync(uid, gid);\n } catch (e) {\n err = e;\n } finally {\n cb(err);\n }\n }\n public chownSync(uid: number, gid: number): void {\n try {\n this._FS.fchown(this._stream.fd, uid, gid);\n } catch (e) {\n throw convertError(e, this._path);\n }\n }\n public chmod(mode: number, cb: BFSOneArgCallback): void {\n let err: ApiError | null = null;\n try {\n this.chmodSync(mode);\n } catch (e) {\n err = e;\n } finally {\n cb(err);\n }\n }\n public chmodSync(mode: number): void {\n try {\n this._FS.fchmod(this._stream.fd, mode);\n } catch (e) {\n throw convertError(e, this._path);\n }\n }\n public utimes(atime: Date, mtime: Date, cb: BFSOneArgCallback): void {\n let err: ApiError | null = null;\n try {\n this.utimesSync(atime, mtime);\n } catch (e) {\n err = e;\n } finally {\n cb(err);\n }\n }\n public utimesSync(atime: Date, mtime: Date): void {\n this._fs.utimesSync(this._path, atime, mtime);\n }\n}\n\n/**\n * Configuration options for Emscripten file systems.\n */\nexport interface EmscriptenFileSystemOptions {\n // The Emscripten file system to use (`FS`)\n FS: any;\n}\n\n/**\n * Mounts an Emscripten file system into the BrowserFS file system.\n */\nexport default class EmscriptenFileSystem extends SynchronousFileSystem {\n public static readonly Name = \"EmscriptenFileSystem\";\n\n public static readonly Options: FileSystemOptions = {\n FS: {\n type: \"object\",\n description: \"The Emscripten file system to use (the `FS` variable)\"\n }\n };\n\n /**\n * Create an EmscriptenFileSystem instance with the given options.\n */\n public static Create(opts: EmscriptenFileSystemOptions, cb: BFSCallback): void {\n cb(null, new EmscriptenFileSystem(opts.FS));\n }\n public static isAvailable(): boolean { return true; }\n\n private _FS: any;\n\n /**\n * Creates a BrowserFS file system for the given Emscripten file system.\n * @param _FS The Emscripten file system (`FS`).\n */\n constructor(_FS: any) {\n super();\n this._FS = _FS;\n }\n public getName(): string { return this._FS.DB_NAME(); }\n public isReadOnly(): boolean { return false; }\n public supportsLinks(): boolean { return true; }\n public supportsProps(): boolean { return true; }\n public supportsSynch(): boolean { return true; }\n\n public renameSync(oldPath: string, newPath: string): void {\n try {\n this._FS.rename(oldPath, newPath);\n } catch (e) {\n if (e.errno === ErrorCode.ENOENT) {\n throw convertError(e, this.existsSync(oldPath) ? newPath : oldPath);\n } else {\n throw convertError(e);\n }\n }\n }\n\n public statSync(p: string, isLstat: boolean): Stats {\n try {\n const stats = isLstat ? this._FS.lstat(p) : this._FS.stat(p);\n const itemType = this.modeToFileType(stats.mode);\n return new Stats(\n itemType,\n stats.size,\n stats.mode,\n stats.atime,\n stats.mtime,\n stats.ctime\n );\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public openSync(p: string, flag: FileFlag, mode: number): EmscriptenFile {\n try {\n const stream = this._FS.open(p, flag.getFlagString(), mode);\n if (this._FS.isDir(stream.node.mode)) {\n this._FS.close(stream);\n throw ApiError.EISDIR(p);\n }\n return new EmscriptenFile(this, this._FS, p, stream);\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public unlinkSync(p: string): void {\n try {\n this._FS.unlink(p);\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public rmdirSync(p: string): void {\n try {\n this._FS.rmdir(p);\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public mkdirSync(p: string, mode: number): void {\n try {\n this._FS.mkdir(p, mode);\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public readdirSync(p: string): string[] {\n try {\n // Emscripten returns items for '.' and '..'. Node does not.\n return this._FS.readdir(p).filter((p: string) => p !== '.' && p !== '..');\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public truncateSync(p: string, len: number): void {\n try {\n this._FS.truncate(p, len);\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public readFileSync(p: string, encoding: string, flag: FileFlag): any {\n try {\n const data: Uint8Array = this._FS.readFile(p, { flags: flag.getFlagString() });\n const buff = uint8Array2Buffer(data);\n if (encoding) {\n return buff.toString(encoding);\n } else {\n return buff;\n }\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public writeFileSync(p: string, data: any, encoding: string, flag: FileFlag, mode: number): void {\n try {\n if (encoding) {\n data = Buffer.from(data, encoding);\n }\n const u8 = buffer2Uint8array(data);\n this._FS.writeFile(p, u8, { flags: flag.getFlagString(), encoding: 'binary' });\n this._FS.chmod(p, mode);\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public chmodSync(p: string, isLchmod: boolean, mode: number) {\n try {\n isLchmod ? this._FS.lchmod(p, mode) : this._FS.chmod(p, mode);\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public chownSync(p: string, isLchown: boolean, uid: number, gid: number): void {\n try {\n isLchown ? this._FS.lchown(p, uid, gid) : this._FS.chown(p, uid, gid);\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public symlinkSync(srcpath: string, dstpath: string, type: string): void {\n try {\n this._FS.symlink(srcpath, dstpath);\n } catch (e) {\n throw convertError(e);\n }\n }\n\n public readlinkSync(p: string): string {\n try {\n return this._FS.readlink(p);\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n public utimesSync(p: string, atime: Date, mtime: Date): void {\n try {\n this._FS.utime(p, atime.getTime(), mtime.getTime());\n } catch (e) {\n throw convertError(e, p);\n }\n }\n\n private modeToFileType(mode: number): FileType {\n if (this._FS.isDir(mode)) {\n return FileType.DIRECTORY;\n } else if (this._FS.isFile(mode)) {\n return FileType.FILE;\n } else if (this._FS.isLink(mode)) {\n return FileType.SYMLINK;\n } else {\n throw ApiError.EPERM(`Invalid mode: ${mode}`);\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/Emscripten.ts","import {BaseFileSystem, FileSystem, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport * as path from 'path';\nimport {ApiError} from '../core/api_error';\n\n/**\n * Configuration options for a FolderAdapter file system.\n */\nexport interface FolderAdapterOptions {\n // The folder to use as the root directory.\n folder: string;\n // The file system to wrap.\n wrapped: FileSystem;\n}\n\n/**\n * The FolderAdapter file system wraps a file system, and scopes all interactions to a subfolder of that file system.\n *\n * Example: Given a file system `foo` with folder `bar` and file `bar/baz`...\n *\n * ```javascript\n * BrowserFS.configure({\n * fs: \"FolderAdapter\",\n * options: {\n * folder: \"bar\",\n * wrapped: foo\n * }\n * }, function(e) {\n * var fs = BrowserFS.BFSRequire('fs');\n * fs.readdirSync('/'); // ['baz']\n * });\n * ```\n */\nexport default class FolderAdapter extends BaseFileSystem implements FileSystem {\n public static readonly Name = \"FolderAdapter\";\n\n public static readonly Options: FileSystemOptions = {\n folder: {\n type: \"string\",\n description: \"The folder to use as the root directory\"\n },\n wrapped: {\n type: \"object\",\n description: \"The file system to wrap\"\n }\n };\n\n /**\n * Creates a FolderAdapter instance with the given options.\n */\n public static Create(opts: FolderAdapterOptions, cb: BFSCallback): void {\n cb(null, new FolderAdapter(opts.folder, opts.wrapped));\n }\n public static isAvailable(): boolean {\n return true;\n }\n\n public _wrapped: FileSystem;\n public _folder: string;\n /**\n * Wraps a file system, and uses the given folder as its root.\n *\n * @param folder The folder to use as the root directory.\n * @param wrapped The file system to wrap.\n */\n constructor(folder: string, wrapped: FileSystem) {\n super();\n this._folder = folder;\n this._wrapped = wrapped;\n }\n\n /**\n * Initialize the file system. Ensures that the wrapped file system\n * has the given folder.\n */\n public initialize(cb: (e?: ApiError) => void) {\n this._wrapped.exists(this._folder, (exists: boolean) => {\n if (exists) {\n cb();\n } else if (this._wrapped.isReadOnly()) {\n cb(ApiError.ENOENT(this._folder));\n } else {\n this._wrapped.mkdir(this._folder, 0x1ff, cb);\n }\n });\n }\n\n public getName(): string { return this._wrapped.getName(); }\n public isReadOnly(): boolean { return this._wrapped.isReadOnly(); }\n public supportsProps(): boolean { return this._wrapped.supportsProps(); }\n public supportsSynch(): boolean { return this._wrapped.supportsSynch(); }\n public supportsLinks(): boolean { return false; }\n}\n\n/**\n * @hidden\n */\nfunction translateError(folder: string, e: any): any {\n if (e !== null && typeof e === 'object') {\n const err = e;\n let p = err.path;\n if (p) {\n p = '/' + path.relative(folder, p);\n err.message = err.message.replace(err.path!, p);\n err.path = p;\n }\n }\n return e;\n}\n\n/**\n * @hidden\n */\nfunction wrapCallback(folder: string, cb: any): any {\n if (typeof cb === 'function') {\n return function(err: ApiError) {\n if (arguments.length > 0) {\n arguments[0] = translateError(folder, err);\n }\n ( cb).apply(null, arguments);\n };\n } else {\n return cb;\n }\n}\n\n/**\n * @hidden\n */\nfunction wrapFunction(name: string, wrapFirst: boolean, wrapSecond: boolean): Function {\n if (name.slice(name.length - 4) !== 'Sync') {\n // Async function. Translate error in callback.\n return function(this: FolderAdapter) {\n if (arguments.length > 0) {\n if (wrapFirst) {\n arguments[0] = path.join(this._folder, arguments[0]);\n }\n if (wrapSecond) {\n arguments[1] = path.join(this._folder, arguments[1]);\n }\n arguments[arguments.length - 1] = wrapCallback(this._folder, arguments[arguments.length - 1]);\n }\n return ( this._wrapped)[name].apply(this._wrapped, arguments);\n };\n } else {\n // Sync function. Translate error in catch.\n return function(this: FolderAdapter) {\n try {\n if (wrapFirst) {\n arguments[0] = path.join(this._folder, arguments[0]);\n }\n if (wrapSecond) {\n arguments[1] = path.join(this._folder, arguments[1]);\n }\n return ( this._wrapped)[name].apply(this._wrapped, arguments);\n } catch (e) {\n throw translateError(this._folder, e);\n }\n };\n }\n}\n\n// First argument is a path.\n['diskSpace', 'stat', 'statSync', 'open', 'openSync', 'unlink', 'unlinkSync',\n 'rmdir', 'rmdirSync', 'mkdir', 'mkdirSync', 'readdir', 'readdirSync', 'exists',\n 'existsSync', 'realpath', 'realpathSync', 'truncate', 'truncateSync', 'readFile',\n 'readFileSync', 'writeFile', 'writeFileSync', 'appendFile', 'appendFileSync',\n 'chmod', 'chmodSync', 'chown', 'chownSync', 'utimes', 'utimesSync', 'readlink',\n 'readlinkSync'].forEach((name: string) => {\n ( FolderAdapter.prototype)[name] = wrapFunction(name, true, false);\n});\n\n// First and second arguments are paths.\n['rename', 'renameSync', 'link', 'linkSync', 'symlink', 'symlinkSync'].forEach((name: string) => {\n ( FolderAdapter.prototype)[name] = wrapFunction(name, true, true);\n});\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/FolderAdapter.ts","/**\n * Exports the global scope variable.\n * In the main browser thread, this is \"window\".\n * In a WebWorker, this is \"self\".\n * In Node, this is \"global\".\n * @hidden\n * @private\n */\ndeclare var global: any;\n/**\n * @hidden\n */\nlet toExport: any;\nif (typeof(window) !== 'undefined') {\n toExport = window;\n} else if (typeof(self) !== 'undefined') {\n toExport = self;\n} else {\n toExport = global;\n}\nexport default toExport;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/global.ts","import PreloadFile from '../generic/preload_file';\nimport {BaseFileSystem, FileSystem as IFileSystem, BFSOneArgCallback, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport {FileFlag, ActionType} from '../core/file_flag';\nimport {default as Stats, FileType} from '../core/node_fs_stats';\nimport {File as IFile} from '../core/file';\nimport * as path from 'path';\nimport global from '../core/global';\nimport {each as asyncEach} from 'async';\nimport {buffer2ArrayBuffer, arrayBuffer2Buffer, deprecationMessage} from '../core/util';\n\n/**\n * @hidden\n */\nfunction isDirectoryEntry(entry: Entry): entry is DirectoryEntry {\n return entry.isDirectory;\n}\n\n/**\n * @hidden\n */\nconst _getFS: (type: number, size: number, successCallback: FileSystemCallback, errorCallback?: ErrorCallback) => void = global.webkitRequestFileSystem || global.requestFileSystem || null;\n\n/**\n * @hidden\n */\nfunction _requestQuota(type: number, size: number, success: (size: number) => void, errorCallback: ErrorCallback) {\n // We cast navigator and window to '' because everything here is\n // nonstandard functionality, despite the fact that Chrome has the only\n // implementation of the HTML5FS and is likely driving the standardization\n // process. Thus, these objects defined off of navigator and window are not\n // present in the DefinitelyTyped TypeScript typings for FileSystem.\n if (typeof ( navigator)['webkitPersistentStorage'] !== 'undefined') {\n switch (type) {\n case global.PERSISTENT:\n ( navigator).webkitPersistentStorage.requestQuota(size, success, errorCallback);\n break;\n case global.TEMPORARY:\n ( navigator).webkitTemporaryStorage.requestQuota(size, success, errorCallback);\n break;\n default:\n errorCallback(new TypeError(`Invalid storage type: ${type}`));\n break;\n }\n } else {\n ( global).webkitStorageInfo.requestQuota(type, size, success, errorCallback);\n }\n}\n\n/**\n * @hidden\n */\nfunction _toArray(list?: any[]): any[] {\n return Array.prototype.slice.call(list || [], 0);\n}\n\n/**\n * Converts the given DOMError into an appropriate ApiError.\n * @url https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n * @hidden\n */\nfunction convertError(err: DOMError, p: string, expectedDir: boolean): ApiError {\n switch (err.name) {\n /* The user agent failed to create a file or directory due to the existence of a file or\n directory with the same path. */\n case \"PathExistsError\":\n return ApiError.EEXIST(p);\n /* The operation failed because it would cause the application to exceed its storage quota. */\n case 'QuotaExceededError':\n return ApiError.FileError(ErrorCode.ENOSPC, p);\n /* A required file or directory could not be found at the time an operation was processed. */\n case 'NotFoundError':\n return ApiError.ENOENT(p);\n /* This is a security error code to be used in situations not covered by any other error codes.\n - A required file was unsafe for access within a Web application\n - Too many calls are being made on filesystem resources */\n case 'SecurityError':\n return ApiError.FileError(ErrorCode.EACCES, p);\n /* The modification requested was illegal. Examples of invalid modifications include moving a\n directory into its own child, moving a file into its parent directory without changing its name,\n or copying a directory to a path occupied by a file. */\n case 'InvalidModificationError':\n return ApiError.FileError(ErrorCode.EPERM, p);\n /* The user has attempted to look up a file or directory, but the Entry found is of the wrong type\n [e.g. is a DirectoryEntry when the user requested a FileEntry]. */\n case 'TypeMismatchError':\n return ApiError.FileError(expectedDir ? ErrorCode.ENOTDIR : ErrorCode.EISDIR, p);\n /* A path or URL supplied to the API was malformed. */\n case \"EncodingError\":\n /* An operation depended on state cached in an interface object, but that state that has changed\n since it was read from disk. */\n case \"InvalidStateError\":\n /* The user attempted to write to a file or directory which could not be modified due to the state\n of the underlying filesystem. */\n case \"NoModificationAllowedError\":\n default:\n return ApiError.FileError(ErrorCode.EINVAL, p);\n }\n}\n\n// A note about getFile and getDirectory options:\n// These methods are called at numerous places in this file, and are passed\n// some combination of these two options:\n// - create: If true, the entry will be created if it doesn't exist.\n// If false, an error will be thrown if it doesn't exist.\n// - exclusive: If true, only create the entry if it doesn't already exist,\n// and throw an error if it does.\n\nexport class HTML5FSFile extends PreloadFile implements IFile {\n private _entry: FileEntry;\n\n constructor(fs: HTML5FS, entry: FileEntry, path: string, flag: FileFlag, stat: Stats, contents?: Buffer) {\n super(fs, path, flag, stat, contents);\n this._entry = entry;\n }\n\n public sync(cb: BFSOneArgCallback): void {\n if (!this.isDirty()) {\n return cb();\n }\n\n this._entry.createWriter((writer) => {\n const buffer = this.getBuffer();\n const blob = new Blob([buffer2ArrayBuffer(buffer)]);\n const length = blob.size;\n writer.onwriteend = (err?: any) => {\n writer.onwriteend = null;\n writer.onerror = null;\n writer.truncate(length);\n this.resetDirty();\n cb();\n };\n writer.onerror = (err: any) => {\n cb(convertError(err, this.getPath(), false));\n };\n writer.write(blob);\n });\n }\n\n public close(cb: BFSOneArgCallback): void {\n this.sync(cb);\n }\n}\n\nexport interface HTML5FSOptions {\n // storage quota to request, in megabytes. Allocated value may be less.\n size?: number;\n // window.PERSISTENT or window.TEMPORARY. Defaults to PERSISTENT.\n type?: number;\n}\n\n/**\n * A read-write filesystem backed by the HTML5 FileSystem API.\n *\n * As the HTML5 FileSystem is only implemented in Blink, this interface is\n * only available in Chrome.\n */\nexport default class HTML5FS extends BaseFileSystem implements IFileSystem {\n public static readonly Name = \"HTML5FS\";\n\n public static readonly Options: FileSystemOptions = {\n size: {\n type: \"number\",\n optional: true,\n description: \"Storage quota to request, in megabytes. Allocated value may be less. Defaults to 5.\"\n },\n type: {\n type: \"number\",\n optional: true,\n description: \"window.PERSISTENT or window.TEMPORARY. Defaults to PERSISTENT.\"\n }\n };\n\n /**\n * Creates an HTML5FS instance with the given options.\n */\n public static Create(opts: HTML5FSOptions, cb: BFSCallback): void {\n const fs = new HTML5FS(opts.size, opts.type, false);\n fs.allocate((e) => e ? cb(e) : cb(null, fs), false);\n }\n public static isAvailable(): boolean {\n return !!_getFS;\n }\n\n // HTML5File reaches into HTML5FS. :/\n public fs: FileSystem;\n private size: number;\n private type: number;\n /**\n * **Deprecated. Please use HTML5FS.Create() method instead.**\n *\n * Creates a new HTML5 FileSystem-backed BrowserFS file system of the given size\n * and storage type.\n *\n * **IMPORTANT**: You must call `allocate` on the resulting object before the file system\n * can be used.\n *\n * @param size storage quota to request, in megabytes. Allocated value may be less.\n * @param type window.PERSISTENT or window.TEMPORARY. Defaults to PERSISTENT.\n */\n constructor(size: number = 5, type: number = global.PERSISTENT, deprecateMsg = true) {\n super();\n // Convert MB to bytes.\n this.size = 1024 * 1024 * size;\n this.type = type;\n deprecationMessage(deprecateMsg, HTML5FS.Name, {size: size, type: type});\n }\n\n public getName(): string {\n return HTML5FS.Name;\n }\n\n public isReadOnly(): boolean {\n return false;\n }\n\n public supportsSymlinks(): boolean {\n return false;\n }\n\n public supportsProps(): boolean {\n return false;\n }\n\n public supportsSynch(): boolean {\n return false;\n }\n\n /**\n * **Deprecated. Please use Create() method instead to create and allocate an HTML5FS.**\n *\n * Requests a storage quota from the browser to back this FS.\n * Must be called before file system can be used!\n */\n public allocate(cb: BFSOneArgCallback = () => {/*nop*/}, deprecateMsg = true): void {\n if (deprecateMsg) {\n console.warn(`[HTML5FS] HTML5FS.allocate() is deprecated and will be removed in the next major release. Please use 'HTML5FS.Create({type: ${this.type}, size: ${this.size}}, cb)' to create and allocate HTML5FS instances.`);\n }\n const success = (fs: FileSystem): void => {\n this.fs = fs;\n cb();\n };\n const error = (err: DOMException): void => {\n cb(convertError(err, \"/\", true));\n };\n if (this.type === global.PERSISTENT) {\n _requestQuota(this.type, this.size, (granted: number) => {\n _getFS(this.type, granted, success, error);\n }, error);\n } else {\n _getFS(this.type, this.size, success, error);\n }\n }\n\n /**\n * Deletes everything in the FS. Used for testing.\n * Karma clears the storage after you quit it but not between runs of the test\n * suite, and the tests expect an empty FS every time.\n */\n public empty(mainCb: BFSOneArgCallback): void {\n // Get a list of all entries in the root directory to delete them\n this._readdir('/', (err: ApiError, entries?: Entry[]): void => {\n if (err) {\n console.error('Failed to empty FS');\n mainCb(err);\n } else {\n // Called when every entry has been operated on\n const finished = (er: any): void => {\n if (err) {\n console.error(\"Failed to empty FS\");\n mainCb(err);\n } else {\n mainCb();\n }\n };\n // Removes files and recursively removes directories\n const deleteEntry = (entry: Entry, cb: (e?: any) => void): void => {\n const succ = () => {\n cb();\n };\n const error = (err: DOMException) => {\n cb(convertError(err, entry.fullPath, !entry.isDirectory));\n };\n if (isDirectoryEntry(entry)) {\n entry.removeRecursively(succ, error);\n } else {\n entry.remove(succ, error);\n }\n };\n // Loop through the entries and remove them, then call the callback\n // when they're all finished.\n asyncEach(entries!, deleteEntry, finished);\n }\n });\n }\n\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void {\n let semaphore: number = 2;\n let successCount: number = 0;\n const root: DirectoryEntry = this.fs.root;\n let currentPath: string = oldPath;\n const error = (err: DOMException): void => {\n if (--semaphore <= 0) {\n cb(convertError(err, currentPath, false));\n }\n };\n const success = (file: Entry): void => {\n if (++successCount === 2) {\n return cb(new ApiError(ErrorCode.EINVAL, \"Something was identified as both a file and a directory. This should never happen.\"));\n }\n\n // SPECIAL CASE: If newPath === oldPath, and the path exists, then\n // this operation trivially succeeds.\n if (oldPath === newPath) {\n return cb();\n }\n\n // Get the new parent directory.\n currentPath = path.dirname(newPath);\n root.getDirectory(currentPath, {}, (parentDir: DirectoryEntry): void => {\n currentPath = path.basename(newPath);\n file.moveTo(parentDir, currentPath, (entry: Entry): void => { cb(); }, (err: DOMException): void => {\n // SPECIAL CASE: If oldPath is a directory, and newPath is a\n // file, rename should delete the file and perform the move.\n if (file.isDirectory) {\n currentPath = newPath;\n // Unlink only works on files. Try to delete newPath.\n this.unlink(newPath, (e?): void => {\n if (e) {\n // newPath is probably a directory.\n error(err);\n } else {\n // Recur, now that newPath doesn't exist.\n this.rename(oldPath, newPath, cb);\n }\n });\n } else {\n error(err);\n }\n });\n }, error);\n };\n\n // We don't know if oldPath is a *file* or a *directory*, and there's no\n // way to stat items. So launch both requests, see which one succeeds.\n root.getFile(oldPath, {}, success, error);\n root.getDirectory(oldPath, {}, success, error);\n }\n\n public stat(path: string, isLstat: boolean, cb: BFSCallback): void {\n // Throw an error if the entry doesn't exist, because then there's nothing\n // to stat.\n const opts = {\n create: false\n };\n // Called when the path has been successfully loaded as a file.\n const loadAsFile = (entry: FileEntry): void => {\n const fileFromEntry = (file: File): void => {\n const stat = new Stats(FileType.FILE, file.size);\n cb(null, stat);\n };\n entry.file(fileFromEntry, failedToLoad);\n };\n // Called when the path has been successfully loaded as a directory.\n const loadAsDir = (dir: DirectoryEntry): void => {\n // Directory entry size can't be determined from the HTML5 FS API, and is\n // implementation-dependant anyway, so a dummy value is used.\n const size = 4096;\n const stat = new Stats(FileType.DIRECTORY, size);\n cb(null, stat);\n };\n // Called when the path couldn't be opened as a directory or a file.\n const failedToLoad = (err: DOMException): void => {\n cb(convertError(err, path, false /* Unknown / irrelevant */));\n };\n // Called when the path couldn't be opened as a file, but might still be a\n // directory.\n const failedToLoadAsFile = (): void => {\n this.fs.root.getDirectory(path, opts, loadAsDir, failedToLoad);\n };\n // No method currently exists to determine whether a path refers to a\n // directory or a file, so this implementation tries both and uses the first\n // one that succeeds.\n this.fs.root.getFile(path, opts, loadAsFile, failedToLoadAsFile);\n }\n\n public open(p: string, flags: FileFlag, mode: number, cb: BFSCallback): void {\n // XXX: err is a DOMError\n const error = (err: any): void => {\n if (err.name === 'InvalidModificationError' && flags.isExclusive()) {\n cb(ApiError.EEXIST(p));\n } else {\n cb(convertError(err, p, false));\n }\n };\n\n this.fs.root.getFile(p, {\n create: flags.pathNotExistsAction() === ActionType.CREATE_FILE,\n exclusive: flags.isExclusive()\n }, (entry: FileEntry): void => {\n // Try to fetch corresponding file.\n entry.file((file: File): void => {\n const reader = new FileReader();\n reader.onloadend = (event: Event): void => {\n const bfsFile = this._makeFile(p, entry, flags, file, reader.result);\n cb(null, bfsFile);\n };\n reader.onerror = (ev: Event) => {\n error(reader.error);\n };\n reader.readAsArrayBuffer(file);\n }, error);\n }, error);\n }\n\n public unlink(path: string, cb: BFSOneArgCallback): void {\n this._remove(path, cb, true);\n }\n\n public rmdir(path: string, cb: BFSOneArgCallback): void {\n // Check if directory is non-empty, first.\n this.readdir(path, (e, files?) => {\n if (e) {\n cb(e);\n } else if (files!.length > 0) {\n cb(ApiError.ENOTEMPTY(path));\n } else {\n this._remove(path, cb, false);\n }\n });\n }\n\n public mkdir(path: string, mode: number, cb: BFSOneArgCallback): void {\n // Create the directory, but throw an error if it already exists, as per\n // mkdir(1)\n const opts = {\n create: true,\n exclusive: true\n };\n const success = (dir: DirectoryEntry): void => {\n cb();\n };\n const error = (err: DOMException): void => {\n cb(convertError(err, path, true));\n };\n this.fs.root.getDirectory(path, opts, success, error);\n }\n\n /**\n * Map _readdir's list of `FileEntry`s to their names and return that.\n */\n public readdir(path: string, cb: BFSCallback): void {\n this._readdir(path, (e: ApiError, entries?: Entry[]): void => {\n if (entries) {\n const rv: string[] = [];\n for (const entry of entries) {\n rv.push(entry.name);\n }\n cb(null, rv);\n } else {\n return cb(e);\n }\n });\n }\n\n /**\n * Returns a BrowserFS object representing a File.\n */\n private _makeFile(path: string, entry: FileEntry, flag: FileFlag, stat: File, data: ArrayBuffer = new ArrayBuffer(0)): HTML5FSFile {\n const stats = new Stats(FileType.FILE, stat.size);\n const buffer = arrayBuffer2Buffer(data);\n return new HTML5FSFile(this, entry, path, flag, stats, buffer);\n }\n\n /**\n * Returns an array of `FileEntry`s. Used internally by empty and readdir.\n */\n private _readdir(path: string, cb: BFSCallback): void {\n const error = (err: DOMException): void => {\n cb(convertError(err, path, true));\n };\n // Grab the requested directory.\n this.fs.root.getDirectory(path, { create: false }, (dirEntry: DirectoryEntry) => {\n const reader = dirEntry.createReader();\n let entries: Entry[] = [];\n\n // Call the reader.readEntries() until no more results are returned.\n const readEntries = () => {\n reader.readEntries(((results) => {\n if (results.length) {\n entries = entries.concat(_toArray(results));\n readEntries();\n } else {\n cb(null, entries);\n }\n }), error);\n };\n readEntries();\n }, error);\n }\n\n /**\n * Delete a file or directory from the file system\n * isFile should reflect which call was made to remove the it (`unlink` or\n * `rmdir`). If this doesn't match what's actually at `path`, an error will be\n * returned\n */\n private _remove(path: string, cb: BFSOneArgCallback, isFile: boolean): void {\n const success = (entry: Entry): void => {\n const succ = () => {\n cb();\n };\n const err = (err: DOMException) => {\n cb(convertError(err, path, !isFile));\n };\n entry.remove(succ, err);\n };\n const error = (err: DOMException): void => {\n cb(convertError(err, path, !isFile));\n };\n // Deleting the entry, so don't create it\n const opts = {\n create: false\n };\n\n if (isFile) {\n this.fs.root.getFile(path, opts, success, error);\n } else {\n this.fs.root.getDirectory(path, opts, success, error);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/HTML5FS.ts","import {default as Stats, FileType} from '../core/node_fs_stats';\n\n/**\n * Generic inode definition that can easily be serialized.\n */\nexport default class Inode {\n /**\n * Converts the buffer into an Inode.\n */\n public static fromBuffer(buffer: Buffer): Inode {\n if (buffer === undefined) {\n throw new Error(\"NO\");\n }\n return new Inode(buffer.toString('ascii', 30),\n buffer.readUInt32LE(0),\n buffer.readUInt16LE(4),\n buffer.readDoubleLE(6),\n buffer.readDoubleLE(14),\n buffer.readDoubleLE(22)\n );\n }\n\n constructor(public id: string,\n public size: number,\n public mode: number,\n public atime: number,\n public mtime: number,\n public ctime: number) { }\n\n /**\n * Handy function that converts the Inode to a Node Stats object.\n */\n public toStats(): Stats {\n return new Stats(\n (this.mode & 0xF000) === FileType.DIRECTORY ? FileType.DIRECTORY : FileType.FILE,\n this.size, this.mode, new Date(this.atime), new Date(this.mtime), new Date(this.ctime));\n }\n\n /**\n * Get the size of this Inode, in bytes.\n */\n public getSize(): number {\n // ASSUMPTION: ID is ASCII (1 byte per char).\n return 30 + this.id.length;\n }\n\n /**\n * Writes the inode into the start of the buffer.\n */\n public toBuffer(buff: Buffer = Buffer.alloc(this.getSize())): Buffer {\n buff.writeUInt32LE(this.size, 0);\n buff.writeUInt16LE(this.mode, 4);\n buff.writeDoubleLE(this.atime, 6);\n buff.writeDoubleLE(this.mtime, 14);\n buff.writeDoubleLE(this.ctime, 22);\n buff.write(this.id, 30, this.id.length, 'ascii');\n return buff;\n }\n\n /**\n * Updates the Inode using information from the stats object. Used by file\n * systems at sync time, e.g.:\n * - Program opens file and gets a File object.\n * - Program mutates file. File object is responsible for maintaining\n * metadata changes locally -- typically in a Stats object.\n * - Program closes file. File object's metadata changes are synced with the\n * file system.\n * @return True if any changes have occurred.\n */\n public update(stats: Stats): boolean {\n let hasChanged = false;\n if (this.size !== stats.size) {\n this.size = stats.size;\n hasChanged = true;\n }\n\n if (this.mode !== stats.mode) {\n this.mode = stats.mode;\n hasChanged = true;\n }\n\n const atimeMs = stats.atime.getTime();\n if (this.atime !== atimeMs) {\n this.atime = atimeMs;\n hasChanged = true;\n }\n\n const mtimeMs = stats.mtime.getTime();\n if (this.mtime !== mtimeMs) {\n this.mtime = mtimeMs;\n hasChanged = true;\n }\n\n const ctimeMs = stats.ctime.getTime();\n if (this.ctime !== ctimeMs) {\n this.ctime = ctimeMs;\n hasChanged = true;\n }\n\n return hasChanged;\n }\n\n // XXX: Copied from Stats. Should reconcile these two into something more\n // compact.\n\n /**\n * @return [Boolean] True if this item is a file.\n */\n public isFile(): boolean {\n return (this.mode & 0xF000) === FileType.FILE;\n }\n\n /**\n * @return [Boolean] True if this item is a directory.\n */\n public isDirectory(): boolean {\n return (this.mode & 0xF000) === FileType.DIRECTORY;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/inode.ts","import {BaseFileSystem, SynchronousFileSystem, BFSOneArgCallback, BFSCallback, BFSThreeArgCallback} from '../core/file_system';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport {default as Stats, FileType} from '../core/node_fs_stats';\nimport {File} from '../core/file';\nimport {FileFlag} from '../core/file_flag';\nimport * as path from 'path';\nimport Inode from '../generic/inode';\nimport PreloadFile from '../generic/preload_file';\nimport {emptyBuffer} from '../core/util';\n/**\n * @hidden\n */\nconst ROOT_NODE_ID: string = \"/\";\n/**\n * @hidden\n */\nlet emptyDirNode: Buffer | null = null;\n/**\n * Returns an empty directory node.\n * @hidden\n */\nfunction getEmptyDirNode(): Buffer {\n if (emptyDirNode) {\n return emptyDirNode;\n }\n return emptyDirNode = Buffer.from(\"{}\");\n}\n\n/**\n * Generates a random ID.\n * @hidden\n */\nfunction GenerateRandomID(): string {\n // From http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n const r = Math.random() * 16 | 0;\n const v = c === 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\n\n/**\n * Helper function. Checks if 'e' is defined. If so, it triggers the callback\n * with 'e' and returns false. Otherwise, returns true.\n * @hidden\n */\nfunction noError(e: ApiError | undefined | null, cb: (e: ApiError) => void): boolean {\n if (e) {\n cb(e);\n return false;\n }\n return true;\n}\n\n/**\n * Helper function. Checks if 'e' is defined. If so, it aborts the transaction,\n * triggers the callback with 'e', and returns false. Otherwise, returns true.\n * @hidden\n */\nfunction noErrorTx(e: ApiError | undefined | null, tx: AsyncKeyValueRWTransaction, cb: (e: ApiError) => void): boolean {\n if (e) {\n tx.abort(() => {\n cb(e);\n });\n return false;\n }\n return true;\n}\n\n/**\n * Represents a *synchronous* key-value store.\n */\nexport interface SyncKeyValueStore {\n /**\n * The name of the key-value store.\n */\n name(): string;\n /**\n * Empties the key-value store completely.\n */\n clear(): void;\n /**\n * Begins a new read-only transaction.\n */\n beginTransaction(type: \"readonly\"): SyncKeyValueROTransaction;\n /**\n * Begins a new read-write transaction.\n */\n beginTransaction(type: \"readwrite\"): SyncKeyValueRWTransaction;\n beginTransaction(type: string): SyncKeyValueROTransaction;\n}\n\n/**\n * A read-only transaction for a synchronous key value store.\n */\nexport interface SyncKeyValueROTransaction {\n /**\n * Retrieves the data at the given key. Throws an ApiError if an error occurs\n * or if the key does not exist.\n * @param key The key to look under for data.\n * @return The data stored under the key, or undefined if not present.\n */\n get(key: string): Buffer | undefined;\n}\n\n/**\n * A read-write transaction for a synchronous key value store.\n */\nexport interface SyncKeyValueRWTransaction extends SyncKeyValueROTransaction {\n /**\n * Adds the data to the store under the given key.\n * @param key The key to add the data under.\n * @param data The data to add to the store.\n * @param overwrite If 'true', overwrite any existing data. If 'false',\n * avoids storing the data if the key exists.\n * @return True if storage succeeded, false otherwise.\n */\n put(key: string, data: Buffer, overwrite: boolean): boolean;\n /**\n * Deletes the data at the given key.\n * @param key The key to delete from the store.\n */\n del(key: string): void;\n /**\n * Commits the transaction.\n */\n commit(): void;\n /**\n * Aborts and rolls back the transaction.\n */\n abort(): void;\n}\n\n/**\n * An interface for simple synchronous key-value stores that don't have special\n * support for transactions and such.\n */\nexport interface SimpleSyncStore {\n get(key: string): Buffer | undefined;\n put(key: string, data: Buffer, overwrite: boolean): boolean;\n del(key: string): void;\n}\n\n/**\n * A simple RW transaction for simple synchronous key-value stores.\n */\nexport class SimpleSyncRWTransaction implements SyncKeyValueRWTransaction {\n /**\n * Stores data in the keys we modify prior to modifying them.\n * Allows us to roll back commits.\n */\n private originalData: { [key: string]: Buffer | undefined } = {};\n /**\n * List of keys modified in this transaction, if any.\n */\n private modifiedKeys: string[] = [];\n\n constructor(private store: SimpleSyncStore) { }\n\n public get(key: string): Buffer | undefined {\n const val = this.store.get(key);\n this.stashOldValue(key, val);\n return val;\n }\n\n public put(key: string, data: Buffer, overwrite: boolean): boolean {\n this.markModified(key);\n return this.store.put(key, data, overwrite);\n }\n\n public del(key: string): void {\n this.markModified(key);\n this.store.del(key);\n }\n\n public commit(): void {/* NOP */}\n\n public abort(): void {\n // Rollback old values.\n for (const key of this.modifiedKeys) {\n const value = this.originalData[key];\n if (!value) {\n // Key didn't exist.\n this.store.del(key);\n } else {\n // Key existed. Store old value.\n this.store.put(key, value, true);\n }\n }\n }\n\n /**\n * Stashes given key value pair into `originalData` if it doesn't already\n * exist. Allows us to stash values the program is requesting anyway to\n * prevent needless `get` requests if the program modifies the data later\n * on during the transaction.\n */\n private stashOldValue(key: string, value: Buffer | undefined) {\n // Keep only the earliest value in the transaction.\n if (!this.originalData.hasOwnProperty(key)) {\n this.originalData[key] = value;\n }\n }\n\n /**\n * Marks the given key as modified, and stashes its value if it has not been\n * stashed already.\n */\n private markModified(key: string) {\n if (this.modifiedKeys.indexOf(key) === -1) {\n this.modifiedKeys.push(key);\n if (!this.originalData.hasOwnProperty(key)) {\n this.originalData[key] = this.store.get(key);\n }\n }\n }\n}\n\nexport interface SyncKeyValueFileSystemOptions {\n /**\n * The actual key-value store to read from/write to.\n */\n store: SyncKeyValueStore;\n /**\n * Should the file system support properties (mtime/atime/ctime/chmod/etc)?\n * Enabling this slightly increases the storage space per file, and adds\n * atime updates every time a file is accessed, mtime updates every time\n * a file is modified, and permission checks on every operation.\n *\n * Defaults to *false*.\n */\n // supportProps?: boolean;\n /**\n * Should the file system support links?\n */\n // supportLinks?: boolean;\n}\n\nexport class SyncKeyValueFile extends PreloadFile implements File {\n constructor(_fs: SyncKeyValueFileSystem, _path: string, _flag: FileFlag, _stat: Stats, contents?: Buffer) {\n super(_fs, _path, _flag, _stat, contents);\n }\n\n public syncSync(): void {\n if (this.isDirty()) {\n this._fs._syncSync(this.getPath(), this.getBuffer(), this.getStats());\n this.resetDirty();\n }\n }\n\n public closeSync(): void {\n this.syncSync();\n }\n}\n\n/**\n * A \"Synchronous key-value file system\". Stores data to/retrieves data from an\n * underlying key-value store.\n *\n * We use a unique ID for each node in the file system. The root node has a\n * fixed ID.\n * @todo Introduce Node ID caching.\n * @todo Check modes.\n */\nexport class SyncKeyValueFileSystem extends SynchronousFileSystem {\n public static isAvailable(): boolean { return true; }\n\n private store: SyncKeyValueStore;\n\n constructor(options: SyncKeyValueFileSystemOptions) {\n super();\n this.store = options.store;\n // INVARIANT: Ensure that the root exists.\n this.makeRootDirectory();\n }\n\n public getName(): string { return this.store.name(); }\n public isReadOnly(): boolean { return false; }\n public supportsSymlinks(): boolean { return false; }\n public supportsProps(): boolean { return false; }\n public supportsSynch(): boolean { return true; }\n\n /**\n * Delete all contents stored in the file system.\n */\n public empty(): void {\n this.store.clear();\n // INVARIANT: Root always exists.\n this.makeRootDirectory();\n }\n\n public renameSync(oldPath: string, newPath: string): void {\n const tx = this.store.beginTransaction('readwrite'),\n oldParent = path.dirname(oldPath), oldName = path.basename(oldPath),\n newParent = path.dirname(newPath), newName = path.basename(newPath),\n // Remove oldPath from parent's directory listing.\n oldDirNode = this.findINode(tx, oldParent),\n oldDirList = this.getDirListing(tx, oldParent, oldDirNode);\n\n if (!oldDirList[oldName]) {\n throw ApiError.ENOENT(oldPath);\n }\n const nodeId: string = oldDirList[oldName];\n delete oldDirList[oldName];\n\n // Invariant: Can't move a folder inside itself.\n // This funny little hack ensures that the check passes only if oldPath\n // is a subpath of newParent. We append '/' to avoid matching folders that\n // are a substring of the bottom-most folder in the path.\n if ((newParent + '/').indexOf(oldPath + '/') === 0) {\n throw new ApiError(ErrorCode.EBUSY, oldParent);\n }\n\n // Add newPath to parent's directory listing.\n let newDirNode: Inode, newDirList: typeof oldDirList;\n if (newParent === oldParent) {\n // Prevent us from re-grabbing the same directory listing, which still\n // contains oldName.\n newDirNode = oldDirNode;\n newDirList = oldDirList;\n } else {\n newDirNode = this.findINode(tx, newParent);\n newDirList = this.getDirListing(tx, newParent, newDirNode);\n }\n\n if (newDirList[newName]) {\n // If it's a file, delete it.\n const newNameNode = this.getINode(tx, newPath, newDirList[newName]);\n if (newNameNode.isFile()) {\n try {\n tx.del(newNameNode.id);\n tx.del(newDirList[newName]);\n } catch (e) {\n tx.abort();\n throw e;\n }\n } else {\n // If it's a directory, throw a permissions error.\n throw ApiError.EPERM(newPath);\n }\n }\n newDirList[newName] = nodeId;\n\n // Commit the two changed directory listings.\n try {\n tx.put(oldDirNode.id, Buffer.from(JSON.stringify(oldDirList)), true);\n tx.put(newDirNode.id, Buffer.from(JSON.stringify(newDirList)), true);\n } catch (e) {\n tx.abort();\n throw e;\n }\n\n tx.commit();\n }\n\n public statSync(p: string, isLstat: boolean): Stats {\n // Get the inode to the item, convert it into a Stats object.\n return this.findINode(this.store.beginTransaction('readonly'), p).toStats();\n }\n\n public createFileSync(p: string, flag: FileFlag, mode: number): File {\n const tx = this.store.beginTransaction('readwrite'),\n data = emptyBuffer(),\n newFile = this.commitNewFile(tx, p, FileType.FILE, mode, data);\n // Open the file.\n return new SyncKeyValueFile(this, p, flag, newFile.toStats(), data);\n }\n\n public openFileSync(p: string, flag: FileFlag): File {\n const tx = this.store.beginTransaction('readonly'),\n node = this.findINode(tx, p),\n data = tx.get(node.id);\n if (data === undefined) {\n throw ApiError.ENOENT(p);\n }\n return new SyncKeyValueFile(this, p, flag, node.toStats(), data);\n }\n\n public unlinkSync(p: string): void {\n this.removeEntry(p, false);\n }\n\n public rmdirSync(p: string): void {\n // Check first if directory is empty.\n if (this.readdirSync(p).length > 0) {\n throw ApiError.ENOTEMPTY(p);\n } else {\n this.removeEntry(p, true);\n }\n }\n\n public mkdirSync(p: string, mode: number): void {\n const tx = this.store.beginTransaction('readwrite'),\n data = Buffer.from('{}');\n this.commitNewFile(tx, p, FileType.DIRECTORY, mode, data);\n }\n\n public readdirSync(p: string): string[] {\n const tx = this.store.beginTransaction('readonly');\n return Object.keys(this.getDirListing(tx, p, this.findINode(tx, p)));\n }\n\n public _syncSync(p: string, data: Buffer, stats: Stats): void {\n // @todo Ensure mtime updates properly, and use that to determine if a data\n // update is required.\n const tx = this.store.beginTransaction('readwrite'),\n // We use the _findInode helper because we actually need the INode id.\n fileInodeId = this._findINode(tx, path.dirname(p), path.basename(p)),\n fileInode = this.getINode(tx, p, fileInodeId),\n inodeChanged = fileInode.update(stats);\n\n try {\n // Sync data.\n tx.put(fileInode.id, data, true);\n // Sync metadata.\n if (inodeChanged) {\n tx.put(fileInodeId, fileInode.toBuffer(), true);\n }\n } catch (e) {\n tx.abort();\n throw e;\n }\n tx.commit();\n }\n\n /**\n * Checks if the root directory exists. Creates it if it doesn't.\n */\n private makeRootDirectory() {\n const tx = this.store.beginTransaction('readwrite');\n if (tx.get(ROOT_NODE_ID) === undefined) {\n // Create new inode.\n const currTime = (new Date()).getTime(),\n // Mode 0666\n dirInode = new Inode(GenerateRandomID(), 4096, 511 | FileType.DIRECTORY, currTime, currTime, currTime);\n // If the root doesn't exist, the first random ID shouldn't exist,\n // either.\n tx.put(dirInode.id, getEmptyDirNode(), false);\n tx.put(ROOT_NODE_ID, dirInode.toBuffer(), false);\n tx.commit();\n }\n }\n\n /**\n * Helper function for findINode.\n * @param parent The parent directory of the file we are attempting to find.\n * @param filename The filename of the inode we are attempting to find, minus\n * the parent.\n * @return string The ID of the file's inode in the file system.\n */\n private _findINode(tx: SyncKeyValueROTransaction, parent: string, filename: string): string {\n const readDirectory = (inode: Inode): string => {\n // Get the root's directory listing.\n const dirList = this.getDirListing(tx, parent, inode);\n // Get the file's ID.\n if (dirList[filename]) {\n return dirList[filename];\n } else {\n throw ApiError.ENOENT(path.resolve(parent, filename));\n }\n };\n if (parent === '/') {\n if (filename === '') {\n // BASE CASE #1: Return the root's ID.\n return ROOT_NODE_ID;\n } else {\n // BASE CASE #2: Find the item in the root ndoe.\n return readDirectory(this.getINode(tx, parent, ROOT_NODE_ID));\n }\n } else {\n return readDirectory(this.getINode(tx, parent + path.sep + filename,\n this._findINode(tx, path.dirname(parent), path.basename(parent))));\n }\n }\n\n /**\n * Finds the Inode of the given path.\n * @param p The path to look up.\n * @return The Inode of the path p.\n * @todo memoize/cache\n */\n private findINode(tx: SyncKeyValueROTransaction, p: string): Inode {\n return this.getINode(tx, p, this._findINode(tx, path.dirname(p), path.basename(p)));\n }\n\n /**\n * Given the ID of a node, retrieves the corresponding Inode.\n * @param tx The transaction to use.\n * @param p The corresponding path to the file (used for error messages).\n * @param id The ID to look up.\n */\n private getINode(tx: SyncKeyValueROTransaction, p: string, id: string): Inode {\n const inode = tx.get(id);\n if (inode === undefined) {\n throw ApiError.ENOENT(p);\n }\n return Inode.fromBuffer(inode);\n }\n\n /**\n * Given the Inode of a directory, retrieves the corresponding directory\n * listing.\n */\n private getDirListing(tx: SyncKeyValueROTransaction, p: string, inode: Inode): { [fileName: string]: string } {\n if (!inode.isDirectory()) {\n throw ApiError.ENOTDIR(p);\n }\n const data = tx.get(inode.id);\n if (data === undefined) {\n throw ApiError.ENOENT(p);\n }\n return JSON.parse(data.toString());\n }\n\n /**\n * Creates a new node under a random ID. Retries 5 times before giving up in\n * the exceedingly unlikely chance that we try to reuse a random GUID.\n * @return The GUID that the data was stored under.\n */\n private addNewNode(tx: SyncKeyValueRWTransaction, data: Buffer): string {\n const retries = 0;\n let currId: string;\n while (retries < 5) {\n try {\n currId = GenerateRandomID();\n tx.put(currId, data, false);\n return currId;\n } catch (e) {\n // Ignore and reroll.\n }\n }\n throw new ApiError(ErrorCode.EIO, 'Unable to commit data to key-value store.');\n }\n\n /**\n * Commits a new file (well, a FILE or a DIRECTORY) to the file system with\n * the given mode.\n * Note: This will commit the transaction.\n * @param p The path to the new file.\n * @param type The type of the new file.\n * @param mode The mode to create the new file with.\n * @param data The data to store at the file's data node.\n * @return The Inode for the new file.\n */\n private commitNewFile(tx: SyncKeyValueRWTransaction, p: string, type: FileType, mode: number, data: Buffer): Inode {\n const parentDir = path.dirname(p),\n fname = path.basename(p),\n parentNode = this.findINode(tx, parentDir),\n dirListing = this.getDirListing(tx, parentDir, parentNode),\n currTime = (new Date()).getTime();\n\n // Invariant: The root always exists.\n // If we don't check this prior to taking steps below, we will create a\n // file with name '' in root should p == '/'.\n if (p === '/') {\n throw ApiError.EEXIST(p);\n }\n\n // Check if file already exists.\n if (dirListing[fname]) {\n throw ApiError.EEXIST(p);\n }\n\n let fileNode: Inode;\n try {\n // Commit data.\n const dataId = this.addNewNode(tx, data);\n fileNode = new Inode(dataId, data.length, mode | type, currTime, currTime, currTime);\n // Commit file node.\n const fileNodeId = this.addNewNode(tx, fileNode.toBuffer());\n // Update and commit parent directory listing.\n dirListing[fname] = fileNodeId;\n tx.put(parentNode.id, Buffer.from(JSON.stringify(dirListing)), true);\n } catch (e) {\n tx.abort();\n throw e;\n }\n tx.commit();\n return fileNode;\n }\n\n /**\n * Remove all traces of the given path from the file system.\n * @param p The path to remove from the file system.\n * @param isDir Does the path belong to a directory, or a file?\n * @todo Update mtime.\n */\n private removeEntry(p: string, isDir: boolean): void {\n const tx = this.store.beginTransaction('readwrite'),\n parent: string = path.dirname(p),\n parentNode = this.findINode(tx, parent),\n parentListing = this.getDirListing(tx, parent, parentNode),\n fileName: string = path.basename(p);\n\n if (!parentListing[fileName]) {\n throw ApiError.ENOENT(p);\n }\n\n // Remove from directory listing of parent.\n const fileNodeId = parentListing[fileName];\n delete parentListing[fileName];\n\n // Get file inode.\n const fileNode = this.getINode(tx, p, fileNodeId);\n if (!isDir && fileNode.isDirectory()) {\n throw ApiError.EISDIR(p);\n } else if (isDir && !fileNode.isDirectory()) {\n throw ApiError.ENOTDIR(p);\n }\n\n try {\n // Delete data.\n tx.del(fileNode.id);\n // Delete node.\n tx.del(fileNodeId);\n // Update directory listing.\n tx.put(parentNode.id, Buffer.from(JSON.stringify(parentListing)), true);\n } catch (e) {\n tx.abort();\n throw e;\n }\n // Success.\n tx.commit();\n }\n}\n\n/**\n * Represents an *asynchronous* key-value store.\n */\nexport interface AsyncKeyValueStore {\n /**\n * The name of the key-value store.\n */\n name(): string;\n /**\n * Empties the key-value store completely.\n */\n clear(cb: BFSOneArgCallback): void;\n /**\n * Begins a read-write transaction.\n */\n beginTransaction(type: 'readwrite'): AsyncKeyValueRWTransaction;\n /**\n * Begins a read-only transaction.\n */\n beginTransaction(type: 'readonly'): AsyncKeyValueROTransaction;\n beginTransaction(type: string): AsyncKeyValueROTransaction;\n}\n\n/**\n * Represents an asynchronous read-only transaction.\n */\nexport interface AsyncKeyValueROTransaction {\n /**\n * Retrieves the data at the given key.\n * @param key The key to look under for data.\n */\n get(key: string, cb: BFSCallback): void;\n}\n\n/**\n * Represents an asynchronous read-write transaction.\n */\nexport interface AsyncKeyValueRWTransaction extends AsyncKeyValueROTransaction {\n /**\n * Adds the data to the store under the given key. Overwrites any existing\n * data.\n * @param key The key to add the data under.\n * @param data The data to add to the store.\n * @param overwrite If 'true', overwrite any existing data. If 'false',\n * avoids writing the data if the key exists.\n * @param cb Triggered with an error and whether or not the value was\n * committed.\n */\n put(key: string, data: Buffer, overwrite: boolean, cb: (e: ApiError,\n committed?: boolean) => void): void;\n /**\n * Deletes the data at the given key.\n * @param key The key to delete from the store.\n */\n del(key: string, cb: BFSOneArgCallback): void;\n /**\n * Commits the transaction.\n */\n commit(cb: BFSOneArgCallback): void;\n /**\n * Aborts and rolls back the transaction.\n */\n abort(cb: BFSOneArgCallback): void;\n}\n\nexport class AsyncKeyValueFile extends PreloadFile implements File {\n constructor(_fs: AsyncKeyValueFileSystem, _path: string, _flag: FileFlag, _stat: Stats, contents?: Buffer) {\n super(_fs, _path, _flag, _stat, contents);\n }\n\n public sync(cb: BFSOneArgCallback): void {\n if (this.isDirty()) {\n this._fs._sync(this.getPath(), this.getBuffer(), this.getStats(), (e?: ApiError) => {\n if (!e) {\n this.resetDirty();\n }\n cb(e);\n });\n } else {\n cb();\n }\n }\n\n public close(cb: BFSOneArgCallback): void {\n this.sync(cb);\n }\n}\n\n/**\n * An \"Asynchronous key-value file system\". Stores data to/retrieves data from\n * an underlying asynchronous key-value store.\n */\nexport class AsyncKeyValueFileSystem extends BaseFileSystem {\n public static isAvailable(): boolean { return true; }\n\n protected store: AsyncKeyValueStore;\n\n /**\n * Initializes the file system. Typically called by subclasses' async\n * constructors.\n */\n public init(store: AsyncKeyValueStore, cb: BFSOneArgCallback) {\n this.store = store;\n // INVARIANT: Ensure that the root exists.\n this.makeRootDirectory(cb);\n }\n public getName(): string { return this.store.name(); }\n public isReadOnly(): boolean { return false; }\n public supportsSymlinks(): boolean { return false; }\n public supportsProps(): boolean { return false; }\n public supportsSynch(): boolean { return false; }\n\n /**\n * Delete all contents stored in the file system.\n */\n public empty(cb: BFSOneArgCallback): void {\n this.store.clear((e?) => {\n if (noError(e, cb)) {\n // INVARIANT: Root always exists.\n this.makeRootDirectory(cb);\n }\n });\n }\n\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void {\n const tx = this.store.beginTransaction('readwrite');\n const oldParent = path.dirname(oldPath), oldName = path.basename(oldPath);\n const newParent = path.dirname(newPath), newName = path.basename(newPath);\n const inodes: { [path: string]: Inode } = {};\n const lists: {\n [path: string]: { [file: string]: string }\n } = {};\n let errorOccurred: boolean = false;\n\n // Invariant: Can't move a folder inside itself.\n // This funny little hack ensures that the check passes only if oldPath\n // is a subpath of newParent. We append '/' to avoid matching folders that\n // are a substring of the bottom-most folder in the path.\n if ((newParent + '/').indexOf(oldPath + '/') === 0) {\n return cb(new ApiError(ErrorCode.EBUSY, oldParent));\n }\n\n /**\n * Responsible for Phase 2 of the rename operation: Modifying and\n * committing the directory listings. Called once we have successfully\n * retrieved both the old and new parent's inodes and listings.\n */\n const theOleSwitcharoo = (): void => {\n // Sanity check: Ensure both paths are present, and no error has occurred.\n if (errorOccurred || !lists.hasOwnProperty(oldParent) || !lists.hasOwnProperty(newParent)) {\n return;\n }\n const oldParentList = lists[oldParent], oldParentINode = inodes[oldParent],\n newParentList = lists[newParent], newParentINode = inodes[newParent];\n\n // Delete file from old parent.\n if (!oldParentList[oldName]) {\n cb(ApiError.ENOENT(oldPath));\n } else {\n const fileId = oldParentList[oldName];\n delete oldParentList[oldName];\n\n // Finishes off the renaming process by adding the file to the new\n // parent.\n const completeRename = () => {\n newParentList[newName] = fileId;\n // Commit old parent's list.\n tx.put(oldParentINode.id, Buffer.from(JSON.stringify(oldParentList)), true, (e: ApiError) => {\n if (noErrorTx(e, tx, cb)) {\n if (oldParent === newParent) {\n // DONE!\n tx.commit(cb);\n } else {\n // Commit new parent's list.\n tx.put(newParentINode.id, Buffer.from(JSON.stringify(newParentList)), true, (e: ApiError) => {\n if (noErrorTx(e, tx, cb)) {\n tx.commit(cb);\n }\n });\n }\n }\n });\n };\n\n if (newParentList[newName]) {\n // 'newPath' already exists. Check if it's a file or a directory, and\n // act accordingly.\n this.getINode(tx, newPath, newParentList[newName], (e: ApiError, inode?: Inode) => {\n if (noErrorTx(e, tx, cb)) {\n if (inode!.isFile()) {\n // Delete the file and continue.\n tx.del(inode!.id, (e?: ApiError) => {\n if (noErrorTx(e, tx, cb)) {\n tx.del(newParentList[newName], (e?: ApiError) => {\n if (noErrorTx(e, tx, cb)) {\n completeRename();\n }\n });\n }\n });\n } else {\n // Can't overwrite a directory using rename.\n tx.abort((e?) => {\n cb(ApiError.EPERM(newPath));\n });\n }\n }\n });\n } else {\n completeRename();\n }\n }\n };\n\n /**\n * Grabs a path's inode and directory listing, and shoves it into the\n * inodes and lists hashes.\n */\n const processInodeAndListings = (p: string): void => {\n this.findINodeAndDirListing(tx, p, (e?: ApiError | null, node?: Inode, dirList?: {[name: string]: string}): void => {\n if (e) {\n if (!errorOccurred) {\n errorOccurred = true;\n tx.abort(() => {\n cb(e);\n });\n }\n // If error has occurred already, just stop here.\n } else {\n inodes[p] = node!;\n lists[p] = dirList!;\n theOleSwitcharoo();\n }\n });\n };\n\n processInodeAndListings(oldParent);\n if (oldParent !== newParent) {\n processInodeAndListings(newParent);\n }\n }\n\n public stat(p: string, isLstat: boolean, cb: BFSCallback): void {\n const tx = this.store.beginTransaction('readonly');\n this.findINode(tx, p, (e: ApiError, inode?: Inode): void => {\n if (noError(e, cb)) {\n cb(null, inode!.toStats());\n }\n });\n }\n\n public createFile(p: string, flag: FileFlag, mode: number, cb: BFSCallback): void {\n const tx = this.store.beginTransaction('readwrite'),\n data = emptyBuffer();\n\n this.commitNewFile(tx, p, FileType.FILE, mode, data, (e: ApiError, newFile?: Inode): void => {\n if (noError(e, cb)) {\n cb(null, new AsyncKeyValueFile(this, p, flag, newFile!.toStats(), data));\n }\n });\n }\n\n public openFile(p: string, flag: FileFlag, cb: BFSCallback): void {\n const tx = this.store.beginTransaction('readonly');\n // Step 1: Grab the file's inode.\n this.findINode(tx, p, (e: ApiError, inode?: Inode) => {\n if (noError(e, cb)) {\n // Step 2: Grab the file's data.\n tx.get(inode!.id, (e: ApiError, data?: Buffer): void => {\n if (noError(e, cb)) {\n if (data === undefined) {\n cb(ApiError.ENOENT(p));\n } else {\n cb(null, new AsyncKeyValueFile(this, p, flag, inode!.toStats(), data));\n }\n }\n });\n }\n });\n }\n\n public unlink(p: string, cb: BFSOneArgCallback): void {\n this.removeEntry(p, false, cb);\n }\n\n public rmdir(p: string, cb: BFSOneArgCallback): void {\n // Check first if directory is empty.\n this.readdir(p, (err, files?) => {\n if (err) {\n cb(err);\n } else if (files!.length > 0) {\n cb(ApiError.ENOTEMPTY(p));\n } else {\n this.removeEntry(p, true, cb);\n }\n });\n }\n\n public mkdir(p: string, mode: number, cb: BFSOneArgCallback): void {\n const tx = this.store.beginTransaction('readwrite'),\n data = Buffer.from('{}');\n this.commitNewFile(tx, p, FileType.DIRECTORY, mode, data, cb);\n }\n\n public readdir(p: string, cb: BFSCallback): void {\n const tx = this.store.beginTransaction('readonly');\n this.findINode(tx, p, (e: ApiError, inode?: Inode) => {\n if (noError(e, cb)) {\n this.getDirListing(tx, p, inode!, (e: ApiError, dirListing?: {[name: string]: string}) => {\n if (noError(e, cb)) {\n cb(null, Object.keys(dirListing));\n }\n });\n }\n });\n }\n\n public _sync(p: string, data: Buffer, stats: Stats, cb: BFSOneArgCallback): void {\n // @todo Ensure mtime updates properly, and use that to determine if a data\n // update is required.\n const tx = this.store.beginTransaction('readwrite');\n // Step 1: Get the file node's ID.\n this._findINode(tx, path.dirname(p), path.basename(p), (e: ApiError, fileInodeId?: string): void => {\n if (noErrorTx(e, tx, cb)) {\n // Step 2: Get the file inode.\n this.getINode(tx, p, fileInodeId!, (e: ApiError, fileInode?: Inode): void => {\n if (noErrorTx(e, tx, cb)) {\n const inodeChanged: boolean = fileInode!.update(stats);\n // Step 3: Sync the data.\n tx.put(fileInode!.id, data, true, (e: ApiError): void => {\n if (noErrorTx(e, tx, cb)) {\n // Step 4: Sync the metadata (if it changed)!\n if (inodeChanged) {\n tx.put(fileInodeId!, fileInode!.toBuffer(), true, (e: ApiError): void => {\n if (noErrorTx(e, tx, cb)) {\n tx.commit(cb);\n }\n });\n } else {\n // No need to sync metadata; return.\n tx.commit(cb);\n }\n }\n });\n }\n });\n }\n });\n }\n\n /**\n * Checks if the root directory exists. Creates it if it doesn't.\n */\n private makeRootDirectory(cb: BFSOneArgCallback) {\n const tx = this.store.beginTransaction('readwrite');\n tx.get(ROOT_NODE_ID, (e: ApiError, data?: Buffer) => {\n if (e || data === undefined) {\n // Create new inode.\n const currTime = (new Date()).getTime(),\n // Mode 0666\n dirInode = new Inode(GenerateRandomID(), 4096, 511 | FileType.DIRECTORY, currTime, currTime, currTime);\n // If the root doesn't exist, the first random ID shouldn't exist,\n // either.\n tx.put(dirInode.id, getEmptyDirNode(), false, (e?: ApiError) => {\n if (noErrorTx(e, tx, cb)) {\n tx.put(ROOT_NODE_ID, dirInode.toBuffer(), false, (e?: ApiError) => {\n if (e) {\n tx.abort(() => { cb(e); });\n } else {\n tx.commit(cb);\n }\n });\n }\n });\n } else {\n // We're good.\n tx.commit(cb);\n }\n });\n }\n\n /**\n * Helper function for findINode.\n * @param parent The parent directory of the file we are attempting to find.\n * @param filename The filename of the inode we are attempting to find, minus\n * the parent.\n * @param cb Passed an error or the ID of the file's inode in the file system.\n */\n private _findINode(tx: AsyncKeyValueROTransaction, parent: string, filename: string, cb: BFSCallback): void {\n const handleDirectoryListings = (e?: ApiError | null, inode?: Inode, dirList?: {[name: string]: string}): void => {\n if (e) {\n cb(e);\n } else if (dirList![filename]) {\n cb(null, dirList![filename]);\n } else {\n cb(ApiError.ENOENT(path.resolve(parent, filename)));\n }\n };\n\n if (parent === '/') {\n if (filename === '') {\n // BASE CASE #1: Return the root's ID.\n cb(null, ROOT_NODE_ID);\n } else {\n // BASE CASE #2: Find the item in the root node.\n this.getINode(tx, parent, ROOT_NODE_ID, (e: ApiError, inode?: Inode): void => {\n if (noError(e, cb)) {\n this.getDirListing(tx, parent, inode!, (e: ApiError, dirList?: {[name: string]: string}): void => {\n // handle_directory_listings will handle e for us.\n handleDirectoryListings(e, inode, dirList);\n });\n }\n });\n }\n } else {\n // Get the parent directory's INode, and find the file in its directory\n // listing.\n this.findINodeAndDirListing(tx, parent, handleDirectoryListings);\n }\n }\n\n /**\n * Finds the Inode of the given path.\n * @param p The path to look up.\n * @param cb Passed an error or the Inode of the path p.\n * @todo memoize/cache\n */\n private findINode(tx: AsyncKeyValueROTransaction, p: string, cb: BFSCallback): void {\n this._findINode(tx, path.dirname(p), path.basename(p), (e: ApiError, id?: string): void => {\n if (noError(e, cb)) {\n this.getINode(tx, p, id!, cb);\n }\n });\n }\n\n /**\n * Given the ID of a node, retrieves the corresponding Inode.\n * @param tx The transaction to use.\n * @param p The corresponding path to the file (used for error messages).\n * @param id The ID to look up.\n * @param cb Passed an error or the inode under the given id.\n */\n private getINode(tx: AsyncKeyValueROTransaction, p: string, id: string, cb: BFSCallback): void {\n tx.get(id, (e: ApiError, data?: Buffer): void => {\n if (noError(e, cb)) {\n if (data === undefined) {\n cb(ApiError.ENOENT(p));\n } else {\n cb(null, Inode.fromBuffer(data));\n }\n }\n });\n }\n\n /**\n * Given the Inode of a directory, retrieves the corresponding directory\n * listing.\n */\n private getDirListing(tx: AsyncKeyValueROTransaction, p: string, inode: Inode, cb: BFSCallback<{ [fileName: string]: string }>): void {\n if (!inode.isDirectory()) {\n cb(ApiError.ENOTDIR(p));\n } else {\n tx.get(inode.id, (e: ApiError, data?: Buffer): void => {\n if (noError(e, cb)) {\n try {\n cb(null, JSON.parse(data!.toString()));\n } catch (e) {\n // Occurs when data is undefined, or corresponds to something other\n // than a directory listing. The latter should never occur unless\n // the file system is corrupted.\n cb(ApiError.ENOENT(p));\n }\n }\n });\n }\n }\n\n /**\n * Given a path to a directory, retrieves the corresponding INode and\n * directory listing.\n */\n private findINodeAndDirListing(tx: AsyncKeyValueROTransaction, p: string, cb: BFSThreeArgCallback): void {\n this.findINode(tx, p, (e: ApiError, inode?: Inode): void => {\n if (noError(e, cb)) {\n this.getDirListing(tx, p, inode!, (e, listing?) => {\n if (noError(e, cb)) {\n cb(null, inode!, listing!);\n }\n });\n }\n });\n }\n\n /**\n * Adds a new node under a random ID. Retries 5 times before giving up in\n * the exceedingly unlikely chance that we try to reuse a random GUID.\n * @param cb Passed an error or the GUID that the data was stored under.\n */\n private addNewNode(tx: AsyncKeyValueRWTransaction, data: Buffer, cb: BFSCallback): void {\n let retries = 0, currId: string;\n const reroll = () => {\n if (++retries === 5) {\n // Max retries hit. Return with an error.\n cb(new ApiError(ErrorCode.EIO, 'Unable to commit data to key-value store.'));\n } else {\n // Try again.\n currId = GenerateRandomID();\n tx.put(currId, data, false, (e: ApiError, committed?: boolean) => {\n if (e || !committed) {\n reroll();\n } else {\n // Successfully stored under 'currId'.\n cb(null, currId);\n }\n });\n }\n };\n reroll();\n }\n\n /**\n * Commits a new file (well, a FILE or a DIRECTORY) to the file system with\n * the given mode.\n * Note: This will commit the transaction.\n * @param p The path to the new file.\n * @param type The type of the new file.\n * @param mode The mode to create the new file with.\n * @param data The data to store at the file's data node.\n * @param cb Passed an error or the Inode for the new file.\n */\n private commitNewFile(tx: AsyncKeyValueRWTransaction, p: string, type: FileType, mode: number, data: Buffer, cb: BFSCallback): void {\n const parentDir = path.dirname(p),\n fname = path.basename(p),\n currTime = (new Date()).getTime();\n\n // Invariant: The root always exists.\n // If we don't check this prior to taking steps below, we will create a\n // file with name '' in root should p == '/'.\n if (p === '/') {\n return cb(ApiError.EEXIST(p));\n }\n\n // Let's build a pyramid of code!\n\n // Step 1: Get the parent directory's inode and directory listing\n this.findINodeAndDirListing(tx, parentDir, (e?: ApiError | null, parentNode?: Inode, dirListing?: {[name: string]: string}): void => {\n if (noErrorTx(e, tx, cb)) {\n if (dirListing![fname]) {\n // File already exists.\n tx.abort(() => {\n cb(ApiError.EEXIST(p));\n });\n } else {\n // Step 2: Commit data to store.\n this.addNewNode(tx, data, (e: ApiError, dataId?: string): void => {\n if (noErrorTx(e, tx, cb)) {\n // Step 3: Commit the file's inode to the store.\n const fileInode = new Inode(dataId!, data.length, mode | type, currTime, currTime, currTime);\n this.addNewNode(tx, fileInode.toBuffer(), (e: ApiError, fileInodeId?: string): void => {\n if (noErrorTx(e, tx, cb)) {\n // Step 4: Update parent directory's listing.\n dirListing![fname] = fileInodeId!;\n tx.put(parentNode!.id, Buffer.from(JSON.stringify(dirListing)), true, (e: ApiError): void => {\n if (noErrorTx(e, tx, cb)) {\n // Step 5: Commit and return the new inode.\n tx.commit((e?: ApiError): void => {\n if (noErrorTx(e, tx, cb)) {\n cb(null, fileInode);\n }\n });\n }\n });\n }\n });\n }\n });\n }\n }\n });\n }\n\n /**\n * Remove all traces of the given path from the file system.\n * @param p The path to remove from the file system.\n * @param isDir Does the path belong to a directory, or a file?\n * @todo Update mtime.\n */\n private removeEntry(p: string, isDir: boolean, cb: BFSOneArgCallback): void {\n const tx = this.store.beginTransaction('readwrite'),\n parent: string = path.dirname(p), fileName: string = path.basename(p);\n // Step 1: Get parent directory's node and directory listing.\n this.findINodeAndDirListing(tx, parent, (e?: ApiError | null, parentNode?: Inode, parentListing?: {[name: string]: string}): void => {\n if (noErrorTx(e, tx, cb)) {\n if (!parentListing![fileName]) {\n tx.abort(() => {\n cb(ApiError.ENOENT(p));\n });\n } else {\n // Remove from directory listing of parent.\n const fileNodeId = parentListing![fileName];\n delete parentListing![fileName];\n // Step 2: Get file inode.\n this.getINode(tx, p, fileNodeId, (e: ApiError, fileNode?: Inode): void => {\n if (noErrorTx(e, tx, cb)) {\n if (!isDir && fileNode!.isDirectory()) {\n tx.abort(() => {\n cb(ApiError.EISDIR(p));\n });\n } else if (isDir && !fileNode!.isDirectory()) {\n tx.abort(() => {\n cb(ApiError.ENOTDIR(p));\n });\n } else {\n // Step 3: Delete data.\n tx.del(fileNode!.id, (e?: ApiError): void => {\n if (noErrorTx(e, tx, cb)) {\n // Step 4: Delete node.\n tx.del(fileNodeId, (e?: ApiError): void => {\n if (noErrorTx(e, tx, cb)) {\n // Step 5: Update directory listing.\n tx.put(parentNode!.id, Buffer.from(JSON.stringify(parentListing)), true, (e: ApiError): void => {\n if (noErrorTx(e, tx, cb)) {\n tx.commit(cb);\n }\n });\n }\n });\n }\n });\n }\n }\n });\n }\n }\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/key_value_filesystem.ts","import {BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {SyncKeyValueStore, SimpleSyncStore, SimpleSyncRWTransaction, SyncKeyValueRWTransaction, SyncKeyValueFileSystem} from '../generic/key_value_filesystem';\n\n/**\n * A simple in-memory key-value store backed by a JavaScript object.\n */\nexport class InMemoryStore implements SyncKeyValueStore, SimpleSyncStore {\n private store: { [key: string]: Buffer } = {};\n\n public name() { return InMemoryFileSystem.Name; }\n public clear() { this.store = {}; }\n\n public beginTransaction(type: string): SyncKeyValueRWTransaction {\n return new SimpleSyncRWTransaction(this);\n }\n\n public get(key: string): Buffer {\n return this.store[key];\n }\n\n public put(key: string, data: Buffer, overwrite: boolean): boolean {\n if (!overwrite && this.store.hasOwnProperty(key)) {\n return false;\n }\n this.store[key] = data;\n return true;\n }\n\n public del(key: string): void {\n delete this.store[key];\n }\n}\n\n/**\n * A simple in-memory file system backed by an InMemoryStore.\n * Files are not persisted across page loads.\n */\nexport default class InMemoryFileSystem extends SyncKeyValueFileSystem {\n public static readonly Name = \"InMemory\";\n\n public static readonly Options: FileSystemOptions = {};\n\n /**\n * Creates an InMemoryFileSystem instance.\n */\n public static Create(options: any, cb: BFSCallback): void {\n cb(null, new InMemoryFileSystem());\n }\n constructor() {\n super({ store: new InMemoryStore() });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/InMemory.ts","import {BFSOneArgCallback, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {AsyncKeyValueROTransaction, AsyncKeyValueRWTransaction, AsyncKeyValueStore, AsyncKeyValueFileSystem} from '../generic/key_value_filesystem';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport global from '../core/global';\nimport {arrayBuffer2Buffer, buffer2ArrayBuffer, deprecationMessage} from '../core/util';\n/**\n * Get the indexedDB constructor for the current browser.\n * @hidden\n */\nconst indexedDB: IDBFactory = global.indexedDB ||\n ( global).mozIndexedDB ||\n ( global).webkitIndexedDB ||\n global.msIndexedDB;\n\n/**\n * Converts a DOMException or a DOMError from an IndexedDB event into a\n * standardized BrowserFS API error.\n * @hidden\n */\nfunction convertError(e: {name: string}, message: string = e.toString()): ApiError {\n switch (e.name) {\n case \"NotFoundError\":\n return new ApiError(ErrorCode.ENOENT, message);\n case \"QuotaExceededError\":\n return new ApiError(ErrorCode.ENOSPC, message);\n default:\n // The rest do not seem to map cleanly to standard error codes.\n return new ApiError(ErrorCode.EIO, message);\n }\n}\n\n/**\n * Produces a new onerror handler for IDB. Our errors are always fatal, so we\n * handle them generically: Call the user-supplied callback with a translated\n * version of the error, and let the error bubble up.\n * @hidden\n */\nfunction onErrorHandler(cb: (e: ApiError) => void, code: ErrorCode = ErrorCode.EIO, message: string | null = null): (e?: any) => void {\n return function(e?: any): void {\n // Prevent the error from canceling the transaction.\n e.preventDefault();\n cb(new ApiError(code, message !== null ? message : undefined));\n };\n}\n\n/**\n * @hidden\n */\nexport class IndexedDBROTransaction implements AsyncKeyValueROTransaction {\n constructor(public tx: IDBTransaction, public store: IDBObjectStore) { }\n\n public get(key: string, cb: BFSCallback): void {\n try {\n const r: IDBRequest = this.store.get(key);\n r.onerror = onErrorHandler(cb);\n r.onsuccess = (event) => {\n // IDB returns the value 'undefined' when you try to get keys that\n // don't exist. The caller expects this behavior.\n const result: any = ( event.target).result;\n if (result === undefined) {\n cb(null, result);\n } else {\n // IDB data is stored as an ArrayBuffer\n cb(null, arrayBuffer2Buffer(result));\n }\n };\n } catch (e) {\n cb(convertError(e));\n }\n }\n}\n\n/**\n * @hidden\n */\nexport class IndexedDBRWTransaction extends IndexedDBROTransaction implements AsyncKeyValueRWTransaction, AsyncKeyValueROTransaction {\n constructor(tx: IDBTransaction, store: IDBObjectStore) {\n super(tx, store);\n }\n\n public put(key: string, data: Buffer, overwrite: boolean, cb: BFSCallback): void {\n try {\n const arraybuffer = buffer2ArrayBuffer(data);\n let r: IDBRequest;\n if (overwrite) {\n r = this.store.put(arraybuffer, key);\n } else {\n // 'add' will never overwrite an existing key.\n r = this.store.add(arraybuffer, key);\n }\n // XXX: NEED TO RETURN FALSE WHEN ADD HAS A KEY CONFLICT. NO ERROR.\n r.onerror = onErrorHandler(cb);\n r.onsuccess = (event) => {\n cb(null, true);\n };\n } catch (e) {\n cb(convertError(e));\n }\n }\n\n public del(key: string, cb: BFSOneArgCallback): void {\n try {\n // NOTE: IE8 has a bug with identifiers named 'delete' unless used as a string\n // like this.\n // http://stackoverflow.com/a/26479152\n const r: IDBRequest = this.store['delete'](key);\n r.onerror = onErrorHandler(cb);\n r.onsuccess = (event) => {\n cb();\n };\n } catch (e) {\n cb(convertError(e));\n }\n }\n\n public commit(cb: BFSOneArgCallback): void {\n // Return to the event loop to commit the transaction.\n setTimeout(cb, 0);\n }\n\n public abort(cb: BFSOneArgCallback): void {\n let _e: ApiError | null = null;\n try {\n this.tx.abort();\n } catch (e) {\n _e = convertError(e);\n } finally {\n cb(_e);\n }\n }\n}\n\nexport class IndexedDBStore implements AsyncKeyValueStore {\n private db: IDBDatabase;\n\n constructor(cb: BFSCallback, private storeName: string = 'browserfs') {\n const openReq: IDBOpenDBRequest = indexedDB.open(this.storeName, 1);\n\n openReq.onupgradeneeded = (event) => {\n const db: IDBDatabase = ( event.target).result;\n // Huh. This should never happen; we're at version 1. Why does another\n // database exist?\n if (db.objectStoreNames.contains(this.storeName)) {\n db.deleteObjectStore(this.storeName);\n }\n db.createObjectStore(this.storeName);\n };\n\n openReq.onsuccess = (event) => {\n this.db = ( event.target).result;\n cb(null, this);\n };\n\n openReq.onerror = onErrorHandler(cb, ErrorCode.EACCES);\n }\n\n public name(): string {\n return IndexedDBFileSystem.Name + \" - \" + this.storeName;\n }\n\n public clear(cb: BFSOneArgCallback): void {\n try {\n const tx = this.db.transaction(this.storeName, 'readwrite'),\n objectStore = tx.objectStore(this.storeName),\n r: IDBRequest = objectStore.clear();\n r.onsuccess = (event) => {\n // Use setTimeout to commit transaction.\n setTimeout(cb, 0);\n };\n r.onerror = onErrorHandler(cb);\n } catch (e) {\n cb(convertError(e));\n }\n }\n\n public beginTransaction(type: 'readonly'): AsyncKeyValueROTransaction;\n public beginTransaction(type: 'readwrite'): AsyncKeyValueRWTransaction;\n public beginTransaction(type: string = 'readonly'): AsyncKeyValueROTransaction {\n const tx = this.db.transaction(this.storeName, type),\n objectStore = tx.objectStore(this.storeName);\n if (type === 'readwrite') {\n return new IndexedDBRWTransaction(tx, objectStore);\n } else if (type === 'readonly') {\n return new IndexedDBROTransaction(tx, objectStore);\n } else {\n throw new ApiError(ErrorCode.EINVAL, 'Invalid transaction type.');\n }\n }\n}\n\n/**\n * Configuration options for the IndexedDB file system.\n */\nexport interface IndexedDBFileSystemOptions {\n // The name of this file system. You can have multiple IndexedDB file systems operating\n // at once, but each must have a different name.\n storeName?: string;\n}\n\n/**\n * A file system that uses the IndexedDB key value file system.\n */\nexport default class IndexedDBFileSystem extends AsyncKeyValueFileSystem {\n public static readonly Name = \"IndexedDB\";\n\n public static readonly Options: FileSystemOptions = {\n storeName: {\n type: \"string\",\n optional: true,\n description: \"The name of this file system. You can have multiple IndexedDB file systems operating at once, but each must have a different name.\"\n }\n };\n\n /**\n * Constructs an IndexedDB file system with the given options.\n */\n public static Create(opts: IndexedDBFileSystemOptions, cb: BFSCallback): void {\n // tslint:disable-next-line:no-unused-new\n new IndexedDBFileSystem(cb, opts.storeName, false);\n // tslint:enable-next-line:no-unused-new\n }\n public static isAvailable(): boolean {\n // In Safari's private browsing mode, indexedDB.open returns NULL.\n // In Firefox, it throws an exception.\n // In Chrome, it \"just works\", and clears the database when you leave the page.\n // Untested: Opera, IE.\n try {\n return typeof indexedDB !== 'undefined' && null !== indexedDB.open(\"__browserfs_test__\");\n } catch (e) {\n return false;\n }\n }\n /**\n * **Deprecated. Use IndexedDB.Create() method instead.**\n *\n * Constructs an IndexedDB file system.\n * @param cb Called once the database is instantiated and ready for use.\n * Passes an error if there was an issue instantiating the database.\n * @param storeName The name of this file system. You can have\n * multiple IndexedDB file systems operating at once, but each must have\n * a different name.\n */\n constructor(cb: BFSCallback, storeName?: string, deprecateMsg: boolean = true) {\n super();\n this.store = new IndexedDBStore((e): void => {\n if (e) {\n cb(e);\n } else {\n this.init(this.store, (e?) => {\n cb(e, this);\n });\n }\n }, storeName);\n deprecationMessage(deprecateMsg, IndexedDBFileSystem.Name, {storeName: storeName});\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/IndexedDB.ts","import {BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {SyncKeyValueStore, SimpleSyncStore, SyncKeyValueFileSystem, SimpleSyncRWTransaction, SyncKeyValueRWTransaction} from '../generic/key_value_filesystem';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport global from '../core/global';\n\n/**\n * Some versions of FF and all versions of IE do not support the full range of\n * 16-bit numbers encoded as characters, as they enforce UTF-16 restrictions.\n * @url http://stackoverflow.com/questions/11170716/are-there-any-characters-that-are-not-allowed-in-localstorage/11173673#11173673\n * @hidden\n */\nlet supportsBinaryString: boolean = false,\n binaryEncoding: string;\ntry {\n global.localStorage.setItem(\"__test__\", String.fromCharCode(0xD800));\n supportsBinaryString = global.localStorage.getItem(\"__test__\") === String.fromCharCode(0xD800);\n} catch (e) {\n // IE throws an exception.\n supportsBinaryString = false;\n}\nbinaryEncoding = supportsBinaryString ? 'binary_string' : 'binary_string_ie';\nif (!Buffer.isEncoding(binaryEncoding)) {\n // Fallback for non BrowserFS implementations of buffer that lack a\n // binary_string format.\n binaryEncoding = \"base64\";\n}\n\n/**\n * A synchronous key-value store backed by localStorage.\n */\nexport class LocalStorageStore implements SyncKeyValueStore, SimpleSyncStore {\n public name(): string {\n return LocalStorageFileSystem.Name;\n }\n\n public clear(): void {\n global.localStorage.clear();\n }\n\n public beginTransaction(type: string): SyncKeyValueRWTransaction {\n // No need to differentiate.\n return new SimpleSyncRWTransaction(this);\n }\n\n public get(key: string): Buffer | undefined {\n try {\n const data = global.localStorage.getItem(key);\n if (data !== null) {\n return Buffer.from(data, binaryEncoding);\n }\n } catch (e) {\n // Do nothing.\n }\n // Key doesn't exist, or a failure occurred.\n return undefined;\n }\n\n public put(key: string, data: Buffer, overwrite: boolean): boolean {\n try {\n if (!overwrite && global.localStorage.getItem(key) !== null) {\n // Don't want to overwrite the key!\n return false;\n }\n global.localStorage.setItem(key, data.toString(binaryEncoding));\n return true;\n } catch (e) {\n throw new ApiError(ErrorCode.ENOSPC, \"LocalStorage is full.\");\n }\n }\n\n public del(key: string): void {\n try {\n global.localStorage.removeItem(key);\n } catch (e) {\n throw new ApiError(ErrorCode.EIO, \"Unable to delete key \" + key + \": \" + e);\n }\n }\n}\n\n/**\n * A synchronous file system backed by localStorage. Connects our\n * LocalStorageStore to our SyncKeyValueFileSystem.\n */\nexport default class LocalStorageFileSystem extends SyncKeyValueFileSystem {\n public static readonly Name = \"LocalStorage\";\n\n public static readonly Options: FileSystemOptions = {};\n\n /**\n * Creates a LocalStorageFileSystem instance.\n */\n public static Create(options: any, cb: BFSCallback): void {\n cb(null, new LocalStorageFileSystem());\n }\n public static isAvailable(): boolean {\n return typeof global.localStorage !== 'undefined';\n }\n /**\n * Creates a new LocalStorage file system using the contents of `localStorage`.\n */\n constructor() { super({ store: new LocalStorageStore() }); }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/LocalStorage.ts","import {FileSystem, BaseFileSystem, BFSOneArgCallback, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport InMemoryFileSystem from './InMemory';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport fs from '../core/node_fs';\nimport * as path from 'path';\nimport {mkdirpSync} from '../core/util';\n\n/**\n * Configuration options for the MountableFileSystem backend.\n */\nexport interface MountableFileSystemOptions {\n // Locations of mount points. Can be empty.\n [mountPoint: string]: FileSystem;\n}\n\n/**\n * The MountableFileSystem allows you to mount multiple backend types or\n * multiple instantiations of the same backend into a single file system tree.\n * The file systems do not need to know about each other; all interactions are\n * automatically facilitated through this interface.\n *\n * For example, if a file system is mounted at /mnt/blah, and a request came in\n * for /mnt/blah/foo.txt, the file system would see a request for /foo.txt.\n *\n * You can mount file systems when you configure the file system:\n * ```javascript\n * BrowserFS.configure({\n * fs: \"MountableFileSystem\",\n * options: {\n * '/data': { fs: 'XmlHttpRequest', options: { index: \"http://mysite.com/files/index.json\" } },\n * '/home': { fs: 'LocalStorage' }\n * }\n * }, function(e) {\n *\n * });\n * ```\n *\n * For advanced users, you can also mount file systems *after* MFS is constructed:\n * ```javascript\n * BrowserFS.FileSystem.XmlHttpRequest.Create({\n * index: \"http://mysite.com/files/index.json\"\n * }, function(e, xhrfs) {\n * BrowserFS.FileSystem.MountableFileSystem.Create({\n * '/data': xhrfs\n * }, function(e, mfs) {\n * BrowserFS.initialize(mfs);\n *\n * // Added after-the-fact...\n * BrowserFS.FileSystem.LocalStorage.Create(function(e, lsfs) {\n * mfs.mount('/home', lsfs);\n * });\n * });\n * });\n * ```\n *\n * Since MountableFileSystem simply proxies requests to mounted file systems, it supports all of the operations that the mounted file systems support.\n *\n * With no mounted file systems, `MountableFileSystem` acts as a simple `InMemory` filesystem.\n */\nexport default class MountableFileSystem extends BaseFileSystem implements FileSystem {\n public static readonly Name = \"MountableFileSystem\";\n\n public static readonly Options: FileSystemOptions = {};\n\n /**\n * Creates a MountableFileSystem instance with the given options.\n */\n public static Create(opts: MountableFileSystemOptions, cb: BFSCallback): void {\n const fs = new MountableFileSystem();\n Object.keys(opts).forEach((mountPoint) => {\n fs.mount(mountPoint, opts[mountPoint]);\n });\n cb(null, fs);\n }\n public static isAvailable(): boolean {\n return true;\n }\n\n private mntMap: {[path: string]: FileSystem};\n // Contains the list of mount points in mntMap, sorted by string length in decreasing order.\n // Ensures that we scan the most specific mount points for a match first, which lets us\n // nest mount points.\n private mountList: string[] = [];\n private rootFs: FileSystem;\n\n /**\n * Creates a new, empty MountableFileSystem.\n */\n constructor() {\n super();\n this.mntMap = {};\n // The InMemory file system serves purely to provide directory listings for\n // mounted file systems.\n this.rootFs = new InMemoryFileSystem();\n }\n\n /**\n * Mounts the file system at the given mount point.\n */\n public mount(mountPoint: string, fs: FileSystem): void {\n if (mountPoint[0] !== '/') {\n mountPoint = `/${mountPoint}`;\n }\n mountPoint = path.resolve(mountPoint);\n if (this.mntMap[mountPoint]) {\n throw new ApiError(ErrorCode.EINVAL, \"Mount point \" + mountPoint + \" is already taken.\");\n }\n mkdirpSync(mountPoint, 0x1ff, this.rootFs);\n this.mntMap[mountPoint] = fs;\n this.mountList.push(mountPoint);\n this.mountList = this.mountList.sort((a, b) => b.length - a.length);\n }\n\n public umount(mountPoint: string): void {\n if (mountPoint[0] !== '/') {\n mountPoint = `/${mountPoint}`;\n }\n mountPoint = path.resolve(mountPoint);\n if (!this.mntMap[mountPoint]) {\n throw new ApiError(ErrorCode.EINVAL, \"Mount point \" + mountPoint + \" is already unmounted.\");\n }\n delete this.mntMap[mountPoint];\n this.mountList.splice(this.mountList.indexOf(mountPoint), 1);\n\n while (mountPoint !== '/') {\n if (this.rootFs.readdirSync(mountPoint).length === 0) {\n this.rootFs.rmdirSync(mountPoint);\n mountPoint = path.dirname(mountPoint);\n } else {\n break;\n }\n }\n }\n\n /**\n * Returns the file system that the path points to.\n */\n public _getFs(path: string): {fs: FileSystem; path: string} {\n const mountList = this.mountList, len = mountList.length;\n for (let i = 0; i < len; i++) {\n const mountPoint = mountList[i];\n // We know path is normalized, so it is a substring of the mount point.\n if (mountPoint.length <= path.length && path.indexOf(mountPoint) === 0) {\n path = path.substr(mountPoint.length > 1 ? mountPoint.length : 0);\n if (path === '') {\n path = '/';\n }\n return {fs: this.mntMap[mountPoint], path: path};\n }\n }\n // Query our root file system.\n return {fs: this.rootFs, path: path};\n }\n\n // Global information methods\n\n public getName(): string {\n return MountableFileSystem.Name;\n }\n\n public diskSpace(path: string, cb: (total: number, free: number) => void): void {\n cb(0, 0);\n }\n\n public isReadOnly(): boolean {\n return false;\n }\n\n public supportsLinks(): boolean {\n // I'm not ready for cross-FS links yet.\n return false;\n }\n\n public supportsProps(): boolean {\n return false;\n }\n\n public supportsSynch(): boolean {\n return true;\n }\n\n /**\n * Fixes up error messages so they mention the mounted file location relative\n * to the MFS root, not to the particular FS's root.\n * Mutates the input error, and returns it.\n */\n public standardizeError(err: ApiError, path: string, realPath: string): ApiError {\n const index = err.message.indexOf(path);\n if (index !== -1) {\n err.message = err.message.substr(0, index) + realPath + err.message.substr(index + path.length);\n err.path = realPath;\n }\n return err;\n }\n\n // The following methods involve multiple file systems, and thus have custom\n // logic.\n // Note that we go through the Node API to use its robust default argument\n // processing.\n\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void {\n // Scenario 1: old and new are on same FS.\n const fs1rv = this._getFs(oldPath);\n const fs2rv = this._getFs(newPath);\n if (fs1rv.fs === fs2rv.fs) {\n return fs1rv.fs.rename(fs1rv.path, fs2rv.path, (e?: ApiError) => {\n if (e) {\n this.standardizeError(this.standardizeError(e, fs1rv.path, oldPath), fs2rv.path, newPath);\n }\n cb(e);\n });\n }\n\n // Scenario 2: Different file systems.\n // Read old file, write new file, delete old file.\n return fs.readFile(oldPath, function(err: ApiError, data?: any) {\n if (err) {\n return cb(err);\n }\n fs.writeFile(newPath, data, function(err: ApiError) {\n if (err) {\n return cb(err);\n }\n fs.unlink(oldPath, cb);\n });\n });\n }\n\n public renameSync(oldPath: string, newPath: string): void {\n // Scenario 1: old and new are on same FS.\n const fs1rv = this._getFs(oldPath);\n const fs2rv = this._getFs(newPath);\n if (fs1rv.fs === fs2rv.fs) {\n try {\n return fs1rv.fs.renameSync(fs1rv.path, fs2rv.path);\n } catch (e) {\n this.standardizeError(this.standardizeError(e, fs1rv.path, oldPath), fs2rv.path, newPath);\n throw e;\n }\n }\n // Scenario 2: Different file systems.\n const data = fs.readFileSync(oldPath);\n fs.writeFileSync(newPath, data);\n return fs.unlinkSync(oldPath);\n }\n\n public readdirSync(p: string): string[] {\n const fsInfo = this._getFs(p);\n\n // If null, rootfs did not have the directory\n // (or the target FS is the root fs).\n let rv: string[] | null = null;\n // Mount points are all defined in the root FS.\n // Ensure that we list those, too.\n if (fsInfo.fs !== this.rootFs) {\n try {\n rv = this.rootFs.readdirSync(p);\n } catch (e) {\n // Ignore.\n }\n }\n\n try {\n const rv2 = fsInfo.fs.readdirSync(fsInfo.path);\n if (rv === null) {\n return rv2;\n } else {\n // Filter out duplicates.\n return rv2.concat(rv.filter((val) => rv2.indexOf(val) === -1));\n }\n } catch (e) {\n if (rv === null) {\n throw this.standardizeError(e, fsInfo.path, p);\n } else {\n // The root FS had something.\n return rv;\n }\n }\n }\n\n public readdir(p: string, cb: BFSCallback): void {\n const fsInfo = this._getFs(p);\n fsInfo.fs.readdir(fsInfo.path, (err, files) => {\n if (fsInfo.fs !== this.rootFs) {\n try {\n const rv = this.rootFs.readdirSync(p);\n if (files) {\n // Filter out duplicates.\n files = files.concat(rv.filter((val) => files!.indexOf(val) === -1));\n } else {\n files = rv;\n }\n } catch (e) {\n // Root FS and target FS did not have directory.\n if (err) {\n return cb(this.standardizeError(err, fsInfo.path, p));\n }\n }\n } else if (err) {\n // Root FS and target FS are the same, and did not have directory.\n return cb(this.standardizeError(err, fsInfo.path, p));\n }\n\n cb(null, files);\n });\n }\n\n public rmdirSync(p: string): void {\n const fsInfo = this._getFs(p);\n if (this._containsMountPt(p)) {\n throw ApiError.ENOTEMPTY(p);\n } else {\n try {\n fsInfo.fs.rmdirSync(fsInfo.path);\n } catch (e) {\n throw this.standardizeError(e, fsInfo.path, p);\n }\n }\n }\n\n public rmdir(p: string, cb: BFSOneArgCallback): void {\n const fsInfo = this._getFs(p);\n if (this._containsMountPt(p)) {\n cb(ApiError.ENOTEMPTY(p));\n } else {\n fsInfo.fs.rmdir(fsInfo.path, (err?) => {\n cb(err ? this.standardizeError(err, fsInfo.path, p) : null);\n });\n }\n }\n\n /**\n * Returns true if the given path contains a mount point.\n */\n private _containsMountPt(p: string): boolean {\n const mountPoints = this.mountList, len = mountPoints.length;\n for (let i = 0; i < len; i++) {\n const pt = mountPoints[i];\n if (pt.length >= p.length && pt.slice(0, p.length) === p) {\n return true;\n }\n }\n return false;\n }\n}\n\n/**\n * Tricky: Define all of the functions that merely forward arguments to the\n * relevant file system, or return/throw an error.\n * Take advantage of the fact that the *first* argument is always the path, and\n * the *last* is the callback function (if async).\n * @todo Can use numArgs to make proxying more efficient.\n * @hidden\n */\nfunction defineFcn(name: string, isSync: boolean, numArgs: number): (...args: any[]) => any {\n if (isSync) {\n return function(this: MountableFileSystem, ...args: any[]) {\n const path = args[0];\n const rv = this._getFs(path);\n args[0] = rv.path;\n try {\n return ( rv.fs)[name].apply(rv.fs, args);\n } catch (e) {\n this.standardizeError(e, rv.path, path);\n throw e;\n }\n };\n } else {\n return function(this: MountableFileSystem, ...args: any[]) {\n const path = args[0];\n const rv = this._getFs(path);\n args[0] = rv.path;\n if (typeof args[args.length - 1] === 'function') {\n const cb = args[args.length - 1];\n args[args.length - 1] = (...args: any[]) => {\n if (args.length > 0 && args[0] instanceof ApiError) {\n this.standardizeError(args[0], rv.path, path);\n }\n cb.apply(null, args);\n };\n }\n return ( rv.fs)[name].apply(rv.fs, args);\n };\n }\n}\n\n/**\n * @hidden\n */\nconst fsCmdMap = [\n // 1 arg functions\n ['exists', 'unlink', 'readlink'],\n // 2 arg functions\n ['stat', 'mkdir', 'realpath', 'truncate'],\n // 3 arg functions\n ['open', 'readFile', 'chmod', 'utimes'],\n // 4 arg functions\n ['chown'],\n // 5 arg functions\n ['writeFile', 'appendFile']];\n\nfor (let i = 0; i < fsCmdMap.length; i++) {\n const cmds = fsCmdMap[i];\n for (const fnName of cmds) {\n ( MountableFileSystem.prototype)[fnName] = defineFcn(fnName, false, i + 1);\n ( MountableFileSystem.prototype)[fnName + 'Sync'] = defineFcn(fnName + 'Sync', true, i + 1);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/MountableFileSystem.ts","import global from '../core/global';\n\n/**\n * @hidden\n */\nlet bfsSetImmediate: (cb: Function) => any;\nif (typeof(setImmediate) !== \"undefined\") {\n bfsSetImmediate = setImmediate;\n} else {\n const gScope = global;\n const timeouts: (() => void)[] = [];\n const messageName = \"zero-timeout-message\";\n const canUsePostMessage = function() {\n if (typeof gScope.importScripts !== 'undefined' || !gScope.postMessage) {\n return false;\n }\n let postMessageIsAsync = true;\n const oldOnMessage = gScope.onmessage;\n gScope.onmessage = function() {\n postMessageIsAsync = false;\n };\n gScope.postMessage('', '*');\n gScope.onmessage = oldOnMessage;\n return postMessageIsAsync;\n };\n if (canUsePostMessage()) {\n bfsSetImmediate = function(fn: () => void) {\n timeouts.push(fn);\n gScope.postMessage(messageName, \"*\");\n };\n const handleMessage = function(event: MessageEvent) {\n if (event.source === self && event.data === messageName) {\n if (event.stopPropagation) {\n event.stopPropagation();\n } else {\n event.cancelBubble = true;\n }\n if (timeouts.length > 0) {\n const fn = timeouts.shift()!;\n return fn();\n }\n }\n };\n if (gScope.addEventListener) {\n gScope.addEventListener('message', handleMessage, true);\n } else {\n gScope.attachEvent('onmessage', handleMessage);\n }\n } else if (gScope.MessageChannel) {\n // WebWorker MessageChannel\n const channel = new gScope.MessageChannel();\n channel.port1.onmessage = (event: any) => {\n if (timeouts.length > 0) {\n return timeouts.shift()!();\n }\n };\n bfsSetImmediate = (fn: () => void) => {\n timeouts.push(fn);\n channel.port2.postMessage('');\n };\n } else {\n bfsSetImmediate = function(fn: () => void) {\n return setTimeout(fn, 0);\n };\n }\n}\n\nexport default bfsSetImmediate;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/setImmediate.ts","import setImmediate from '../generic/setImmediate';\n\n/**\n * Non-recursive mutex\n * @hidden\n */\nexport default class Mutex {\n private _locked: boolean = false;\n private _waiters: Function[] = [];\n\n public lock(cb: Function): void {\n if (this._locked) {\n this._waiters.push(cb);\n return;\n }\n this._locked = true;\n cb();\n }\n\n public unlock(): void {\n if (!this._locked) {\n throw new Error('unlock of a non-locked mutex');\n }\n\n const next = this._waiters.shift();\n // don't unlock - we want to queue up next for the\n // _end_ of the current task execution, but we don't\n // want it to be called inline with whatever the\n // current stack is. This way we still get the nice\n // behavior that an unlock immediately followed by a\n // lock won't cause starvation.\n if (next) {\n setImmediate(next);\n return;\n }\n\n this._locked = false;\n }\n\n public tryLock(): boolean {\n if (this._locked) {\n return false;\n }\n\n this._locked = true;\n return true;\n }\n\n public isLocked(): boolean {\n return this._locked;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/mutex.ts","import Mutex from './mutex';\nimport {FileSystem, BFSOneArgCallback, BFSCallback} from '../core/file_system';\nimport {ApiError} from '../core/api_error';\nimport {FileFlag} from '../core/file_flag';\nimport {default as Stats} from '../core/node_fs_stats';\nimport {File} from '../core/file';\n\n/**\n * This class serializes access to an underlying async filesystem.\n * For example, on an OverlayFS instance with an async lower\n * directory operations like rename and rmdir may involve multiple\n * requests involving both the upper and lower filesystems -- they\n * are not executed in a single atomic step. OverlayFS uses this\n * LockedFS to avoid having to reason about the correctness of\n * multiple requests interleaving.\n */\nexport default class LockedFS implements FileSystem {\n private _fs: T;\n private _mu: Mutex;\n\n constructor(fs: T) {\n this._fs = fs;\n this._mu = new Mutex();\n }\n\n public getName(): string {\n return 'LockedFS<' + this._fs.getName() + '>';\n }\n\n public getFSUnlocked(): T {\n return this._fs;\n }\n\n public initialize(cb: BFSOneArgCallback): void {\n // FIXME: check to see if FS supports initialization\n ( this._fs).initialize(cb);\n }\n\n public diskSpace(p: string, cb: (total: number, free: number) => any): void {\n // FIXME: should this lock?\n this._fs.diskSpace(p, cb);\n }\n\n public isReadOnly(): boolean {\n return this._fs.isReadOnly();\n }\n\n public supportsLinks(): boolean {\n return this._fs.supportsLinks();\n }\n\n public supportsProps(): boolean {\n return this._fs.supportsProps();\n }\n\n public supportsSynch(): boolean {\n return this._fs.supportsSynch();\n }\n\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.rename(oldPath, newPath, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public renameSync(oldPath: string, newPath: string): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.renameSync(oldPath, newPath);\n }\n\n public stat(p: string, isLstat: boolean, cb: BFSCallback): void {\n this._mu.lock(() => {\n this._fs.stat(p, isLstat, (err?: ApiError, stat?: Stats) => {\n this._mu.unlock();\n cb(err, stat);\n });\n });\n }\n\n public statSync(p: string, isLstat: boolean): Stats {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.statSync(p, isLstat);\n }\n\n public open(p: string, flag: FileFlag, mode: number, cb: BFSCallback): void {\n this._mu.lock(() => {\n this._fs.open(p, flag, mode, (err?: ApiError, fd?: File) => {\n this._mu.unlock();\n cb(err, fd);\n });\n });\n }\n\n public openSync(p: string, flag: FileFlag, mode: number): File {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.openSync(p, flag, mode);\n }\n\n public unlink(p: string, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.unlink(p, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public unlinkSync(p: string): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.unlinkSync(p);\n }\n\n public rmdir(p: string, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.rmdir(p, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public rmdirSync(p: string): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.rmdirSync(p);\n }\n\n public mkdir(p: string, mode: number, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.mkdir(p, mode, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public mkdirSync(p: string, mode: number): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.mkdirSync(p, mode);\n }\n\n public readdir(p: string, cb: BFSCallback): void {\n this._mu.lock(() => {\n this._fs.readdir(p, (err?: ApiError, files?: string[]) => {\n this._mu.unlock();\n cb(err, files);\n });\n });\n }\n\n public readdirSync(p: string): string[] {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.readdirSync(p);\n }\n\n public exists(p: string, cb: (exists: boolean) => void): void {\n this._mu.lock(() => {\n this._fs.exists(p, (exists: boolean) => {\n this._mu.unlock();\n cb(exists);\n });\n });\n }\n\n public existsSync(p: string): boolean {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.existsSync(p);\n }\n\n public realpath(p: string, cache: {[path: string]: string}, cb: BFSCallback): void {\n this._mu.lock(() => {\n this._fs.realpath(p, cache, (err?: ApiError, resolvedPath?: string) => {\n this._mu.unlock();\n cb(err, resolvedPath);\n });\n });\n }\n\n public realpathSync(p: string, cache: {[path: string]: string}): string {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.realpathSync(p, cache);\n }\n\n public truncate(p: string, len: number, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.truncate(p, len, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public truncateSync(p: string, len: number): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.truncateSync(p, len);\n }\n\n public readFile(fname: string, encoding: string, flag: FileFlag, cb: BFSCallback): void {\n this._mu.lock(() => {\n this._fs.readFile(fname, encoding, flag, (err?: ApiError, data?: any) => {\n this._mu.unlock();\n cb(err, data);\n });\n });\n }\n\n public readFileSync(fname: string, encoding: string, flag: FileFlag): any {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.readFileSync(fname, encoding, flag);\n }\n\n public writeFile(fname: string, data: any, encoding: string, flag: FileFlag, mode: number, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.writeFile(fname, data, encoding, flag, mode, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public writeFileSync(fname: string, data: any, encoding: string, flag: FileFlag, mode: number): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.writeFileSync(fname, data, encoding, flag, mode);\n }\n\n public appendFile(fname: string, data: any, encoding: string, flag: FileFlag, mode: number, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.appendFile(fname, data, encoding, flag, mode, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public appendFileSync(fname: string, data: any, encoding: string, flag: FileFlag, mode: number): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.appendFileSync(fname, data, encoding, flag, mode);\n }\n\n public chmod(p: string, isLchmod: boolean, mode: number, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.chmod(p, isLchmod, mode, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public chmodSync(p: string, isLchmod: boolean, mode: number): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.chmodSync(p, isLchmod, mode);\n }\n\n public chown(p: string, isLchown: boolean, uid: number, gid: number, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.chown(p, isLchown, uid, gid, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public chownSync(p: string, isLchown: boolean, uid: number, gid: number): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.chownSync(p, isLchown, uid, gid);\n }\n\n public utimes(p: string, atime: Date, mtime: Date, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.utimes(p, atime, mtime, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public utimesSync(p: string, atime: Date, mtime: Date): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.utimesSync(p, atime, mtime);\n }\n\n public link(srcpath: string, dstpath: string, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.link(srcpath, dstpath, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public linkSync(srcpath: string, dstpath: string): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.linkSync(srcpath, dstpath);\n }\n\n public symlink(srcpath: string, dstpath: string, type: string, cb: BFSOneArgCallback): void {\n this._mu.lock(() => {\n this._fs.symlink(srcpath, dstpath, type, (err?: ApiError) => {\n this._mu.unlock();\n cb(err);\n });\n });\n }\n\n public symlinkSync(srcpath: string, dstpath: string, type: string): void {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.symlinkSync(srcpath, dstpath, type);\n }\n\n public readlink(p: string, cb: BFSCallback): void {\n this._mu.lock(() => {\n this._fs.readlink(p, (err?: ApiError, linkString?: string) => {\n this._mu.unlock();\n cb(err, linkString);\n });\n });\n }\n\n public readlinkSync(p: string): string {\n if (this._mu.isLocked()) {\n throw new Error('invalid sync call');\n }\n return this._fs.readlinkSync(p);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/locked_fs.ts","import {FileSystem, BaseFileSystem, BFSOneArgCallback, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport {FileFlag, ActionType} from '../core/file_flag';\nimport {File} from '../core/file';\nimport {deprecationMessage} from '../core/util';\nimport {default as Stats} from '../core/node_fs_stats';\nimport PreloadFile from '../generic/preload_file';\nimport LockedFS from '../generic/locked_fs';\nimport * as path from 'path';\n/**\n * @hidden\n */\nconst deletionLogPath = '/.deletedFiles.log';\n\n/**\n * Given a read-only mode, makes it writable.\n * @hidden\n */\nfunction makeModeWritable(mode: number): number {\n return 0o222 | mode;\n}\n\n/**\n * @hidden\n */\nfunction getFlag(f: string): FileFlag {\n return FileFlag.getFileFlag(f);\n}\n\n/**\n * Overlays a RO file to make it writable.\n */\nclass OverlayFile extends PreloadFile implements File {\n constructor(fs: UnlockedOverlayFS, path: string, flag: FileFlag, stats: Stats, data: Buffer) {\n super(fs, path, flag, stats, data);\n }\n\n public sync(cb: BFSOneArgCallback): void {\n if (!this.isDirty()) {\n cb(null);\n return;\n }\n\n this._fs._syncAsync(this, (err: ApiError) => {\n this.resetDirty();\n cb(err);\n });\n }\n\n public syncSync(): void {\n if (this.isDirty()) {\n this._fs._syncSync(this);\n this.resetDirty();\n }\n }\n\n public close(cb: BFSOneArgCallback): void {\n this.sync(cb);\n }\n\n public closeSync(): void {\n this.syncSync();\n }\n}\n\n/**\n * *INTERNAL, DO NOT USE DIRECTLY!*\n *\n * Core OverlayFS class that contains no locking whatsoever. We wrap these objects\n * in a LockedFS to prevent races.\n */\nexport class UnlockedOverlayFS extends BaseFileSystem implements FileSystem {\n public static isAvailable(): boolean {\n return true;\n }\n\n private _writable: FileSystem;\n private _readable: FileSystem;\n private _isInitialized: boolean = false;\n private _initializeCallbacks: (BFSOneArgCallback)[] = [];\n private _deletedFiles: {[path: string]: boolean} = {};\n private _deleteLog: string = '';\n // If 'true', we have scheduled a delete log update.\n private _deleteLogUpdatePending: boolean = false;\n // If 'true', a delete log update is needed after the scheduled delete log\n // update finishes.\n private _deleteLogUpdateNeeded: boolean = false;\n // If there was an error updating the delete log...\n private _deleteLogError: ApiError | null = null;\n\n constructor(writable: FileSystem, readable: FileSystem) {\n super();\n this._writable = writable;\n this._readable = readable;\n if (this._writable.isReadOnly()) {\n throw new ApiError(ErrorCode.EINVAL, \"Writable file system must be writable.\");\n }\n }\n\n public getOverlayedFileSystems(): { readable: FileSystem; writable: FileSystem; } {\n return {\n readable: this._readable,\n writable: this._writable\n };\n }\n\n public _syncAsync(file: PreloadFile, cb: BFSOneArgCallback): void {\n this.createParentDirectoriesAsync(file.getPath(), (err?: ApiError) => {\n if (err) {\n return cb(err);\n }\n this._writable.writeFile(file.getPath(), file.getBuffer(), null, getFlag('w'), file.getStats().mode, cb);\n });\n }\n\n public _syncSync(file: PreloadFile): void {\n this.createParentDirectories(file.getPath());\n this._writable.writeFileSync(file.getPath(), file.getBuffer(), null, getFlag('w'), file.getStats().mode);\n }\n\n public getName() {\n return OverlayFS.Name;\n }\n\n /**\n * Called once to load up metadata stored on the writable file system.\n */\n public initialize(cb: BFSOneArgCallback): void {\n const callbackArray = this._initializeCallbacks;\n\n const end = (e?: ApiError): void => {\n this._isInitialized = !e;\n this._initializeCallbacks = [];\n callbackArray.forEach(((cb) => cb(e)));\n };\n\n // if we're already initialized, immediately invoke the callback\n if (this._isInitialized) {\n return cb();\n }\n\n callbackArray.push(cb);\n // The first call to initialize initializes, the rest wait for it to complete.\n if (callbackArray.length !== 1) {\n return;\n }\n\n // Read deletion log, process into metadata.\n this._writable.readFile(deletionLogPath, 'utf8', getFlag('r'), (err: ApiError, data?: string) => {\n if (err) {\n // ENOENT === Newly-instantiated file system, and thus empty log.\n if (err.errno !== ErrorCode.ENOENT) {\n return end(err);\n }\n } else {\n this._deleteLog = data!;\n }\n this._reparseDeletionLog();\n end();\n });\n }\n\n public isReadOnly(): boolean { return false; }\n public supportsSynch(): boolean { return this._readable.supportsSynch() && this._writable.supportsSynch(); }\n public supportsLinks(): boolean { return false; }\n public supportsProps(): boolean { return this._readable.supportsProps() && this._writable.supportsProps(); }\n\n public getDeletionLog(): string {\n return this._deleteLog;\n }\n\n public restoreDeletionLog(log: string): void {\n this._deleteLog = log;\n this._reparseDeletionLog();\n this.updateLog('');\n }\n\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void {\n if (!this.checkInitAsync(cb) || this.checkPathAsync(oldPath, cb) || this.checkPathAsync(newPath, cb)) {\n return;\n }\n\n if (oldPath === deletionLogPath || newPath === deletionLogPath) {\n return cb(ApiError.EPERM('Cannot rename deletion log.'));\n }\n\n // nothing to do if paths match\n if (oldPath === newPath) {\n return cb();\n }\n\n this.stat(oldPath, false, (oldErr: ApiError, oldStats?: Stats) => {\n if (oldErr) {\n return cb(oldErr);\n }\n\n return this.stat(newPath, false, (newErr: ApiError, newStats?: Stats) => {\n const self = this;\n // precondition: both oldPath and newPath exist and are dirs.\n // decreases: |files|\n // Need to move *every file/folder* currently stored on\n // readable to its new location on writable.\n function copyDirContents(files: string[]): void {\n const file = files.shift();\n if (!file) {\n return cb();\n }\n\n const oldFile = path.resolve(oldPath, file);\n const newFile = path.resolve(newPath, file);\n\n // Recursion! Should work for any nested files / folders.\n self.rename(oldFile, newFile, (err?: ApiError) => {\n if (err) {\n return cb(err);\n }\n copyDirContents(files);\n });\n }\n\n let mode = 0o777;\n\n // from linux's rename(2) manpage: oldpath can specify a\n // directory. In this case, newpath must either not exist, or\n // it must specify an empty directory.\n if (oldStats!.isDirectory()) {\n if (newErr) {\n if (newErr.errno !== ErrorCode.ENOENT) {\n return cb(newErr);\n }\n\n return this._writable.exists(oldPath, (exists: boolean) => {\n // simple case - both old and new are on the writable layer\n if (exists) {\n return this._writable.rename(oldPath, newPath, cb);\n }\n\n this._writable.mkdir(newPath, mode, (mkdirErr?: ApiError) => {\n if (mkdirErr) {\n return cb(mkdirErr);\n }\n\n this._readable.readdir(oldPath, (err: ApiError, files?: string[]) => {\n if (err) {\n return cb();\n }\n copyDirContents(files!);\n });\n });\n });\n }\n\n mode = newStats!.mode;\n if (!newStats!.isDirectory()) {\n return cb(ApiError.ENOTDIR(newPath));\n }\n\n this.readdir(newPath, (readdirErr: ApiError, files?: string[]) => {\n if (files && files.length) {\n return cb(ApiError.ENOTEMPTY(newPath));\n }\n\n this._readable.readdir(oldPath, (err: ApiError, files?: string[]) => {\n if (err) {\n return cb();\n }\n copyDirContents(files!);\n });\n });\n }\n\n if (newStats && newStats.isDirectory()) {\n return cb(ApiError.EISDIR(newPath));\n }\n\n this.readFile(oldPath, null, getFlag('r'), (err: ApiError, data?: any) => {\n if (err) {\n return cb(err);\n }\n\n return this.writeFile(newPath, data, null, getFlag('w'), oldStats!.mode, (err: ApiError) => {\n if (err) {\n return cb(err);\n }\n return this.unlink(oldPath, cb);\n });\n });\n });\n });\n }\n\n public renameSync(oldPath: string, newPath: string): void {\n this.checkInitialized();\n this.checkPath(oldPath);\n this.checkPath(newPath);\n if (oldPath === deletionLogPath || newPath === deletionLogPath) {\n throw ApiError.EPERM('Cannot rename deletion log.');\n }\n // Write newPath using oldPath's contents, delete oldPath.\n const oldStats = this.statSync(oldPath, false);\n if (oldStats.isDirectory()) {\n // Optimization: Don't bother moving if old === new.\n if (oldPath === newPath) {\n return;\n }\n\n let mode = 0o777;\n if (this.existsSync(newPath)) {\n const stats = this.statSync(newPath, false);\n mode = stats.mode;\n if (stats.isDirectory()) {\n if (this.readdirSync(newPath).length > 0) {\n throw ApiError.ENOTEMPTY(newPath);\n }\n } else {\n throw ApiError.ENOTDIR(newPath);\n }\n }\n\n // Take care of writable first. Move any files there, or create an empty directory\n // if it doesn't exist.\n if (this._writable.existsSync(oldPath)) {\n this._writable.renameSync(oldPath, newPath);\n } else if (!this._writable.existsSync(newPath)) {\n this._writable.mkdirSync(newPath, mode);\n }\n\n // Need to move *every file/folder* currently stored on readable to its new location\n // on writable.\n if (this._readable.existsSync(oldPath)) {\n this._readable.readdirSync(oldPath).forEach((name) => {\n // Recursion! Should work for any nested files / folders.\n this.renameSync(path.resolve(oldPath, name), path.resolve(newPath, name));\n });\n }\n } else {\n if (this.existsSync(newPath) && this.statSync(newPath, false).isDirectory()) {\n throw ApiError.EISDIR(newPath);\n }\n\n this.writeFileSync(newPath,\n this.readFileSync(oldPath, null, getFlag('r')), null, getFlag('w'), oldStats.mode);\n }\n\n if (oldPath !== newPath && this.existsSync(oldPath)) {\n this.unlinkSync(oldPath);\n }\n }\n\n public stat(p: string, isLstat: boolean, cb: BFSCallback): void {\n if (!this.checkInitAsync(cb)) {\n return;\n }\n this._writable.stat(p, isLstat, (err: ApiError, stat?: Stats) => {\n if (err && err.errno === ErrorCode.ENOENT) {\n if (this._deletedFiles[p]) {\n cb(ApiError.ENOENT(p));\n }\n this._readable.stat(p, isLstat, (err: ApiError, stat?: Stats) => {\n if (stat) {\n // Make the oldStat's mode writable. Preserve the topmost\n // part of the mode, which specifies if it is a file or a\n // directory.\n stat = stat.clone();\n stat.mode = makeModeWritable(stat.mode);\n }\n cb(err, stat);\n });\n } else {\n cb(err, stat);\n }\n });\n }\n\n public statSync(p: string, isLstat: boolean): Stats {\n this.checkInitialized();\n try {\n return this._writable.statSync(p, isLstat);\n } catch (e) {\n if (this._deletedFiles[p]) {\n throw ApiError.ENOENT(p);\n }\n const oldStat = this._readable.statSync(p, isLstat).clone();\n // Make the oldStat's mode writable. Preserve the topmost part of the\n // mode, which specifies if it is a file or a directory.\n oldStat.mode = makeModeWritable(oldStat.mode);\n return oldStat;\n }\n }\n\n public open(p: string, flag: FileFlag, mode: number, cb: BFSCallback): void {\n if (!this.checkInitAsync(cb) || this.checkPathAsync(p, cb)) {\n return;\n }\n this.stat(p, false, (err: ApiError, stats?: Stats) => {\n if (stats) {\n switch (flag.pathExistsAction()) {\n case ActionType.TRUNCATE_FILE:\n return this.createParentDirectoriesAsync(p, (err?: ApiError) => {\n if (err) {\n return cb(err);\n }\n this._writable.open(p, flag, mode, cb);\n });\n case ActionType.NOP:\n return this._writable.exists(p, (exists: boolean) => {\n if (exists) {\n this._writable.open(p, flag, mode, cb);\n } else {\n // at this point we know the stats object we got is from\n // the readable FS.\n stats = stats!.clone();\n stats.mode = mode;\n this._readable.readFile(p, null, getFlag('r'), (readFileErr: ApiError, data?: any) => {\n if (readFileErr) {\n return cb(readFileErr);\n }\n if (stats!.size === -1) {\n stats!.size = data.length;\n }\n const f = new OverlayFile(this, p, flag, stats!, data);\n cb(null, f);\n });\n }\n });\n default:\n return cb(ApiError.EEXIST(p));\n }\n } else {\n switch (flag.pathNotExistsAction()) {\n case ActionType.CREATE_FILE:\n return this.createParentDirectoriesAsync(p, (err?: ApiError) => {\n if (err) {\n return cb(err);\n }\n return this._writable.open(p, flag, mode, cb);\n });\n default:\n return cb(ApiError.ENOENT(p));\n }\n }\n });\n }\n\n public openSync(p: string, flag: FileFlag, mode: number): File {\n this.checkInitialized();\n this.checkPath(p);\n if (p === deletionLogPath) {\n throw ApiError.EPERM('Cannot open deletion log.');\n }\n if (this.existsSync(p)) {\n switch (flag.pathExistsAction()) {\n case ActionType.TRUNCATE_FILE:\n this.createParentDirectories(p);\n return this._writable.openSync(p, flag, mode);\n case ActionType.NOP:\n if (this._writable.existsSync(p)) {\n return this._writable.openSync(p, flag, mode);\n } else {\n // Create an OverlayFile.\n const buf = this._readable.readFileSync(p, null, getFlag('r'));\n const stats = this._readable.statSync(p, false).clone();\n stats.mode = mode;\n return new OverlayFile(this, p, flag, stats, buf);\n }\n default:\n throw ApiError.EEXIST(p);\n }\n } else {\n switch (flag.pathNotExistsAction()) {\n case ActionType.CREATE_FILE:\n this.createParentDirectories(p);\n return this._writable.openSync(p, flag, mode);\n default:\n throw ApiError.ENOENT(p);\n }\n }\n }\n\n public unlink(p: string, cb: BFSOneArgCallback): void {\n if (!this.checkInitAsync(cb) || this.checkPathAsync(p, cb)) {\n return;\n }\n this.exists(p, (exists: boolean) => {\n if (!exists) {\n return cb(ApiError.ENOENT(p));\n }\n\n this._writable.exists(p, (writableExists: boolean) => {\n if (writableExists) {\n return this._writable.unlink(p, (err: ApiError) => {\n if (err) {\n return cb(err);\n }\n\n this.exists(p, (readableExists: boolean) => {\n if (readableExists) {\n this.deletePath(p);\n }\n cb(null);\n });\n });\n } else {\n // if this only exists on the readable FS, add it to the\n // delete map.\n this.deletePath(p);\n cb(null);\n }\n });\n });\n }\n\n public unlinkSync(p: string): void {\n this.checkInitialized();\n this.checkPath(p);\n if (this.existsSync(p)) {\n if (this._writable.existsSync(p)) {\n this._writable.unlinkSync(p);\n }\n\n // if it still exists add to the delete log\n if (this.existsSync(p)) {\n this.deletePath(p);\n }\n } else {\n throw ApiError.ENOENT(p);\n }\n }\n\n public rmdir(p: string, cb: BFSOneArgCallback): void {\n if (!this.checkInitAsync(cb)) {\n return;\n }\n\n const rmdirLower = (): void => {\n this.readdir(p, (err: ApiError, files: string[]): void => {\n if (err) {\n return cb(err);\n }\n\n if (files.length) {\n return cb(ApiError.ENOTEMPTY(p));\n }\n\n this.deletePath(p);\n cb(null);\n });\n };\n\n this.exists(p, (exists: boolean) => {\n if (!exists) {\n return cb(ApiError.ENOENT(p));\n }\n\n this._writable.exists(p, (writableExists: boolean) => {\n if (writableExists) {\n this._writable.rmdir(p, (err: ApiError) => {\n if (err) {\n return cb(err);\n }\n\n this._readable.exists(p, (readableExists: boolean) => {\n if (readableExists) {\n rmdirLower();\n } else {\n cb();\n }\n });\n });\n } else {\n rmdirLower();\n }\n });\n });\n }\n\n public rmdirSync(p: string): void {\n this.checkInitialized();\n if (this.existsSync(p)) {\n if (this._writable.existsSync(p)) {\n this._writable.rmdirSync(p);\n }\n if (this.existsSync(p)) {\n // Check if directory is empty.\n if (this.readdirSync(p).length > 0) {\n throw ApiError.ENOTEMPTY(p);\n } else {\n this.deletePath(p);\n }\n }\n } else {\n throw ApiError.ENOENT(p);\n }\n }\n\n public mkdir(p: string, mode: number, cb: BFSCallback): void {\n if (!this.checkInitAsync(cb)) {\n return;\n }\n this.exists(p, (exists: boolean) => {\n if (exists) {\n return cb(ApiError.EEXIST(p));\n }\n\n // The below will throw should any of the parent directories\n // fail to exist on _writable.\n this.createParentDirectoriesAsync(p, (err: ApiError) => {\n if (err) {\n return cb(err);\n }\n this._writable.mkdir(p, mode, cb);\n });\n });\n }\n\n public mkdirSync(p: string, mode: number): void {\n this.checkInitialized();\n if (this.existsSync(p)) {\n throw ApiError.EEXIST(p);\n } else {\n // The below will throw should any of the parent directories fail to exist\n // on _writable.\n this.createParentDirectories(p);\n this._writable.mkdirSync(p, mode);\n }\n }\n\n public readdir(p: string, cb: BFSCallback): void {\n if (!this.checkInitAsync(cb)) {\n return;\n }\n this.stat(p, false, (err: ApiError, dirStats?: Stats) => {\n if (err) {\n return cb(err);\n }\n\n if (!dirStats!.isDirectory()) {\n return cb(ApiError.ENOTDIR(p));\n }\n\n this._writable.readdir(p, (err: ApiError, wFiles: string[]) => {\n if (err && err.code !== 'ENOENT') {\n return cb(err);\n } else if (err || !wFiles) {\n wFiles = [];\n }\n\n this._readable.readdir(p, (err: ApiError, rFiles: string[]) => {\n // if the directory doesn't exist on the lower FS set rFiles\n // here to simplify the following code.\n if (err || !rFiles) {\n rFiles = [];\n }\n\n // Readdir in both, check delete log on read-only file system's files, merge, return.\n const seenMap: {[name: string]: boolean} = {};\n const filtered: string[] = wFiles.concat(rFiles.filter((fPath: string) =>\n !this._deletedFiles[`${p}/${fPath}`]\n )).filter((fPath: string) => {\n // Remove duplicates.\n const result = !seenMap[fPath];\n seenMap[fPath] = true;\n return result;\n });\n cb(null, filtered);\n });\n });\n });\n }\n\n public readdirSync(p: string): string[] {\n this.checkInitialized();\n const dirStats = this.statSync(p, false);\n if (!dirStats.isDirectory()) {\n throw ApiError.ENOTDIR(p);\n }\n\n // Readdir in both, check delete log on RO file system's listing, merge, return.\n let contents: string[] = [];\n try {\n contents = contents.concat(this._writable.readdirSync(p));\n } catch (e) {\n // NOP.\n }\n try {\n contents = contents.concat(this._readable.readdirSync(p).filter((fPath: string) =>\n !this._deletedFiles[`${p}/${fPath}`]\n ));\n } catch (e) {\n // NOP.\n }\n const seenMap: {[name: string]: boolean} = {};\n return contents.filter((fileP: string) => {\n const result = !seenMap[fileP];\n seenMap[fileP] = true;\n return result;\n });\n }\n\n public exists(p: string, cb: (exists: boolean) => void): void {\n // Cannot pass an error back to callback, so throw an exception instead\n // if not initialized.\n this.checkInitialized();\n this._writable.exists(p, (existsWritable: boolean) => {\n if (existsWritable) {\n return cb(true);\n }\n\n this._readable.exists(p, (existsReadable: boolean) => {\n cb(existsReadable && this._deletedFiles[p] !== true);\n });\n });\n }\n\n public existsSync(p: string): boolean {\n this.checkInitialized();\n return this._writable.existsSync(p) || (this._readable.existsSync(p) && this._deletedFiles[p] !== true);\n }\n\n public chmod(p: string, isLchmod: boolean, mode: number, cb: BFSOneArgCallback): void {\n if (!this.checkInitAsync(cb)) {\n return;\n }\n this.operateOnWritableAsync(p, (err?: ApiError) => {\n if (err) {\n return cb(err);\n } else {\n this._writable.chmod(p, isLchmod, mode, cb);\n }\n });\n }\n\n public chmodSync(p: string, isLchmod: boolean, mode: number): void {\n this.checkInitialized();\n this.operateOnWritable(p, () => {\n this._writable.chmodSync(p, isLchmod, mode);\n });\n }\n\n public chown(p: string, isLchmod: boolean, uid: number, gid: number, cb: BFSOneArgCallback): void {\n if (!this.checkInitAsync(cb)) {\n return;\n }\n this.operateOnWritableAsync(p, (err?: ApiError) => {\n if (err) {\n return cb(err);\n } else {\n this._writable.chown(p, isLchmod, uid, gid, cb);\n }\n });\n }\n\n public chownSync(p: string, isLchown: boolean, uid: number, gid: number): void {\n this.checkInitialized();\n this.operateOnWritable(p, () => {\n this._writable.chownSync(p, isLchown, uid, gid);\n });\n }\n\n public utimes(p: string, atime: Date, mtime: Date, cb: BFSOneArgCallback): void {\n if (!this.checkInitAsync(cb)) {\n return;\n }\n this.operateOnWritableAsync(p, (err?: ApiError) => {\n if (err) {\n return cb(err);\n } else {\n this._writable.utimes(p, atime, mtime, cb);\n }\n });\n }\n\n public utimesSync(p: string, atime: Date, mtime: Date): void {\n this.checkInitialized();\n this.operateOnWritable(p, () => {\n this._writable.utimesSync(p, atime, mtime);\n });\n }\n\n private deletePath(p: string): void {\n this._deletedFiles[p] = true;\n this.updateLog(`d${p}\\n`);\n }\n\n private updateLog(addition: string) {\n this._deleteLog += addition;\n if (this._deleteLogUpdatePending) {\n this._deleteLogUpdateNeeded = true;\n } else {\n this._deleteLogUpdatePending = true;\n this._writable.writeFile(deletionLogPath, this._deleteLog, 'utf8', FileFlag.getFileFlag('w'), 0o644, (e) => {\n this._deleteLogUpdatePending = false;\n if (e) {\n this._deleteLogError = e;\n } else if (this._deleteLogUpdateNeeded) {\n this._deleteLogUpdateNeeded = false;\n this.updateLog('');\n }\n });\n }\n }\n\n private _reparseDeletionLog(): void {\n this._deletedFiles = {};\n this._deleteLog.split('\\n').forEach((path: string) => {\n // If the log entry begins w/ 'd', it's a deletion.\n this._deletedFiles[path.slice(1)] = path.slice(0, 1) === 'd';\n });\n }\n\n private checkInitialized(): void {\n if (!this._isInitialized) {\n throw new ApiError(ErrorCode.EPERM, \"OverlayFS is not initialized. Please initialize OverlayFS using its initialize() method before using it.\");\n } else if (this._deleteLogError !== null) {\n const e = this._deleteLogError;\n this._deleteLogError = null;\n throw e;\n }\n }\n\n private checkInitAsync(cb: BFSOneArgCallback): boolean {\n if (!this._isInitialized) {\n cb(new ApiError(ErrorCode.EPERM, \"OverlayFS is not initialized. Please initialize OverlayFS using its initialize() method before using it.\"));\n return false;\n } else if (this._deleteLogError !== null) {\n const e = this._deleteLogError;\n this._deleteLogError = null;\n cb(e);\n return false;\n }\n return true;\n }\n\n private checkPath(p: string): void {\n if (p === deletionLogPath) {\n throw ApiError.EPERM(p);\n }\n }\n\n private checkPathAsync(p: string, cb: BFSOneArgCallback): boolean {\n if (p === deletionLogPath) {\n cb(ApiError.EPERM(p));\n return true;\n }\n return false;\n }\n\n private createParentDirectoriesAsync(p: string, cb: BFSOneArgCallback): void {\n let parent = path.dirname(p);\n const toCreate: string[] = [];\n const self = this;\n\n this._writable.stat(parent, false, statDone);\n function statDone(err: ApiError, stat?: Stats): void {\n if (err) {\n toCreate.push(parent);\n parent = path.dirname(parent);\n self._writable.stat(parent, false, statDone);\n } else {\n createParents();\n }\n }\n\n function createParents(): void {\n if (!toCreate.length) {\n return cb();\n }\n\n const dir = toCreate.pop();\n self._readable.stat(dir!, false, (err: ApiError, stats?: Stats) => {\n // stop if we couldn't read the dir\n if (!stats) {\n return cb();\n }\n\n self._writable.mkdir(dir!, stats.mode, (err?: ApiError) => {\n if (err) {\n return cb(err);\n }\n createParents();\n });\n });\n }\n }\n\n /**\n * With the given path, create the needed parent directories on the writable storage\n * should they not exist. Use modes from the read-only storage.\n */\n private createParentDirectories(p: string): void {\n let parent = path.dirname(p), toCreate: string[] = [];\n while (!this._writable.existsSync(parent)) {\n toCreate.push(parent);\n parent = path.dirname(parent);\n }\n toCreate = toCreate.reverse();\n\n toCreate.forEach((p: string) => {\n this._writable.mkdirSync(p, this.statSync(p, false).mode);\n });\n }\n\n /**\n * Helper function:\n * - Ensures p is on writable before proceeding. Throws an error if it doesn't exist.\n * - Calls f to perform operation on writable.\n */\n private operateOnWritable(p: string, f: () => void): void {\n if (this.existsSync(p)) {\n if (!this._writable.existsSync(p)) {\n // File is on readable storage. Copy to writable storage before\n // changing its mode.\n this.copyToWritable(p);\n }\n f();\n } else {\n throw ApiError.ENOENT(p);\n }\n }\n\n private operateOnWritableAsync(p: string, cb: BFSOneArgCallback): void {\n this.exists(p, (exists: boolean) => {\n if (!exists) {\n return cb(ApiError.ENOENT(p));\n }\n\n this._writable.exists(p, (existsWritable: boolean) => {\n if (existsWritable) {\n cb();\n } else {\n return this.copyToWritableAsync(p, cb);\n }\n });\n });\n }\n\n /**\n * Copy from readable to writable storage.\n * PRECONDITION: File does not exist on writable storage.\n */\n private copyToWritable(p: string): void {\n const pStats = this.statSync(p, false);\n if (pStats.isDirectory()) {\n this._writable.mkdirSync(p, pStats.mode);\n } else {\n this.writeFileSync(p,\n this._readable.readFileSync(p, null, getFlag('r')), null,\n getFlag('w'), this.statSync(p, false).mode);\n }\n }\n\n private copyToWritableAsync(p: string, cb: BFSOneArgCallback): void {\n this.stat(p, false, (err: ApiError, pStats?: Stats) => {\n if (err) {\n return cb(err);\n }\n\n if (pStats!.isDirectory()) {\n return this._writable.mkdir(p, pStats!.mode, cb);\n }\n\n // need to copy file.\n this._readable.readFile(p, null, getFlag('r'), (err: ApiError, data?: Buffer) => {\n if (err) {\n return cb(err);\n }\n\n this.writeFile(p, data, null, getFlag('w'), pStats!.mode, cb);\n });\n });\n }\n}\n\n/**\n * Configuration options for OverlayFS instances.\n */\nexport interface OverlayFSOptions {\n // The file system to write modified files to.\n writable: FileSystem;\n // The file system that initially populates this file system.\n readable: FileSystem;\n}\n\n/**\n * OverlayFS makes a read-only filesystem writable by storing writes on a second,\n * writable file system. Deletes are persisted via metadata stored on the writable\n * file system.\n */\nexport default class OverlayFS extends LockedFS {\n public static readonly Name = \"OverlayFS\";\n\n public static readonly Options: FileSystemOptions = {\n writable: {\n type: \"object\",\n description: \"The file system to write modified files to.\"\n },\n readable: {\n type: \"object\",\n description: \"The file system that initially populates this file system.\"\n }\n };\n\n /**\n * Constructs and initializes an OverlayFS instance with the given options.\n */\n public static Create(opts: OverlayFSOptions, cb: BFSCallback): void {\n try {\n const fs = new OverlayFS(opts.writable, opts.readable, false);\n fs.initialize((e?) => {\n cb(e, fs);\n }, false);\n } catch (e) {\n cb(e);\n }\n }\n public static isAvailable(): boolean {\n return UnlockedOverlayFS.isAvailable();\n }\n\n /**\n * **Deprecated. Please use OverlayFS.Create() method instead.**\n * @param writable The file system to write modified files to.\n * @param readable The file system that initially populates this file system.\n */\n constructor(writable: FileSystem, readable: FileSystem, deprecateMsg = true) {\n super(new UnlockedOverlayFS(writable, readable));\n deprecationMessage(deprecateMsg, OverlayFS.Name, {readable: \"readable file system\", writable: \"writable file system\"});\n }\n\n /**\n * **Deprecated. Please use OverlayFS.Create() to construct and initialize OverlayFS instances.**\n */\n public initialize(cb: BFSOneArgCallback, deprecateMsg = true): void {\n if (deprecateMsg) {\n console.warn(`[OverlayFS] OverlayFS.initialize() is deprecated and will be removed in the next major release. Please use 'OverlayFS.Create({readable: readable file system instance, writable: writable file system instance}, cb)' to create and initialize OverlayFS instances.`);\n }\n super.initialize(cb);\n }\n\n public getOverlayedFileSystems(): { readable: FileSystem; writable: FileSystem; } {\n return super.getFSUnlocked().getOverlayedFileSystems();\n }\n\n public unwrap(): UnlockedOverlayFS {\n return super.getFSUnlocked();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/OverlayFS.ts","import {BaseFileSystem, FileSystem, BFSOneArgCallback, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport {FileFlag} from '../core/file_flag';\nimport {buffer2ArrayBuffer, arrayBuffer2Buffer, emptyBuffer, deprecationMessage} from '../core/util';\nimport {File, BaseFile} from '../core/file';\nimport {default as Stats} from '../core/node_fs_stats';\nimport PreloadFile from '../generic/preload_file';\nimport global from '../core/global';\nimport fs from '../core/node_fs';\n\n/**\n * @hidden\n */\ndeclare const importScripts: Function;\n\n/**\n * @hidden\n */\ninterface IBrowserFSMessage {\n browserfsMessage: boolean;\n}\n\n/**\n * @hidden\n */\nenum SpecialArgType {\n // Callback\n CB,\n // File descriptor\n FD,\n // API error\n API_ERROR,\n // Stats object\n STATS,\n // Initial probe for file system information.\n PROBE,\n // FileFlag object.\n FILEFLAG,\n // Buffer object.\n BUFFER,\n // Generic Error object.\n ERROR\n}\n\n/**\n * @hidden\n */\ninterface ISpecialArgument {\n type: SpecialArgType;\n}\n\n/**\n * @hidden\n */\ninterface IProbeResponse extends ISpecialArgument {\n isReadOnly: boolean;\n supportsLinks: boolean;\n supportsProps: boolean;\n}\n\n/**\n * @hidden\n */\ninterface ICallbackArgument extends ISpecialArgument {\n // The callback ID.\n id: number;\n}\n\n/**\n * Converts callback arguments into ICallbackArgument objects, and back\n * again.\n * @hidden\n */\nclass CallbackArgumentConverter {\n private _callbacks: { [id: number]: Function } = {};\n private _nextId: number = 0;\n\n public toRemoteArg(cb: Function): ICallbackArgument {\n const id = this._nextId++;\n this._callbacks[id] = cb;\n return {\n type: SpecialArgType.CB,\n id: id\n };\n }\n\n public toLocalArg(id: number): Function {\n const cb = this._callbacks[id];\n delete this._callbacks[id];\n return cb;\n }\n}\n\n/**\n * @hidden\n */\ninterface IFileDescriptorArgument extends ISpecialArgument {\n // The file descriptor's id on the remote side.\n id: number;\n // The entire file's data, as an array buffer.\n data: ArrayBuffer;\n // The file's stat object, as an array buffer.\n stat: ArrayBuffer;\n // The path to the file.\n path: string;\n // The flag of the open file descriptor.\n flag: string;\n}\n\n/**\n * @hidden\n */\nclass FileDescriptorArgumentConverter {\n private _fileDescriptors: { [id: number]: File } = {};\n private _nextId: number = 0;\n\n public toRemoteArg(fd: File, p: string, flag: FileFlag, cb: BFSCallback): void {\n const id = this._nextId++;\n let data: ArrayBuffer;\n let stat: ArrayBuffer;\n this._fileDescriptors[id] = fd;\n\n // Extract needed information asynchronously.\n fd.stat((err, stats) => {\n if (err) {\n cb(err);\n } else {\n stat = bufferToTransferrableObject(stats!.toBuffer());\n // If it's a readable flag, we need to grab contents.\n if (flag.isReadable()) {\n fd.read(Buffer.alloc(stats!.size), 0, stats!.size, 0, (err?: ApiError | null, bytesRead?: number, buff?: Buffer) => {\n if (err) {\n cb(err);\n } else {\n data = bufferToTransferrableObject(buff!);\n cb(null, {\n type: SpecialArgType.FD,\n id: id,\n data: data,\n stat: stat,\n path: p,\n flag: flag.getFlagString()\n });\n }\n });\n } else {\n // File is not readable, which means writing to it will append or\n // truncate/replace existing contents. Return an empty arraybuffer.\n cb(null, {\n type: SpecialArgType.FD,\n id: id,\n data: new ArrayBuffer(0),\n stat: stat,\n path: p,\n flag: flag.getFlagString()\n });\n }\n }\n });\n }\n\n public applyFdAPIRequest(request: IAPIRequest, cb: BFSOneArgCallback): void {\n const fdArg = request.args[0];\n this._applyFdChanges(fdArg, (err, fd?) => {\n if (err) {\n cb(err);\n } else {\n // Apply method on now-changed file descriptor.\n ( fd)[request.method]((e?: ApiError) => {\n if (request.method === 'close') {\n delete this._fileDescriptors[fdArg.id];\n }\n cb(e);\n });\n }\n });\n }\n\n private _applyFdChanges(remoteFd: IFileDescriptorArgument, cb: BFSCallback): void {\n const fd = this._fileDescriptors[remoteFd.id],\n data = transferrableObjectToBuffer(remoteFd.data),\n remoteStats = Stats.fromBuffer(transferrableObjectToBuffer(remoteFd.stat));\n\n // Write data if the file is writable.\n const flag = FileFlag.getFileFlag(remoteFd.flag);\n if (flag.isWriteable()) {\n // Appendable: Write to end of file.\n // Writeable: Replace entire contents of file.\n fd.write(data, 0, data.length, flag.isAppendable() ? fd.getPos()! : 0, (e?: ApiError | null) => {\n function applyStatChanges() {\n // Check if mode changed.\n fd.stat((e, stats?) => {\n if (e) {\n cb(e);\n } else {\n if (stats!.mode !== remoteStats.mode) {\n fd.chmod(remoteStats.mode, (e: any) => {\n cb(e, fd);\n });\n } else {\n cb(e, fd);\n }\n }\n });\n }\n if (e) {\n cb(e);\n } else {\n // If writeable & not appendable, we need to ensure file contents are\n // identical to those from the remote FD. Thus, we truncate to the\n // length of the remote file.\n if (!flag.isAppendable()) {\n fd.truncate(data.length, () => {\n applyStatChanges();\n });\n } else {\n applyStatChanges();\n }\n }\n });\n } else {\n cb(null, fd);\n }\n }\n}\n\n/**\n * @hidden\n */\ninterface IAPIErrorArgument extends ISpecialArgument {\n // The error object, as an array buffer.\n errorData: ArrayBuffer;\n}\n\n/**\n * @hidden\n */\nfunction apiErrorLocal2Remote(e: ApiError): IAPIErrorArgument {\n return {\n type: SpecialArgType.API_ERROR,\n errorData: bufferToTransferrableObject(e.writeToBuffer())\n };\n}\n\n/**\n * @hidden\n */\nfunction apiErrorRemote2Local(e: IAPIErrorArgument): ApiError {\n return ApiError.fromBuffer(transferrableObjectToBuffer(e.errorData));\n}\n\n/**\n * @hidden\n */\ninterface IErrorArgument extends ISpecialArgument {\n // The name of the error (e.g. 'TypeError').\n name: string;\n // The message associated with the error.\n message: string;\n // The stack associated with the error.\n stack: string;\n}\n\n/**\n * @hidden\n */\nfunction errorLocal2Remote(e: Error): IErrorArgument {\n return {\n type: SpecialArgType.ERROR,\n name: e.name,\n message: e.message,\n stack: e.stack!\n };\n}\n\n/**\n * @hidden\n */\nfunction errorRemote2Local(e: IErrorArgument): Error {\n let cnstr: {\n new (msg: string): Error;\n } = global[e.name];\n if (typeof(cnstr) !== 'function') {\n cnstr = Error;\n }\n const err = new cnstr(e.message);\n err.stack = e.stack;\n return err;\n}\n\n/**\n * @hidden\n */\ninterface IStatsArgument extends ISpecialArgument {\n // The stats object as an array buffer.\n statsData: ArrayBuffer;\n}\n\n/**\n * @hidden\n */\nfunction statsLocal2Remote(stats: Stats): IStatsArgument {\n return {\n type: SpecialArgType.STATS,\n statsData: bufferToTransferrableObject(stats.toBuffer())\n };\n}\n\n/**\n * @hidden\n */\nfunction statsRemote2Local(stats: IStatsArgument): Stats {\n return Stats.fromBuffer(transferrableObjectToBuffer(stats.statsData));\n}\n\n/**\n * @hidden\n */\ninterface IFileFlagArgument extends ISpecialArgument {\n flagStr: string;\n}\n\n/**\n * @hidden\n */\nfunction fileFlagLocal2Remote(flag: FileFlag): IFileFlagArgument {\n return {\n type: SpecialArgType.FILEFLAG,\n flagStr: flag.getFlagString()\n };\n}\n\n/**\n * @hidden\n */\nfunction fileFlagRemote2Local(remoteFlag: IFileFlagArgument): FileFlag {\n return FileFlag.getFileFlag(remoteFlag.flagStr);\n}\n\n/**\n * @hidden\n */\ninterface IBufferArgument extends ISpecialArgument {\n data: ArrayBuffer;\n}\n\n/**\n * @hidden\n */\nfunction bufferToTransferrableObject(buff: Buffer): ArrayBuffer {\n return buffer2ArrayBuffer(buff);\n}\n\n/**\n * @hidden\n */\nfunction transferrableObjectToBuffer(buff: ArrayBuffer): Buffer {\n return arrayBuffer2Buffer(buff);\n}\n\n/**\n * @hidden\n */\nfunction bufferLocal2Remote(buff: Buffer): IBufferArgument {\n return {\n type: SpecialArgType.BUFFER,\n data: bufferToTransferrableObject(buff)\n };\n}\n\n/**\n * @hidden\n */\nfunction bufferRemote2Local(buffArg: IBufferArgument): Buffer {\n return transferrableObjectToBuffer(buffArg.data);\n}\n\n/**\n * @hidden\n */\ninterface IAPIRequest extends IBrowserFSMessage {\n method: string;\n args: Array;\n}\n\n/**\n * @hidden\n */\nfunction isAPIRequest(data: any): data is IAPIRequest {\n return data && typeof data === 'object' && data.hasOwnProperty('browserfsMessage') && data['browserfsMessage'];\n}\n\n/**\n * @hidden\n */\ninterface IAPIResponse extends IBrowserFSMessage {\n cbId: number;\n args: Array;\n}\n\n/**\n * @hidden\n */\nfunction isAPIResponse(data: any): data is IAPIResponse {\n return data && typeof data === 'object' && data.hasOwnProperty('browserfsMessage') && data['browserfsMessage'];\n}\n\n/**\n * Represents a remote file in a different worker/thread.\n */\nclass WorkerFile extends PreloadFile {\n private _remoteFdId: number;\n\n constructor(_fs: WorkerFS, _path: string, _flag: FileFlag, _stat: Stats, remoteFdId: number, contents?: Buffer) {\n super(_fs, _path, _flag, _stat, contents);\n this._remoteFdId = remoteFdId;\n }\n\n public getRemoteFdId() {\n return this._remoteFdId;\n }\n\n /**\n * @hidden\n */\n public toRemoteArg(): IFileDescriptorArgument {\n return {\n type: SpecialArgType.FD,\n id: this._remoteFdId,\n data: bufferToTransferrableObject(this.getBuffer()),\n stat: bufferToTransferrableObject(this.getStats().toBuffer()),\n path: this.getPath(),\n flag: this.getFlag().getFlagString()\n };\n }\n\n public sync(cb: BFSOneArgCallback): void {\n this._syncClose('sync', cb);\n }\n\n public close(cb: BFSOneArgCallback): void {\n this._syncClose('close', cb);\n }\n\n private _syncClose(type: string, cb: BFSOneArgCallback): void {\n if (this.isDirty()) {\n ( this._fs).syncClose(type, this, (e?: ApiError) => {\n if (!e) {\n this.resetDirty();\n }\n cb(e);\n });\n } else {\n cb();\n }\n }\n}\n\nexport interface WorkerFSOptions {\n // The target worker that you want to connect to, or the current worker if in a worker context.\n worker: Worker;\n}\n\n/**\n * WorkerFS lets you access a BrowserFS instance that is running in a different\n * JavaScript context (e.g. access BrowserFS in one of your WebWorkers, or\n * access BrowserFS running on the main page from a WebWorker).\n *\n * For example, to have a WebWorker access files in the main browser thread,\n * do the following:\n *\n * MAIN BROWSER THREAD:\n *\n * ```javascript\n * // Listen for remote file system requests.\n * BrowserFS.FileSystem.WorkerFS.attachRemoteListener(webWorkerObject);\n * ```\n *\n * WEBWORKER THREAD:\n *\n * ```javascript\n * // Set the remote file system as the root file system.\n * BrowserFS.configure({ fs: \"WorkerFS\", options: { worker: self }}, function(e) {\n * // Ready!\n * });\n * ```\n *\n * Note that synchronous operations are not permitted on the WorkerFS, regardless\n * of the configuration option of the remote FS.\n */\nexport default class WorkerFS extends BaseFileSystem implements FileSystem {\n public static readonly Name = \"WorkerFS\";\n\n public static readonly Options: FileSystemOptions = {\n worker: {\n type: \"object\",\n description: \"The target worker that you want to connect to, or the current worker if in a worker context.\",\n validator: function(v: object, cb: BFSOneArgCallback): void {\n // Check for a `postMessage` function.\n if (( v)['postMessage']) {\n cb();\n } else {\n cb(new ApiError(ErrorCode.EINVAL, `option must be a Web Worker instance.`));\n }\n }\n }\n };\n\n public static Create(opts: WorkerFSOptions, cb: BFSCallback): void {\n const fs = new WorkerFS(opts.worker, false);\n fs.initialize(() => {\n cb(null, fs);\n });\n }\n public static isAvailable(): boolean {\n return typeof(importScripts) !== 'undefined' || typeof(Worker) !== 'undefined';\n }\n\n /**\n * Attaches a listener to the remote worker for file system requests.\n */\n public static attachRemoteListener(worker: Worker) {\n const fdConverter = new FileDescriptorArgumentConverter();\n\n function argLocal2Remote(arg: any, requestArgs: any[], cb: BFSCallback): void {\n switch (typeof arg) {\n case 'object':\n if (arg instanceof Stats) {\n cb(null, statsLocal2Remote(arg));\n } else if (arg instanceof ApiError) {\n cb(null, apiErrorLocal2Remote(arg));\n } else if (arg instanceof BaseFile) {\n // Pass in p and flags from original request.\n cb(null, fdConverter.toRemoteArg( arg, requestArgs[0], requestArgs[1], cb));\n } else if (arg instanceof FileFlag) {\n cb(null, fileFlagLocal2Remote(arg));\n } else if (arg instanceof Buffer) {\n cb(null, bufferLocal2Remote(arg));\n } else if (arg instanceof Error) {\n cb(null, errorLocal2Remote(arg));\n } else {\n cb(null, arg);\n }\n break;\n default:\n cb(null, arg);\n break;\n }\n }\n\n function argRemote2Local(arg: any, fixedRequestArgs: any[]): any {\n if (!arg) {\n return arg;\n }\n switch (typeof arg) {\n case 'object':\n if (typeof arg['type'] === 'number') {\n const specialArg = arg;\n switch (specialArg.type) {\n case SpecialArgType.CB:\n const cbId = ( arg).id;\n return function() {\n let i: number;\n const fixedArgs = new Array(arguments.length);\n let message: IAPIResponse,\n countdown = arguments.length;\n\n function abortAndSendError(err: ApiError) {\n if (countdown > 0) {\n countdown = -1;\n message = {\n browserfsMessage: true,\n cbId: cbId,\n args: [apiErrorLocal2Remote(err)]\n };\n worker.postMessage(message);\n }\n }\n\n for (i = 0; i < arguments.length; i++) {\n // Capture i and argument.\n ((i: number, arg: any) => {\n argLocal2Remote(arg, fixedRequestArgs, (err, fixedArg?) => {\n fixedArgs[i] = fixedArg;\n if (err) {\n abortAndSendError(err);\n } else if (--countdown === 0) {\n message = {\n browserfsMessage: true,\n cbId: cbId,\n args: fixedArgs\n };\n worker.postMessage(message);\n }\n });\n })(i, arguments[i]);\n }\n\n if (arguments.length === 0) {\n message = {\n browserfsMessage: true,\n cbId: cbId,\n args: fixedArgs\n };\n worker.postMessage(message);\n }\n\n };\n case SpecialArgType.API_ERROR:\n return apiErrorRemote2Local( specialArg);\n case SpecialArgType.STATS:\n return statsRemote2Local( specialArg);\n case SpecialArgType.FILEFLAG:\n return fileFlagRemote2Local( specialArg);\n case SpecialArgType.BUFFER:\n return bufferRemote2Local( specialArg);\n case SpecialArgType.ERROR:\n return errorRemote2Local( specialArg);\n default:\n // No idea what this is.\n return arg;\n }\n } else {\n return arg;\n }\n default:\n return arg;\n }\n }\n\n worker.addEventListener('message', (e: MessageEvent) => {\n const request: object = e.data;\n if (isAPIRequest(request)) {\n const args = request.args,\n fixedArgs = new Array(args.length);\n\n switch (request.method) {\n case 'close':\n case 'sync':\n (() => {\n // File descriptor-relative methods.\n const remoteCb = args[1];\n fdConverter.applyFdAPIRequest(request, (err?: ApiError) => {\n // Send response.\n const response: IAPIResponse = {\n browserfsMessage: true,\n cbId: remoteCb.id,\n args: err ? [apiErrorLocal2Remote(err)] : []\n };\n worker.postMessage(response);\n });\n })();\n break;\n case 'probe':\n (() => {\n const rootFs = fs.getRootFS(),\n remoteCb = args[1],\n probeResponse: IProbeResponse = {\n type: SpecialArgType.PROBE,\n isReadOnly: rootFs.isReadOnly(),\n supportsLinks: rootFs.supportsLinks(),\n supportsProps: rootFs.supportsProps()\n },\n response: IAPIResponse = {\n browserfsMessage: true,\n cbId: remoteCb.id,\n args: [probeResponse]\n };\n\n worker.postMessage(response);\n })();\n break;\n default:\n // File system methods.\n for (let i = 0; i < args.length; i++) {\n fixedArgs[i] = argRemote2Local(args[i], fixedArgs);\n }\n const rootFS = fs.getRootFS();\n ( ( rootFS)[request.method]).apply(rootFS, fixedArgs);\n break;\n }\n }\n });\n }\n\n private _worker: Worker;\n private _callbackConverter = new CallbackArgumentConverter();\n\n private _isInitialized: boolean = false;\n private _isReadOnly: boolean = false;\n private _supportLinks: boolean = false;\n private _supportProps: boolean = false;\n\n /**\n * **Deprecated. Please use WorkerFS.Create() method instead.**\n *\n * Constructs a new WorkerFS instance that connects with BrowserFS running on\n * the specified worker.\n */\n constructor(worker: Worker, deprecateMsg = true) {\n super();\n this._worker = worker;\n deprecationMessage(deprecateMsg, WorkerFS.Name, {worker: \"Web Worker instance\"});\n this._worker.addEventListener('message', (e: MessageEvent) => {\n const resp: object = e.data;\n if (isAPIResponse(resp)) {\n let i: number;\n const args = resp.args;\n const fixedArgs = new Array(args.length);\n // Dispatch event to correct id.\n for (i = 0; i < fixedArgs.length; i++) {\n fixedArgs[i] = this._argRemote2Local(args[i]);\n }\n this._callbackConverter.toLocalArg(resp.cbId).apply(null, fixedArgs);\n }\n });\n }\n\n public getName(): string {\n return WorkerFS.Name;\n }\n\n /**\n * **Deprecated. Please use WorkerFS.Create() method to construct and initialize WorkerFS instances.**\n *\n * Called once both local and remote sides are set up.\n */\n public initialize(cb: () => void): void {\n if (!this._isInitialized) {\n const message: IAPIRequest = {\n browserfsMessage: true,\n method: 'probe',\n args: [this._argLocal2Remote(emptyBuffer()), this._callbackConverter.toRemoteArg((probeResponse: IProbeResponse) => {\n this._isInitialized = true;\n this._isReadOnly = probeResponse.isReadOnly;\n this._supportLinks = probeResponse.supportsLinks;\n this._supportProps = probeResponse.supportsProps;\n cb();\n })]\n };\n this._worker.postMessage(message);\n } else {\n cb();\n }\n }\n\n public isReadOnly(): boolean { return this._isReadOnly; }\n public supportsSynch(): boolean { return false; }\n public supportsLinks(): boolean { return this._supportLinks; }\n public supportsProps(): boolean { return this._supportProps; }\n\n public rename(oldPath: string, newPath: string, cb: BFSOneArgCallback): void {\n this._rpc('rename', arguments);\n }\n public stat(p: string, isLstat: boolean, cb: BFSCallback): void {\n this._rpc('stat', arguments);\n }\n public open(p: string, flag: FileFlag, mode: number, cb: BFSCallback): void {\n this._rpc('open', arguments);\n }\n public unlink(p: string, cb: Function): void {\n this._rpc('unlink', arguments);\n }\n public rmdir(p: string, cb: Function): void {\n this._rpc('rmdir', arguments);\n }\n public mkdir(p: string, mode: number, cb: Function): void {\n this._rpc('mkdir', arguments);\n }\n public readdir(p: string, cb: BFSCallback): void {\n this._rpc('readdir', arguments);\n }\n public exists(p: string, cb: (exists: boolean) => void): void {\n this._rpc('exists', arguments);\n }\n public realpath(p: string, cache: { [path: string]: string }, cb: BFSCallback): void {\n this._rpc('realpath', arguments);\n }\n public truncate(p: string, len: number, cb: Function): void {\n this._rpc('truncate', arguments);\n }\n public readFile(fname: string, encoding: string, flag: FileFlag, cb: BFSCallback): void {\n this._rpc('readFile', arguments);\n }\n public writeFile(fname: string, data: any, encoding: string, flag: FileFlag, mode: number, cb: BFSOneArgCallback): void {\n this._rpc('writeFile', arguments);\n }\n public appendFile(fname: string, data: any, encoding: string, flag: FileFlag, mode: number, cb: BFSOneArgCallback): void {\n this._rpc('appendFile', arguments);\n }\n public chmod(p: string, isLchmod: boolean, mode: number, cb: Function): void {\n this._rpc('chmod', arguments);\n }\n public chown(p: string, isLchown: boolean, uid: number, gid: number, cb: Function): void {\n this._rpc('chown', arguments);\n }\n public utimes(p: string, atime: Date, mtime: Date, cb: Function): void {\n this._rpc('utimes', arguments);\n }\n public link(srcpath: string, dstpath: string, cb: Function): void {\n this._rpc('link', arguments);\n }\n public symlink(srcpath: string, dstpath: string, type: string, cb: Function): void {\n this._rpc('symlink', arguments);\n }\n public readlink(p: string, cb: Function): void {\n this._rpc('readlink', arguments);\n }\n\n public syncClose(method: string, fd: File, cb: BFSOneArgCallback): void {\n this._worker.postMessage( {\n browserfsMessage: true,\n method: method,\n args: [( fd).toRemoteArg(), this._callbackConverter.toRemoteArg(cb)]\n });\n }\n\n private _argRemote2Local(arg: any): any {\n if (!arg) {\n return arg;\n }\n switch (typeof arg) {\n case 'object':\n if (typeof arg['type'] === 'number') {\n const specialArg = arg;\n switch (specialArg.type) {\n case SpecialArgType.API_ERROR:\n return apiErrorRemote2Local( specialArg);\n case SpecialArgType.FD:\n const fdArg = specialArg;\n return new WorkerFile(this, fdArg.path, FileFlag.getFileFlag(fdArg.flag), Stats.fromBuffer(transferrableObjectToBuffer(fdArg.stat)), fdArg.id, transferrableObjectToBuffer(fdArg.data));\n case SpecialArgType.STATS:\n return statsRemote2Local( specialArg);\n case SpecialArgType.FILEFLAG:\n return fileFlagRemote2Local( specialArg);\n case SpecialArgType.BUFFER:\n return bufferRemote2Local( specialArg);\n case SpecialArgType.ERROR:\n return errorRemote2Local( specialArg);\n default:\n return arg;\n }\n } else {\n return arg;\n }\n default:\n return arg;\n }\n }\n\n private _rpc(methodName: string, args: IArguments) {\n const fixedArgs = new Array(args.length);\n for (let i = 0; i < args.length; i++) {\n fixedArgs[i] = this._argLocal2Remote(args[i]);\n }\n const message: IAPIRequest = {\n browserfsMessage: true,\n method: methodName,\n args: fixedArgs\n };\n this._worker.postMessage(message);\n }\n\n /**\n * Converts a local argument into a remote argument. Public so WorkerFile objects can call it.\n */\n private _argLocal2Remote(arg: any): any {\n if (!arg) {\n return arg;\n }\n switch (typeof arg) {\n case \"object\":\n if (arg instanceof Stats) {\n return statsLocal2Remote(arg);\n } else if (arg instanceof ApiError) {\n return apiErrorLocal2Remote(arg);\n } else if (arg instanceof WorkerFile) {\n return ( arg).toRemoteArg();\n } else if (arg instanceof FileFlag) {\n return fileFlagLocal2Remote(arg);\n } else if (arg instanceof Buffer) {\n return bufferLocal2Remote(arg);\n } else if (arg instanceof Error) {\n return errorLocal2Remote(arg);\n } else {\n return \"Unknown argument\";\n }\n case \"function\":\n return this._callbackConverter.toRemoteArg(arg);\n default:\n return arg;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/WorkerFS.ts","/**\n * Contains utility methods for performing a variety of tasks with\n * XmlHttpRequest across browsers.\n */\n\nimport {isIE, emptyBuffer} from '../core/util';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport {BFSCallback} from '../core/file_system';\n\n/**\n * @hidden\n */\nfunction asyncDownloadFileModern(p: string, type: 'buffer', cb: BFSCallback): void;\nfunction asyncDownloadFileModern(p: string, type: 'json', cb: BFSCallback): void;\nfunction asyncDownloadFileModern(p: string, type: string, cb: BFSCallback): void;\nfunction asyncDownloadFileModern(p: string, type: string, cb: BFSCallback): void {\n const req = new XMLHttpRequest();\n req.open('GET', p, true);\n let jsonSupported = true;\n switch (type) {\n case 'buffer':\n req.responseType = 'arraybuffer';\n break;\n case 'json':\n // Some browsers don't support the JSON response type.\n // They either reset responseType, or throw an exception.\n // @see https://github.com/Modernizr/Modernizr/blob/master/src/testXhrType.js\n try {\n req.responseType = 'json';\n jsonSupported = req.responseType === 'json';\n } catch (e) {\n jsonSupported = false;\n }\n break;\n default:\n return cb(new ApiError(ErrorCode.EINVAL, \"Invalid download type: \" + type));\n }\n req.onreadystatechange = function(e) {\n if (req.readyState === 4) {\n if (req.status === 200) {\n switch (type) {\n case 'buffer':\n // XXX: WebKit-based browsers return *null* when XHRing an empty file.\n return cb(null, req.response ? Buffer.from(req.response) : emptyBuffer());\n case 'json':\n if (jsonSupported) {\n return cb(null, req.response);\n } else {\n return cb(null, JSON.parse(req.responseText));\n }\n }\n } else {\n return cb(new ApiError(req.status, \"XHR error.\"));\n }\n }\n };\n req.send();\n}\n\n/**\n * @hidden\n */\nfunction syncDownloadFileModern(p: string, type: 'buffer'): Buffer;\nfunction syncDownloadFileModern(p: string, type: 'json'): any;\nfunction syncDownloadFileModern(p: string, type: string): any;\nfunction syncDownloadFileModern(p: string, type: string): any {\n const req = new XMLHttpRequest();\n req.open('GET', p, false);\n\n // On most platforms, we cannot set the responseType of synchronous downloads.\n // @todo Test for this; IE10 allows this, as do older versions of Chrome/FF.\n let data: any = null;\n let err: any = null;\n // Classic hack to download binary data as a string.\n req.overrideMimeType('text/plain; charset=x-user-defined');\n req.onreadystatechange = function(e) {\n if (req.readyState === 4) {\n if (req.status === 200) {\n switch (type) {\n case 'buffer':\n // Convert the text into a buffer.\n const text = req.responseText;\n data = Buffer.alloc(text.length);\n // Throw away the upper bits of each character.\n for (let i = 0; i < text.length; i++) {\n // This will automatically throw away the upper bit of each\n // character for us.\n data[i] = text.charCodeAt(i);\n }\n return;\n case 'json':\n data = JSON.parse(req.responseText);\n return;\n }\n } else {\n err = new ApiError(req.status, \"XHR error.\");\n return;\n }\n }\n };\n req.send();\n if (err) {\n throw err;\n }\n return data;\n}\n\n/**\n * IE10 allows us to perform synchronous binary file downloads.\n * @todo Feature detect this, as older versions of FF/Chrome do too!\n * @hidden\n */\nfunction syncDownloadFileIE10(p: string, type: 'buffer'): Buffer;\nfunction syncDownloadFileIE10(p: string, type: 'json'): any;\nfunction syncDownloadFileIE10(p: string, type: string): any;\nfunction syncDownloadFileIE10(p: string, type: string): any {\n const req = new XMLHttpRequest();\n req.open('GET', p, false);\n switch (type) {\n case 'buffer':\n req.responseType = 'arraybuffer';\n break;\n case 'json':\n // IE10 does not support the JSON type.\n break;\n default:\n throw new ApiError(ErrorCode.EINVAL, \"Invalid download type: \" + type);\n }\n let data: any;\n let err: any;\n req.onreadystatechange = function(e) {\n if (req.readyState === 4) {\n if (req.status === 200) {\n switch (type) {\n case 'buffer':\n data = Buffer.from(req.response);\n break;\n case 'json':\n data = JSON.parse(req.response);\n break;\n }\n } else {\n err = new ApiError(req.status, \"XHR error.\");\n }\n }\n };\n req.send();\n if (err) {\n throw err;\n }\n return data;\n}\n\n/**\n * @hidden\n */\nfunction getFileSize(async: boolean, p: string, cb: BFSCallback): void {\n const req = new XMLHttpRequest();\n req.open('HEAD', p, async);\n req.onreadystatechange = function(e) {\n if (req.readyState === 4) {\n if (req.status === 200) {\n try {\n return cb(null, parseInt(req.getResponseHeader('Content-Length') || '-1', 10));\n } catch (e) {\n // In the event that the header isn't present or there is an error...\n return cb(new ApiError(ErrorCode.EIO, \"XHR HEAD error: Could not read content-length.\"));\n }\n } else {\n return cb(new ApiError(req.status, \"XHR HEAD error.\"));\n }\n }\n };\n req.send();\n}\n\n/**\n * Asynchronously download a file as a buffer or a JSON object.\n * Note that the third function signature with a non-specialized type is\n * invalid, but TypeScript requires it when you specialize string arguments to\n * constants.\n * @hidden\n */\nexport let asyncDownloadFile: {\n (p: string, type: 'buffer', cb: BFSCallback): void;\n (p: string, type: 'json', cb: BFSCallback): void;\n (p: string, type: string, cb: BFSCallback): void;\n} = asyncDownloadFileModern;\n\n/**\n * Synchronously download a file as a buffer or a JSON object.\n * Note that the third function signature with a non-specialized type is\n * invalid, but TypeScript requires it when you specialize string arguments to\n * constants.\n * @hidden\n */\nexport let syncDownloadFile: {\n (p: string, type: 'buffer'): Buffer;\n (p: string, type: 'json'): any;\n (p: string, type: string): any;\n} = (isIE && typeof Blob !== 'undefined') ? syncDownloadFileIE10 : syncDownloadFileModern;\n\n/**\n * Synchronously retrieves the size of the given file in bytes.\n * @hidden\n */\nexport function getFileSizeSync(p: string): number {\n let rv: number = -1;\n getFileSize(false, p, function(err: ApiError, size?: number) {\n if (err) {\n throw err;\n }\n rv = size!;\n });\n return rv;\n}\n\n/**\n * Asynchronously retrieves the size of the given file in bytes.\n * @hidden\n */\nexport function getFileSizeAsync(p: string, cb: (err: ApiError, size?: number) => void): void {\n getFileSize(true, p, cb);\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/xhr.ts","import {default as Stats, FileType} from '../core/node_fs_stats';\nimport * as path from 'path';\n\n/**\n * A simple class for storing a filesystem index. Assumes that all paths passed\n * to it are *absolute* paths.\n *\n * Can be used as a partial or a full index, although care must be taken if used\n * for the former purpose, especially when directories are concerned.\n */\nexport class FileIndex {\n /**\n * Static method for constructing indices from a JSON listing.\n * @param listing Directory listing generated by tools/XHRIndexer.coffee\n * @return A new FileIndex object.\n */\n public static fromListing(listing: any): FileIndex {\n const idx = new FileIndex();\n // Add a root DirNode.\n const rootInode = new DirInode();\n idx._index['/'] = rootInode;\n const queue = [['', listing, rootInode]];\n while (queue.length > 0) {\n let inode: Inode;\n const next = queue.pop();\n const pwd = next![0];\n const tree = next![1];\n const parent = next![2];\n for (const node in tree) {\n if (tree.hasOwnProperty(node)) {\n const children = tree[node];\n const name = `${pwd}/${node}`;\n if (children) {\n idx._index[name] = inode = new DirInode();\n queue.push([name, children, inode]);\n } else {\n // This inode doesn't have correct size information, noted with -1.\n inode = new FileInode(new Stats(FileType.FILE, -1, 0x16D));\n }\n if (parent) {\n parent._ls[node] = inode;\n }\n }\n }\n }\n return idx;\n }\n\n // Maps directory paths to directory inodes, which contain files.\n private _index: {[path: string]: DirInode };\n\n /**\n * Constructs a new FileIndex.\n */\n constructor() {\n // _index is a single-level key,value store that maps *directory* paths to\n // DirInodes. File information is only contained in DirInodes themselves.\n this._index = {};\n // Create the root directory.\n this.addPath('/', new DirInode());\n }\n\n /**\n * Runs the given function over all files in the index.\n */\n public fileIterator(cb: (file: T | null) => void): void {\n for (const path in this._index) {\n if (this._index.hasOwnProperty(path)) {\n const dir = this._index[path];\n const files = dir.getListing();\n for (const file of files) {\n const item = dir.getItem(file);\n if (isFileInode(item)) {\n cb(item.getData());\n }\n }\n }\n }\n }\n\n /**\n * Adds the given absolute path to the index if it is not already in the index.\n * Creates any needed parent directories.\n * @param path The path to add to the index.\n * @param inode The inode for the\n * path to add.\n * @return 'True' if it was added or already exists, 'false' if there\n * was an issue adding it (e.g. item in path is a file, item exists but is\n * different).\n * @todo If adding fails and implicitly creates directories, we do not clean up\n * the new empty directories.\n */\n public addPath(path: string, inode: Inode): boolean {\n if (!inode) {\n throw new Error('Inode must be specified');\n }\n if (path[0] !== '/') {\n throw new Error('Path must be absolute, got: ' + path);\n }\n\n // Check if it already exists.\n if (this._index.hasOwnProperty(path)) {\n return this._index[path] === inode;\n }\n\n const splitPath = this._split_path(path);\n const dirpath = splitPath[0];\n const itemname = splitPath[1];\n // Try to add to its parent directory first.\n let parent = this._index[dirpath];\n if (parent === undefined && path !== '/') {\n // Create parent.\n parent = new DirInode();\n if (!this.addPath(dirpath, parent)) {\n return false;\n }\n }\n // Add myself to my parent.\n if (path !== '/') {\n if (!parent.addItem(itemname, inode)) {\n return false;\n }\n }\n // If I'm a directory, add myself to the index.\n if (isDirInode(inode)) {\n this._index[path] = inode;\n }\n return true;\n }\n\n /**\n * Adds the given absolute path to the index if it is not already in the index.\n * The path is added without special treatment (no joining of adjacent separators, etc).\n * Creates any needed parent directories.\n * @param path The path to add to the index.\n * @param inode The inode for the\n * path to add.\n * @return 'True' if it was added or already exists, 'false' if there\n * was an issue adding it (e.g. item in path is a file, item exists but is\n * different).\n * @todo If adding fails and implicitly creates directories, we do not clean up\n * the new empty directories.\n */\n public addPathFast(path: string, inode: Inode): boolean {\n const itemNameMark = path.lastIndexOf('/');\n const parentPath = itemNameMark === 0 ? \"/\" : path.substring(0, itemNameMark);\n const itemName = path.substring(itemNameMark + 1);\n\n // Try to add to its parent directory first.\n let parent = this._index[parentPath];\n if (parent === undefined) {\n // Create parent.\n parent = new DirInode();\n this.addPathFast(parentPath, parent);\n }\n\n if (!parent.addItem(itemName, inode)) {\n return false;\n }\n\n // If adding a directory, add to the index as well.\n if (inode.isDir()) {\n this._index[path] = > inode;\n }\n return true;\n }\n\n /**\n * Removes the given path. Can be a file or a directory.\n * @return The removed item,\n * or null if it did not exist.\n */\n public removePath(path: string): Inode | null {\n const splitPath = this._split_path(path);\n const dirpath = splitPath[0];\n const itemname = splitPath[1];\n\n // Try to remove it from its parent directory first.\n const parent = this._index[dirpath];\n if (parent === undefined) {\n return null;\n }\n // Remove myself from my parent.\n const inode = parent.remItem(itemname);\n if (inode === null) {\n return null;\n }\n // If I'm a directory, remove myself from the index, and remove my children.\n if (isDirInode(inode)) {\n const children = inode.getListing();\n for (const child of children) {\n this.removePath(path + '/' + child);\n }\n\n // Remove the directory from the index, unless it's the root.\n if (path !== '/') {\n delete this._index[path];\n }\n }\n return inode;\n }\n\n /**\n * Retrieves the directory listing of the given path.\n * @return An array of files in the given path, or 'null' if it does not exist.\n */\n public ls(path: string): string[] | null {\n const item = this._index[path];\n if (item === undefined) {\n return null;\n }\n return item.getListing();\n }\n\n /**\n * Returns the inode of the given item.\n * @return Returns null if the item does not exist.\n */\n public getInode(path: string): Inode | null {\n const splitPath = this._split_path(path);\n const dirpath = splitPath[0];\n const itemname = splitPath[1];\n // Retrieve from its parent directory.\n const parent = this._index[dirpath];\n if (parent === undefined) {\n return null;\n }\n // Root case\n if (dirpath === path) {\n return parent;\n }\n return parent.getItem(itemname);\n }\n\n /**\n * Split into a (directory path, item name) pair\n */\n private _split_path(p: string): string[] {\n const dirpath = path.dirname(p);\n const itemname = p.substr(dirpath.length + (dirpath === \"/\" ? 0 : 1));\n return [dirpath, itemname];\n }\n}\n\n/**\n * Generic interface for file/directory inodes.\n * Note that Stats objects are what we use for file inodes.\n */\nexport interface Inode {\n // Is this an inode for a file?\n isFile(): boolean;\n // Is this an inode for a directory?\n isDir(): boolean;\n}\n\n/**\n * Inode for a file. Stores an arbitrary (filesystem-specific) data payload.\n */\nexport class FileInode implements Inode {\n constructor(private data: T) { }\n public isFile(): boolean { return true; }\n public isDir(): boolean { return false; }\n public getData(): T { return this.data; }\n public setData(data: T): void { this.data = data; }\n}\n\n/**\n * Inode for a directory. Currently only contains the directory listing.\n */\nexport class DirInode implements Inode {\n private _ls: {[path: string]: Inode} = {};\n /**\n * Constructs an inode for a directory.\n */\n constructor(private data: T | null = null) {}\n public isFile(): boolean {\n return false;\n }\n public isDir(): boolean {\n return true;\n }\n public getData(): T | null { return this.data; }\n\n /**\n * Return a Stats object for this inode.\n * @todo Should probably remove this at some point. This isn't the\n * responsibility of the FileIndex.\n */\n public getStats(): Stats {\n return new Stats(FileType.DIRECTORY, 4096, 0x16D);\n }\n /**\n * Returns the directory listing for this directory. Paths in the directory are\n * relative to the directory's path.\n * @return The directory listing for this directory.\n */\n public getListing(): string[] {\n return Object.keys(this._ls);\n }\n /**\n * Returns the inode for the indicated item, or null if it does not exist.\n * @param p Name of item in this directory.\n */\n public getItem(p: string): Inode | null {\n const item = this._ls[p];\n return item ? item : null;\n }\n /**\n * Add the given item to the directory listing. Note that the given inode is\n * not copied, and will be mutated by the DirInode if it is a DirInode.\n * @param p Item name to add to the directory listing.\n * @param inode The inode for the\n * item to add to the directory inode.\n * @return True if it was added, false if it already existed.\n */\n public addItem(p: string, inode: Inode): boolean {\n if (p in this._ls) {\n return false;\n }\n this._ls[p] = inode;\n return true;\n }\n /**\n * Removes the given item from the directory listing.\n * @param p Name of item to remove from the directory listing.\n * @return Returns the item\n * removed, or null if the item did not exist.\n */\n public remItem(p: string): Inode | null {\n const item = this._ls[p];\n if (item === undefined) {\n return null;\n }\n delete this._ls[p];\n return item;\n }\n}\n\n/**\n * @hidden\n */\nexport function isFileInode(inode: Inode | null): inode is FileInode {\n return !!inode && inode.isFile();\n}\n\n/**\n * @hidden\n */\nexport function isDirInode(inode: Inode | null): inode is DirInode {\n return !!inode && inode.isDir();\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/file_index.ts","import {BaseFileSystem, FileSystem, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {ApiError, ErrorCode} from '../core/api_error';\nimport {FileFlag, ActionType} from '../core/file_flag';\nimport {copyingSlice, deprecationMessage} from '../core/util';\nimport {File} from '../core/file';\nimport Stats from '../core/node_fs_stats';\nimport {NoSyncFile} from '../generic/preload_file';\nimport {asyncDownloadFile, syncDownloadFile, getFileSizeAsync, getFileSizeSync} from '../generic/xhr';\nimport {FileIndex, isFileInode, isDirInode} from '../generic/file_index';\n\n/**\n * Try to convert the given buffer into a string, and pass it to the callback.\n * Optimization that removes the needed try/catch into a helper function, as\n * this is an uncommon case.\n * @hidden\n */\nfunction tryToString(buff: Buffer, encoding: string, cb: BFSCallback) {\n try {\n cb(null, buff.toString(encoding));\n } catch (e) {\n cb(e);\n }\n}\n\n/**\n * Configuration options for an XmlHttpRequest file system.\n */\nexport interface XmlHttpRequestOptions {\n // URL to a file index as a JSON file or the file index object itself, generated with the make_xhrfs_index script.\n // Defaults to `index.json`.\n index?: string | object;\n // Used as the URL prefix for fetched files.\n // Default: Fetch files relative to the index.\n baseUrl?: string;\n}\n\n/**\n * A simple filesystem backed by XMLHttpRequests. You must create a directory listing using the\n * `make_xhrfs_index` tool provided by BrowserFS.\n *\n * If you install BrowserFS globally with `npm i -g browserfs`, you can generate a listing by\n * running `make_xhrfs_index` in your terminal in the directory you would like to index:\n *\n * ```\n * make_xhrfs_index > index.json\n * ```\n *\n * Listings objects look like the following:\n *\n * ```json\n * {\n * \"home\": {\n * \"jvilk\": {\n * \"someFile.txt\": null,\n * \"someDir\": {\n * // Empty directory\n * }\n * }\n * }\n * }\n * ```\n *\n * *This example has the folder `/home/jvilk` with subfile `someFile.txt` and subfolder `someDir`.*\n */\nexport default class XmlHttpRequest extends BaseFileSystem implements FileSystem {\n public static readonly Name = \"XmlHttpRequest\";\n\n public static readonly Options: FileSystemOptions = {\n index: {\n type: [\"string\", \"object\"],\n optional: true,\n description: \"URL to a file index as a JSON file or the file index object itself, generated with the make_xhrfs_index script. Defaults to `index.json`.\"\n },\n baseUrl: {\n type: \"string\",\n optional: true,\n description: \"Used as the URL prefix for fetched files. Default: Fetch files relative to the index.\"\n }\n };\n\n /**\n * Construct an XmlHttpRequest file system backend with the given options.\n */\n public static Create(opts: XmlHttpRequestOptions, cb: BFSCallback): void {\n if (opts.index === undefined) {\n opts.index = `index.json`;\n }\n if (typeof(opts.index) === \"string\") {\n XmlHttpRequest.FromURL(opts.index, cb, opts.baseUrl, false);\n } else {\n cb(null, new XmlHttpRequest(opts.index, opts.baseUrl, false));\n }\n }\n public static isAvailable(): boolean {\n return typeof(XMLHttpRequest) !== \"undefined\" && XMLHttpRequest !== null;\n }\n /**\n * **Deprecated. Please use XmlHttpRequest.Create() method instead to construct XmlHttpRequest objects.**\n *\n * Constructs an XmlHttpRequest object using the directory listing at the given URL.\n * Uses the base URL as the URL prefix for fetched files.\n * @param cb Called when the file system has been instantiated, or if an error occurs.\n */\n public static FromURL(url: string, cb: BFSCallback, baseUrl = url.slice(0, url.lastIndexOf('/') + 1), deprecateMsg = true): void {\n if (deprecateMsg) {\n console.warn(`[XmlHttpRequest] XmlHttpRequest.FromURL() is deprecated and will be removed in the next major release. Please use 'XmlHttpRequest.Create({ index: \"${url}\", baseUrl: \"${baseUrl}\" }, cb)' instead.`);\n }\n asyncDownloadFile(url, \"json\", (e, data?) => {\n if (e) {\n cb(e);\n } else {\n cb(null, new XmlHttpRequest(data, baseUrl, false));\n }\n });\n }\n\n public readonly prefixUrl: string;\n private _index: FileIndex<{}>;\n /**\n * **Deprecated. Please use XmlHttpRequest.Create() method instead to construct XmlHttpRequest objects.**\n *\n * Constructs the file system. You must provide the directory listing as a JSON object\n * produced by the `make_xhrfs_index` script.\n *\n * **DEPRECATED:** You may pass a URL to the file index to the constructor, which will fetch the file index\n * *synchronously* and may freeze up the web page. This behavior will be removed in the next major version\n * of BrowserFS.\n *\n * @param listingUrlOrObj index object or the path to the JSON file index generated by\n * `make_xhrfs_index`.\n * @param prefixUrl URL that is prepended to any file locations in the file index. e.g. if `prefixUrl = 'data/`, and the user wants to open the file `/foo.txt`,\n * the file system will fetch file `data/foo.txt`. The browser will access the file relative to the currrent webpage\n * URL.\n */\n constructor(listingUrlOrObj: string | object, prefixUrl: string = '', deprecateMsg = true) {\n super();\n if (!listingUrlOrObj) {\n listingUrlOrObj = 'index.json';\n }\n // prefix_url must end in a directory separator.\n if (prefixUrl.length > 0 && prefixUrl.charAt(prefixUrl.length - 1) !== '/') {\n prefixUrl = prefixUrl + '/';\n }\n this.prefixUrl = prefixUrl;\n\n let listing: object | null = null;\n if (typeof(listingUrlOrObj) === \"string\") {\n listing = this._requestFileSync( listingUrlOrObj, 'json');\n if (!listing) {\n throw new Error(\"Unable to find listing at URL: ${listingUrlOrObj}\");\n }\n } else {\n listing = listingUrlOrObj;\n }\n deprecationMessage(deprecateMsg, XmlHttpRequest.Name, { index: typeof(listingUrlOrObj) === \"string\" ? listingUrlOrObj : \"file index as an object\", baseUrl: prefixUrl});\n\n this._index = FileIndex.fromListing(listing);\n }\n\n public empty(): void {\n this._index.fileIterator(function(file: Stats) {\n file.fileData = null;\n });\n }\n\n public getName(): string {\n return XmlHttpRequest.Name;\n }\n\n public diskSpace(path: string, cb: (total: number, free: number) => void): void {\n // Read-only file system. We could calculate the total space, but that's not\n // important right now.\n cb(0, 0);\n }\n\n public isReadOnly(): boolean {\n return true;\n }\n\n public supportsLinks(): boolean {\n return false;\n }\n\n public supportsProps(): boolean {\n return false;\n }\n\n public supportsSynch(): boolean {\n return true;\n }\n\n /**\n * Special XHR function: Preload the given file into the index.\n * @param [String] path\n * @param [BrowserFS.Buffer] buffer\n */\n public preloadFile(path: string, buffer: Buffer): void {\n const inode = this._index.getInode(path);\n if (isFileInode(inode)) {\n if (inode === null) {\n throw ApiError.ENOENT(path);\n }\n const stats = inode.getData();\n stats.size = buffer.length;\n stats.fileData = buffer;\n } else {\n throw ApiError.EISDIR(path);\n }\n }\n\n public stat(path: string, isLstat: boolean, cb: BFSCallback): void {\n const inode = this._index.getInode(path);\n if (inode === null) {\n return cb(ApiError.ENOENT(path));\n }\n let stats: Stats;\n if (isFileInode(inode)) {\n stats = inode.getData();\n // At this point, a non-opened file will still have default stats from the listing.\n if (stats.size < 0) {\n this._requestFileSizeAsync(path, function(e: ApiError, size?: number) {\n if (e) {\n return cb(e);\n }\n stats.size = size!;\n cb(null, stats.clone());\n });\n } else {\n cb(null, stats.clone());\n }\n } else if (isDirInode(inode)) {\n stats = inode.getStats();\n cb(null, stats);\n } else {\n cb(ApiError.FileError(ErrorCode.EINVAL, path));\n }\n }\n\n public statSync(path: string, isLstat: boolean): Stats {\n const inode = this._index.getInode(path);\n if (inode === null) {\n throw ApiError.ENOENT(path);\n }\n let stats: Stats;\n if (isFileInode(inode)) {\n stats = inode.getData();\n // At this point, a non-opened file will still have default stats from the listing.\n if (stats.size < 0) {\n stats.size = this._requestFileSizeSync(path);\n }\n } else if (isDirInode(inode)) {\n stats = inode.getStats();\n } else {\n throw ApiError.FileError(ErrorCode.EINVAL, path);\n }\n return stats;\n }\n\n public open(path: string, flags: FileFlag, mode: number, cb: BFSCallback): void {\n // INVARIANT: You can't write to files on this file system.\n if (flags.isWriteable()) {\n return cb(new ApiError(ErrorCode.EPERM, path));\n }\n const self = this;\n // Check if the path exists, and is a file.\n const inode = this._index.getInode(path);\n if (inode === null) {\n return cb(ApiError.ENOENT(path));\n }\n if (isFileInode(inode)) {\n const stats = inode.getData();\n switch (flags.pathExistsAction()) {\n case ActionType.THROW_EXCEPTION:\n case ActionType.TRUNCATE_FILE:\n return cb(ApiError.EEXIST(path));\n case ActionType.NOP:\n // Use existing file contents.\n // XXX: Uh, this maintains the previously-used flag.\n if (stats.fileData) {\n return cb(null, new NoSyncFile(self, path, flags, stats.clone(), stats.fileData));\n }\n // @todo be lazier about actually requesting the file\n this._requestFileAsync(path, 'buffer', function(err: ApiError, buffer?: Buffer) {\n if (err) {\n return cb(err);\n }\n // we don't initially have file sizes\n stats.size = buffer!.length;\n stats.fileData = buffer!;\n return cb(null, new NoSyncFile(self, path, flags, stats.clone(), buffer));\n });\n break;\n default:\n return cb(new ApiError(ErrorCode.EINVAL, 'Invalid FileMode object.'));\n }\n } else {\n return cb(ApiError.EISDIR(path));\n }\n }\n\n public openSync(path: string, flags: FileFlag, mode: number): File {\n // INVARIANT: You can't write to files on this file system.\n if (flags.isWriteable()) {\n throw new ApiError(ErrorCode.EPERM, path);\n }\n // Check if the path exists, and is a file.\n const inode = this._index.getInode(path);\n if (inode === null) {\n throw ApiError.ENOENT(path);\n }\n if (isFileInode(inode)) {\n const stats = inode.getData();\n switch (flags.pathExistsAction()) {\n case ActionType.THROW_EXCEPTION:\n case ActionType.TRUNCATE_FILE:\n throw ApiError.EEXIST(path);\n case ActionType.NOP:\n // Use existing file contents.\n // XXX: Uh, this maintains the previously-used flag.\n if (stats.fileData) {\n return new NoSyncFile(this, path, flags, stats.clone(), stats.fileData);\n }\n // @todo be lazier about actually requesting the file\n const buffer = this._requestFileSync(path, 'buffer');\n // we don't initially have file sizes\n stats.size = buffer.length;\n stats.fileData = buffer;\n return new NoSyncFile(this, path, flags, stats.clone(), buffer);\n default:\n throw new ApiError(ErrorCode.EINVAL, 'Invalid FileMode object.');\n }\n } else {\n throw ApiError.EISDIR(path);\n }\n }\n\n public readdir(path: string, cb: BFSCallback): void {\n try {\n cb(null, this.readdirSync(path));\n } catch (e) {\n cb(e);\n }\n }\n\n public readdirSync(path: string): string[] {\n // Check if it exists.\n const inode = this._index.getInode(path);\n if (inode === null) {\n throw ApiError.ENOENT(path);\n } else if (isDirInode(inode)) {\n return inode.getListing();\n } else {\n throw ApiError.ENOTDIR(path);\n }\n }\n\n /**\n * We have the entire file as a buffer; optimize readFile.\n */\n public readFile(fname: string, encoding: string, flag: FileFlag, cb: BFSCallback): void {\n // Wrap cb in file closing code.\n const oldCb = cb;\n // Get file.\n this.open(fname, flag, 0x1a4, function(err: ApiError, fd?: File) {\n if (err) {\n return cb(err);\n }\n cb = function(err: ApiError, arg?: Buffer) {\n fd!.close(function(err2: any) {\n if (!err) {\n err = err2;\n }\n return oldCb(err, arg);\n });\n };\n const fdCast = > fd;\n const fdBuff = fdCast.getBuffer();\n if (encoding === null) {\n cb(err, copyingSlice(fdBuff));\n } else {\n tryToString(fdBuff, encoding, cb);\n }\n });\n }\n\n /**\n * Specially-optimized readfile.\n */\n public readFileSync(fname: string, encoding: string, flag: FileFlag): any {\n // Get file.\n const fd = this.openSync(fname, flag, 0x1a4);\n try {\n const fdCast = > fd;\n const fdBuff = fdCast.getBuffer();\n if (encoding === null) {\n return copyingSlice(fdBuff);\n }\n return fdBuff.toString(encoding);\n } finally {\n fd.closeSync();\n }\n }\n\n private getXhrPath(filePath: string): string {\n if (filePath.charAt(0) === '/') {\n filePath = filePath.slice(1);\n }\n return this.prefixUrl + filePath;\n }\n\n /**\n * Asynchronously download the given file.\n */\n private _requestFileAsync(p: string, type: 'buffer', cb: BFSCallback): void;\n private _requestFileAsync(p: string, type: 'json', cb: BFSCallback): void;\n private _requestFileAsync(p: string, type: string, cb: BFSCallback): void;\n private _requestFileAsync(p: string, type: string, cb: BFSCallback): void {\n asyncDownloadFile(this.getXhrPath(p), type, cb);\n }\n\n /**\n * Synchronously download the given file.\n */\n private _requestFileSync(p: string, type: 'buffer'): Buffer;\n private _requestFileSync(p: string, type: 'json'): any;\n private _requestFileSync(p: string, type: string): any;\n private _requestFileSync(p: string, type: string): any {\n return syncDownloadFile(this.getXhrPath(p), type);\n }\n\n /**\n * Only requests the HEAD content, for the file size.\n */\n private _requestFileSizeAsync(path: string, cb: BFSCallback): void {\n getFileSizeAsync(this.getXhrPath(path), cb);\n }\n private _requestFileSizeSync(path: string): number {\n return getFileSizeSync(this.getXhrPath(path));\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/XmlHttpRequest.ts","/**\n * (Nonstandard) String utility function for 8-bit ASCII with the extended\n * character set. Unlike the ASCII above, we do not mask the high bits.\n *\n * Placed into a separate file so it can be used with other Buffer implementations.\n * @see http://en.wikipedia.org/wiki/Extended_ASCII\n */\nexport default class ExtendedASCII {\n private static extendedChars = [ '\\u00C7', '\\u00FC', '\\u00E9', '\\u00E2', '\\u00E4',\n '\\u00E0', '\\u00E5', '\\u00E7', '\\u00EA', '\\u00EB', '\\u00E8', '\\u00EF',\n '\\u00EE', '\\u00EC', '\\u00C4', '\\u00C5', '\\u00C9', '\\u00E6', '\\u00C6',\n '\\u00F4', '\\u00F6', '\\u00F2', '\\u00FB', '\\u00F9', '\\u00FF', '\\u00D6',\n '\\u00DC', '\\u00F8', '\\u00A3', '\\u00D8', '\\u00D7', '\\u0192', '\\u00E1',\n '\\u00ED', '\\u00F3', '\\u00FA', '\\u00F1', '\\u00D1', '\\u00AA', '\\u00BA',\n '\\u00BF', '\\u00AE', '\\u00AC', '\\u00BD', '\\u00BC', '\\u00A1', '\\u00AB',\n '\\u00BB', '_', '_', '_', '\\u00A6', '\\u00A6', '\\u00C1', '\\u00C2', '\\u00C0',\n '\\u00A9', '\\u00A6', '\\u00A6', '+', '+', '\\u00A2', '\\u00A5', '+', '+', '-',\n '-', '+', '-', '+', '\\u00E3', '\\u00C3', '+', '+', '-', '-', '\\u00A6', '-',\n '+', '\\u00A4', '\\u00F0', '\\u00D0', '\\u00CA', '\\u00CB', '\\u00C8', 'i',\n '\\u00CD', '\\u00CE', '\\u00CF', '+', '+', '_', '_', '\\u00A6', '\\u00CC', '_',\n '\\u00D3', '\\u00DF', '\\u00D4', '\\u00D2', '\\u00F5', '\\u00D5', '\\u00B5',\n '\\u00FE', '\\u00DE', '\\u00DA', '\\u00DB', '\\u00D9', '\\u00FD', '\\u00DD',\n '\\u00AF', '\\u00B4', '\\u00AD', '\\u00B1', '_', '\\u00BE', '\\u00B6', '\\u00A7',\n '\\u00F7', '\\u00B8', '\\u00B0', '\\u00A8', '\\u00B7', '\\u00B9', '\\u00B3',\n '\\u00B2', '_', ' ' ];\n\n public static str2byte(str: string, buf: Buffer): number {\n const length = str.length > buf.length ? buf.length : str.length;\n for (let i = 0; i < length; i++) {\n let charCode = str.charCodeAt(i);\n if (charCode > 0x7F) {\n // Check if extended ASCII.\n const charIdx = ExtendedASCII.extendedChars.indexOf(str.charAt(i));\n if (charIdx > -1) {\n charCode = charIdx + 0x80;\n }\n // Otherwise, keep it as-is.\n }\n buf[charCode] = i;\n }\n return length;\n }\n\n public static byte2str(buff: Buffer): string {\n const chars = new Array(buff.length);\n for (let i = 0; i < buff.length; i++) {\n const charCode = buff[i];\n if (charCode > 0x7F) {\n chars[i] = ExtendedASCII.extendedChars[charCode - 128];\n } else {\n chars[i] = String.fromCharCode(charCode);\n }\n }\n return chars.join('');\n }\n\n public static byteLength(str: string): number { return str.length; }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/generic/extended_ascii.ts","import {ApiError, ErrorCode} from '../core/api_error';\nimport {default as Stats, FileType} from '../core/node_fs_stats';\nimport {SynchronousFileSystem, FileSystem, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {File} from '../core/file';\nimport {FileFlag, ActionType} from '../core/file_flag';\nimport {NoSyncFile} from '../generic/preload_file';\nimport {Arrayish, arrayish2Buffer, copyingSlice, deprecationMessage, bufferValidator} from '../core/util';\nimport ExtendedASCII from '../generic/extended_ascii';\nimport setImmediate from '../generic/setImmediate';\n/**\n * @hidden\n */\nconst inflateRaw:\n (data: Arrayish, options?: {\n chunkSize: number;\n }) => Arrayish = require('pako/lib/inflate').inflateRaw;\nimport {FileIndex, DirInode, FileInode, isDirInode, isFileInode} from '../generic/file_index';\n\n/**\n * Maps CompressionMethod => function that decompresses.\n * @hidden\n */\nconst decompressionMethods: {[method: number]: (data: Buffer, compressedSize: number, uncompressedSize: number, flags: number) => Buffer} = {};\n\n/**\n * 4.4.2.2: Indicates the compatibiltiy of a file's external attributes.\n */\nexport enum ExternalFileAttributeType {\n MSDOS = 0, AMIGA = 1, OPENVMS = 2, UNIX = 3, VM_CMS = 4, ATARI_ST = 5,\n OS2_HPFS = 6, MAC = 7, Z_SYSTEM = 8, CP_M = 9, NTFS = 10, MVS = 11, VSE = 12,\n ACORN_RISC = 13, VFAT = 14, ALT_MVS = 15, BEOS = 16, TANDEM = 17, OS_400 = 18,\n OSX = 19\n}\n\n/**\n * 4.4.5\n */\nexport enum CompressionMethod {\n STORED = 0, // The file is stored (no compression)\n SHRUNK = 1, // The file is Shrunk\n REDUCED_1 = 2, // The file is Reduced with compression factor 1\n REDUCED_2 = 3, // The file is Reduced with compression factor 2\n REDUCED_3 = 4, // The file is Reduced with compression factor 3\n REDUCED_4 = 5, // The file is Reduced with compression factor 4\n IMPLODE = 6, // The file is Imploded\n DEFLATE = 8, // The file is Deflated\n DEFLATE64 = 9, // Enhanced Deflating using Deflate64(tm)\n TERSE_OLD = 10, // PKWARE Data Compression Library Imploding (old IBM TERSE)\n BZIP2 = 12, // File is compressed using BZIP2 algorithm\n LZMA = 14, // LZMA (EFS)\n TERSE_NEW = 18, // File is compressed using IBM TERSE (new)\n LZ77 = 19, // IBM LZ77 z Architecture (PFS)\n WAVPACK = 97, // WavPack compressed data\n PPMD = 98 // PPMd version I, Rev 1\n}\n\n/**\n * Converts the input time and date in MS-DOS format into a JavaScript Date\n * object.\n * @hidden\n */\nfunction msdos2date(time: number, date: number): Date {\n // MS-DOS Date\n // |0 0 0 0 0|0 0 0 0|0 0 0 0 0 0 0\n // D (1-31) M (1-23) Y (from 1980)\n const day = date & 0x1F;\n // JS date is 0-indexed, DOS is 1-indexed.\n const month = ((date >> 5) & 0xF) - 1;\n const year = (date >> 9) + 1980;\n // MS DOS Time\n // |0 0 0 0 0|0 0 0 0 0 0|0 0 0 0 0\n // Second Minute Hour\n const second = time & 0x1F;\n const minute = (time >> 5) & 0x3F;\n const hour = time >> 11;\n return new Date(year, month, day, hour, minute, second);\n}\n\n/**\n * Safely returns the string from the buffer, even if it is 0 bytes long.\n * (Normally, calling toString() on a buffer with start === end causes an\n * exception).\n * @hidden\n */\nfunction safeToString(buff: Buffer, useUTF8: boolean, start: number, length: number): string {\n if (length === 0) {\n return \"\";\n } else if (useUTF8) {\n return buff.toString('utf8', start, start + length);\n } else {\n return ExtendedASCII.byte2str(buff.slice(start, start + length));\n }\n}\n\n/*\n 4.3.6 Overall .ZIP file format:\n\n [local file header 1]\n [encryption header 1]\n [file data 1]\n [data descriptor 1]\n .\n .\n .\n [local file header n]\n [encryption header n]\n [file data n]\n [data descriptor n]\n [archive decryption header]\n [archive extra data record]\n [central directory header 1]\n .\n .\n .\n [central directory header n]\n [zip64 end of central directory record]\n [zip64 end of central directory locator]\n [end of central directory record]\n*/\n\n/**\n * 4.3.7 Local file header:\n *\n * local file header signature 4 bytes (0x04034b50)\n * version needed to extract 2 bytes\n * general purpose bit flag 2 bytes\n * compression method 2 bytes\n * last mod file time 2 bytes\n * last mod file date 2 bytes\n * crc-32 4 bytes\n * compressed size 4 bytes\n * uncompressed size 4 bytes\n * file name length 2 bytes\n * extra field length 2 bytes\n *\n * file name (variable size)\n * extra field (variable size)\n */\nexport class FileHeader {\n constructor(private data: Buffer) {\n if (data.readUInt32LE(0) !== 0x04034b50) {\n throw new ApiError(ErrorCode.EINVAL, \"Invalid Zip file: Local file header has invalid signature: \" + this.data.readUInt32LE(0));\n }\n }\n public versionNeeded(): number { return this.data.readUInt16LE(4); }\n public flags(): number { return this.data.readUInt16LE(6); }\n public compressionMethod(): CompressionMethod { return this.data.readUInt16LE(8); }\n public lastModFileTime(): Date {\n // Time and date is in MS-DOS format.\n return msdos2date(this.data.readUInt16LE(10), this.data.readUInt16LE(12));\n }\n public rawLastModFileTime(): number {\n return this.data.readUInt32LE(10);\n }\n public crc32(): number { return this.data.readUInt32LE(14); }\n /**\n * These two values are COMPLETELY USELESS.\n *\n * Section 4.4.9:\n * If bit 3 of the general purpose bit flag is set,\n * these fields are set to zero in the local header and the\n * correct values are put in the data descriptor and\n * in the central directory.\n *\n * So we'll just use the central directory's values.\n */\n // public compressedSize(): number { return this.data.readUInt32LE(18); }\n // public uncompressedSize(): number { return this.data.readUInt32LE(22); }\n public fileNameLength(): number { return this.data.readUInt16LE(26); }\n public extraFieldLength(): number { return this.data.readUInt16LE(28); }\n public fileName(): string {\n return safeToString(this.data, this.useUTF8(), 30, this.fileNameLength());\n }\n public extraField(): Buffer {\n const start = 30 + this.fileNameLength();\n return this.data.slice(start, start + this.extraFieldLength());\n }\n public totalSize(): number { return 30 + this.fileNameLength() + this.extraFieldLength(); }\n public useUTF8(): boolean { return (this.flags() & 0x800) === 0x800; }\n}\n\n/**\n * 4.3.8 File data\n *\n * Immediately following the local header for a file\n * SHOULD be placed the compressed or stored data for the file.\n * If the file is encrypted, the encryption header for the file\n * SHOULD be placed after the local header and before the file\n * data. The series of [local file header][encryption header]\n * [file data][data descriptor] repeats for each file in the\n * .ZIP archive.\n *\n * Zero-byte files, directories, and other file types that\n * contain no content MUST not include file data.\n */\nexport class FileData {\n constructor(private header: FileHeader, private record: CentralDirectory, private data: Buffer) {}\n public decompress(): Buffer {\n // Check the compression\n const compressionMethod: CompressionMethod = this.header.compressionMethod();\n const fcn = decompressionMethods[compressionMethod];\n if (fcn) {\n return fcn(this.data, this.record.compressedSize(), this.record.uncompressedSize(), this.record.flag());\n } else {\n let name: string = CompressionMethod[compressionMethod];\n if (!name) {\n name = `Unknown: ${compressionMethod}`;\n }\n throw new ApiError(ErrorCode.EINVAL, `Invalid compression method on file '${this.header.fileName()}': ${name}`);\n }\n }\n public getHeader(): FileHeader {\n return this.header;\n }\n public getRecord(): CentralDirectory {\n return this.record;\n }\n public getRawData(): Buffer {\n return this.data;\n }\n}\n\n/**\n * 4.3.9 Data descriptor:\n *\n * crc-32 4 bytes\n * compressed size 4 bytes\n * uncompressed size 4 bytes\n */\nexport class DataDescriptor {\n constructor(private data: Buffer) {}\n public crc32(): number { return this.data.readUInt32LE(0); }\n public compressedSize(): number { return this.data.readUInt32LE(4); }\n public uncompressedSize(): number { return this.data.readUInt32LE(8); }\n}\n\n/*\n` 4.3.10 Archive decryption header:\n\n 4.3.10.1 The Archive Decryption Header is introduced in version 6.2\n of the ZIP format specification. This record exists in support\n of the Central Directory Encryption Feature implemented as part of\n the Strong Encryption Specification as described in this document.\n When the Central Directory Structure is encrypted, this decryption\n header MUST precede the encrypted data segment.\n */\n/**\n * 4.3.11 Archive extra data record:\n *\n * archive extra data signature 4 bytes (0x08064b50)\n * extra field length 4 bytes\n * extra field data (variable size)\n *\n * 4.3.11.1 The Archive Extra Data Record is introduced in version 6.2\n * of the ZIP format specification. This record MAY be used in support\n * of the Central Directory Encryption Feature implemented as part of\n * the Strong Encryption Specification as described in this document.\n * When present, this record MUST immediately precede the central\n * directory data structure.\n */\nexport class ArchiveExtraDataRecord {\n constructor(private data: Buffer) {\n if (this.data.readUInt32LE(0) !== 0x08064b50) {\n throw new ApiError(ErrorCode.EINVAL, \"Invalid archive extra data record signature: \" + this.data.readUInt32LE(0));\n }\n }\n public length(): number { return this.data.readUInt32LE(4); }\n public extraFieldData(): Buffer { return this.data.slice(8, 8 + this.length()); }\n}\n\n/**\n * 4.3.13 Digital signature:\n *\n * header signature 4 bytes (0x05054b50)\n * size of data 2 bytes\n * signature data (variable size)\n *\n * With the introduction of the Central Directory Encryption\n * feature in version 6.2 of this specification, the Central\n * Directory Structure MAY be stored both compressed and encrypted.\n * Although not required, it is assumed when encrypting the\n * Central Directory Structure, that it will be compressed\n * for greater storage efficiency. Information on the\n * Central Directory Encryption feature can be found in the section\n * describing the Strong Encryption Specification. The Digital\n * Signature record will be neither compressed nor encrypted.\n */\nexport class DigitalSignature {\n constructor(private data: Buffer) {\n if (this.data.readUInt32LE(0) !== 0x05054b50) {\n throw new ApiError(ErrorCode.EINVAL, \"Invalid digital signature signature: \" + this.data.readUInt32LE(0));\n }\n }\n public size(): number { return this.data.readUInt16LE(4); }\n public signatureData(): Buffer { return this.data.slice(6, 6 + this.size()); }\n}\n\n/**\n * 4.3.12 Central directory structure:\n *\n * central file header signature 4 bytes (0x02014b50)\n * version made by 2 bytes\n * version needed to extract 2 bytes\n * general purpose bit flag 2 bytes\n * compression method 2 bytes\n * last mod file time 2 bytes\n * last mod file date 2 bytes\n * crc-32 4 bytes\n * compressed size 4 bytes\n * uncompressed size 4 bytes\n * file name length 2 bytes\n * extra field length 2 bytes\n * file comment length 2 bytes\n * disk number start 2 bytes\n * internal file attributes 2 bytes\n * external file attributes 4 bytes\n * relative offset of local header 4 bytes\n *\n * file name (variable size)\n * extra field (variable size)\n * file comment (variable size)\n */\nexport class CentralDirectory {\n // Optimization: The filename is frequently read, so stash it here.\n private _filename: string;\n constructor(private zipData: Buffer, private data: Buffer) {\n // Sanity check.\n if (this.data.readUInt32LE(0) !== 0x02014b50) {\n throw new ApiError(ErrorCode.EINVAL, `Invalid Zip file: Central directory record has invalid signature: ${this.data.readUInt32LE(0)}`);\n }\n this._filename = this.produceFilename();\n }\n public versionMadeBy(): number { return this.data.readUInt16LE(4); }\n public versionNeeded(): number { return this.data.readUInt16LE(6); }\n public flag(): number { return this.data.readUInt16LE(8); }\n public compressionMethod(): CompressionMethod { return this.data.readUInt16LE(10); }\n public lastModFileTime(): Date {\n // Time and date is in MS-DOS format.\n return msdos2date(this.data.readUInt16LE(12), this.data.readUInt16LE(14));\n }\n public rawLastModFileTime(): number {\n return this.data.readUInt32LE(12);\n }\n public crc32(): number { return this.data.readUInt32LE(16); }\n public compressedSize(): number { return this.data.readUInt32LE(20); }\n public uncompressedSize(): number { return this.data.readUInt32LE(24); }\n public fileNameLength(): number { return this.data.readUInt16LE(28); }\n public extraFieldLength(): number { return this.data.readUInt16LE(30); }\n public fileCommentLength(): number { return this.data.readUInt16LE(32); }\n public diskNumberStart(): number { return this.data.readUInt16LE(34); }\n public internalAttributes(): number { return this.data.readUInt16LE(36); }\n public externalAttributes(): number { return this.data.readUInt32LE(38); }\n public headerRelativeOffset(): number { return this.data.readUInt32LE(42); }\n public produceFilename(): string {\n /*\n 4.4.17.1 claims:\n * All slashes are forward ('/') slashes.\n * Filename doesn't begin with a slash.\n * No drive letters or any nonsense like that.\n * If filename is missing, the input came from standard input.\n\n Unfortunately, this isn't true in practice. Some Windows zip utilities use\n a backslash here, but the correct Unix-style path in file headers.\n\n To avoid seeking all over the file to recover the known-good filenames\n from file headers, we simply convert '/' to '\\' here.\n */\n const fileName: string = safeToString(this.data, this.useUTF8(), 46, this.fileNameLength());\n return fileName.replace(/\\\\/g, \"/\");\n }\n public fileName(): string {\n return this._filename;\n }\n public rawFileName(): Buffer {\n return this.data.slice(46, 46 + this.fileNameLength());\n }\n public extraField(): Buffer {\n const start = 44 + this.fileNameLength();\n return this.data.slice(start, start + this.extraFieldLength());\n }\n public fileComment(): string {\n const start = 46 + this.fileNameLength() + this.extraFieldLength();\n return safeToString(this.data, this.useUTF8(), start, this.fileCommentLength());\n }\n public rawFileComment(): Buffer {\n const start = 46 + this.fileNameLength() + this.extraFieldLength();\n return this.data.slice(start, start + this.fileCommentLength());\n }\n public totalSize(): number {\n return 46 + this.fileNameLength() + this.extraFieldLength() + this.fileCommentLength();\n }\n public isDirectory(): boolean {\n // NOTE: This assumes that the zip file implementation uses the lower byte\n // of external attributes for DOS attributes for\n // backwards-compatibility. This is not mandated, but appears to be\n // commonplace.\n // According to the spec, the layout of external attributes is\n // platform-dependent.\n // If that fails, we also check if the name of the file ends in '/',\n // which is what Java's ZipFile implementation does.\n const fileName = this.fileName();\n return (this.externalAttributes() & 0x10 ? true : false) || (fileName.charAt(fileName.length - 1) === '/');\n }\n public isFile(): boolean { return !this.isDirectory(); }\n public useUTF8(): boolean { return (this.flag() & 0x800) === 0x800; }\n public isEncrypted(): boolean { return (this.flag() & 0x1) === 0x1; }\n public getFileData(): FileData {\n // Need to grab the header before we can figure out where the actual\n // compressed data starts.\n const start = this.headerRelativeOffset();\n const header = new FileHeader(this.zipData.slice(start));\n return new FileData(header, this, this.zipData.slice(start + header.totalSize()));\n }\n public getData(): Buffer {\n return this.getFileData().decompress();\n }\n public getRawData(): Buffer {\n return this.getFileData().getRawData();\n }\n public getStats(): Stats {\n return new Stats(FileType.FILE, this.uncompressedSize(), 0x16D, new Date(), this.lastModFileTime());\n }\n}\n\n/**\n * 4.3.16: end of central directory record\n * end of central dir signature 4 bytes (0x06054b50)\n * number of this disk 2 bytes\n * number of the disk with the\n * start of the central directory 2 bytes\n * total number of entries in the\n * central directory on this disk 2 bytes\n * total number of entries in\n * the central directory 2 bytes\n * size of the central directory 4 bytes\n * offset of start of central\n * directory with respect to\n * the starting disk number 4 bytes\n * .ZIP file comment length 2 bytes\n * .ZIP file comment (variable size)\n */\nexport class EndOfCentralDirectory {\n constructor(private data: Buffer) {\n if (this.data.readUInt32LE(0) !== 0x06054b50) {\n throw new ApiError(ErrorCode.EINVAL, `Invalid Zip file: End of central directory record has invalid signature: ${this.data.readUInt32LE(0)}`);\n }\n }\n public diskNumber(): number { return this.data.readUInt16LE(4); }\n public cdDiskNumber(): number { return this.data.readUInt16LE(6); }\n public cdDiskEntryCount(): number { return this.data.readUInt16LE(8); }\n public cdTotalEntryCount(): number { return this.data.readUInt16LE(10); }\n public cdSize(): number { return this.data.readUInt32LE(12); }\n public cdOffset(): number { return this.data.readUInt32LE(16); }\n public cdZipCommentLength(): number { return this.data.readUInt16LE(20); }\n public cdZipComment(): string {\n // Assuming UTF-8. The specification doesn't specify.\n return safeToString(this.data, true, 22, this.cdZipCommentLength());\n }\n public rawCdZipComment(): Buffer {\n return this.data.slice(22, 22 + this.cdZipCommentLength());\n }\n}\n\n/**\n * Contains the table of contents of a Zip file.\n */\nexport class ZipTOC {\n constructor(public index: FileIndex, public directoryEntries: CentralDirectory[], public eocd: EndOfCentralDirectory, public data: Buffer) {\n }\n}\n\n/**\n * Configuration options for a ZipFS file system.\n */\nexport interface ZipFSOptions {\n // The zip file as a binary buffer.\n zipData: Buffer;\n // The name of the zip file (optional).\n name?: string;\n}\n\n/**\n * Zip file-backed filesystem\n * Implemented according to the standard:\n * http://www.pkware.com/documents/casestudies/APPNOTE.TXT\n *\n * While there are a few zip libraries for JavaScript (e.g. JSZip and zip.js),\n * they are not a good match for BrowserFS. In particular, these libraries\n * perform a lot of unneeded data copying, and eagerly decompress every file\n * in the zip file upon loading to check the CRC32. They also eagerly decode\n * strings. Furthermore, these libraries duplicate functionality already present\n * in BrowserFS (e.g. UTF-8 decoding and binary data manipulation).\n *\n * This filesystem takes advantage of BrowserFS's Buffer implementation, which\n * efficiently represents the zip file in memory (in both ArrayBuffer-enabled\n * browsers *and* non-ArrayBuffer browsers), and which can neatly be 'sliced'\n * without copying data. Each struct defined in the standard is represented with\n * a buffer slice pointing to an offset in the zip file, and has getters for\n * each field. As we anticipate that this data will not be read often, we choose\n * not to store each struct field in the JavaScript object; instead, to reduce\n * memory consumption, we retrieve it directly from the binary data each time it\n * is requested.\n *\n * When the filesystem is instantiated, we determine the directory structure\n * of the zip file as quickly as possible. We lazily decompress and check the\n * CRC32 of files. We do not cache decompressed files; if this is a desired\n * feature, it is best implemented as a generic file system wrapper that can\n * cache data from arbitrary file systems.\n *\n * For inflation, we use `pako`'s implementation:\n * https://github.com/nodeca/pako\n *\n * Current limitations:\n * * No encryption.\n * * No ZIP64 support.\n * * Read-only.\n * Write support would require that we:\n * - Keep track of changed/new files.\n * - Compress changed files, and generate appropriate metadata for each.\n * - Update file offsets for other files in the zip file.\n * - Stream it out to a location.\n * This isn't that bad, so we might do this at a later date.\n */\nexport default class ZipFS extends SynchronousFileSystem implements FileSystem {\n public static readonly Name = \"ZipFS\";\n\n public static readonly Options: FileSystemOptions = {\n zipData: {\n type: \"object\",\n description: \"The zip file as a Buffer object.\",\n validator: bufferValidator\n },\n name: {\n type: \"string\",\n optional: true,\n description: \"The name of the zip file (optional).\"\n }\n };\n\n public static readonly CompressionMethod = CompressionMethod;\n\n /**\n * Constructs a ZipFS instance with the given options.\n */\n public static Create(opts: ZipFSOptions, cb: BFSCallback): void {\n try {\n ZipFS.computeIndex(opts.zipData, (zipTOC) => {\n const fs = new ZipFS(zipTOC, opts.name, false);\n cb(null, fs);\n }, false);\n } catch (e) {\n cb(e);\n }\n }\n\n public static isAvailable(): boolean { return true; }\n\n public static RegisterDecompressionMethod(m: CompressionMethod, fcn: (data: Buffer, compressedSize: number, uncompressedSize: number, flags: number) => Buffer): void {\n decompressionMethods[m] = fcn;\n }\n\n /**\n * **Deprecated. Please use ZipFS.Create() method instead.**\n */\n public static computeIndex(data: Buffer, cb: (zipTOC: ZipTOC) => void, deprecateMsg = true) {\n // TODO: Refactor to plumb errors through. Right now, they throw.\n if (deprecateMsg) {\n console.warn(`[ZipFS] ZipFS.computeIndex is now deprecated, and will be removed in the next major release. Please update your code to use 'ZipFS.Create({ zipData: zip file as a Buffer}, cb)' instead.`);\n }\n const index: FileIndex = new FileIndex();\n const eocd: EndOfCentralDirectory = ZipFS.getEOCD(data);\n if (eocd.diskNumber() !== eocd.cdDiskNumber()) {\n throw new ApiError(ErrorCode.EINVAL, \"ZipFS does not support spanned zip files.\");\n }\n\n const cdPtr = eocd.cdOffset();\n if (cdPtr === 0xFFFFFFFF) {\n throw new ApiError(ErrorCode.EINVAL, \"ZipFS does not support Zip64.\");\n }\n const cdEnd = cdPtr + eocd.cdSize();\n ZipFS.computeIndexResponsive(data, index, cdPtr, cdEnd, cb, [], eocd);\n }\n\n /**\n * Locates the end of central directory record at the end of the file.\n * Throws an exception if it cannot be found.\n */\n private static getEOCD(data: Buffer): EndOfCentralDirectory {\n // Unfortunately, the comment is variable size and up to 64K in size.\n // We assume that the magic signature does not appear in the comment, and\n // in the bytes between the comment and the signature. Other ZIP\n // implementations make this same assumption, since the alternative is to\n // read thread every entry in the file to get to it. :(\n // These are *negative* offsets from the end of the file.\n const startOffset = 22;\n const endOffset = Math.min(startOffset + 0xFFFF, data.length - 1);\n // There's not even a byte alignment guarantee on the comment so we need to\n // search byte by byte. *grumble grumble*\n for (let i = startOffset; i < endOffset; i++) {\n // Magic number: EOCD Signature\n if (data.readUInt32LE(data.length - i) === 0x06054b50) {\n return new EndOfCentralDirectory(data.slice(data.length - i));\n }\n }\n throw new ApiError(ErrorCode.EINVAL, \"Invalid ZIP file: Could not locate End of Central Directory signature.\");\n }\n\n private static addToIndex(cd: CentralDirectory, index: FileIndex) {\n // Paths must be absolute, yet zip file paths are always relative to the\n // zip root. So we append '/' and call it a day.\n let filename = cd.fileName();\n if (filename.charAt(0) === '/') {\n throw new Error(\"WHY IS THIS ABSOLUTE\");\n }\n // XXX: For the file index, strip the trailing '/'.\n if (filename.charAt(filename.length - 1) === '/') {\n filename = filename.substr(0, filename.length - 1);\n }\n\n if (cd.isDirectory()) {\n index.addPathFast('/' + filename, new DirInode(cd));\n } else {\n index.addPathFast('/' + filename, new FileInode(cd));\n }\n }\n\n private static computeIndexResponsive(data: Buffer, index: FileIndex, cdPtr: number, cdEnd: number, cb: (zipTOC: ZipTOC) => void, cdEntries: CentralDirectory[], eocd: EndOfCentralDirectory) {\n if (cdPtr < cdEnd) {\n let count = 0;\n while (count++ < 200 && cdPtr < cdEnd) {\n const cd: CentralDirectory = new CentralDirectory(data, data.slice(cdPtr));\n ZipFS.addToIndex(cd, index);\n cdPtr += cd.totalSize();\n cdEntries.push(cd);\n }\n setImmediate(() => {\n ZipFS.computeIndexResponsive(data, index, cdPtr, cdEnd, cb, cdEntries, eocd);\n });\n } else {\n cb(new ZipTOC(index, cdEntries, eocd, data));\n }\n }\n\n private _index: FileIndex = new FileIndex();\n private _directoryEntries: CentralDirectory[] = [];\n private _eocd: EndOfCentralDirectory | null = null;\n private data: Buffer;\n\n /**\n * **Deprecated. Please use ZipFS.Create() method to construct ZipFS objects.**\n */\n constructor(input: Buffer | ZipTOC, private name: string = '', deprecateMsg = true) {\n super();\n deprecationMessage(deprecateMsg, ZipFS.Name, {zipData: \"zip data as a Buffer\", name: name});\n if (input instanceof ZipTOC) {\n this._index = input.index;\n this._directoryEntries = input.directoryEntries;\n this._eocd = input.eocd;\n this.data = input.data;\n } else {\n this.data = input as Buffer;\n this.populateIndex();\n }\n }\n\n public getName(): string {\n return ZipFS.Name + (this.name !== '' ? ` ${this.name}` : '');\n }\n\n /**\n * Get the CentralDirectory object for the given path.\n */\n public getCentralDirectoryEntry(path: string): CentralDirectory {\n const inode = this._index.getInode(path);\n if (inode === null) {\n throw ApiError.ENOENT(path);\n }\n if (isFileInode(inode)) {\n return inode.getData();\n } else if (isDirInode(inode)) {\n return inode.getData()!;\n } else {\n // Should never occur.\n throw ApiError.EPERM(`Invalid inode: ${inode}`);\n }\n }\n\n public getCentralDirectoryEntryAt(index: number): CentralDirectory {\n const dirEntry = this._directoryEntries[index];\n if (!dirEntry) {\n throw new RangeError(`Invalid directory index: ${index}.`);\n }\n return dirEntry;\n }\n\n public getNumberOfCentralDirectoryEntries(): number {\n return this._directoryEntries.length;\n }\n\n public getEndOfCentralDirectory(): EndOfCentralDirectory | null {\n return this._eocd;\n }\n\n public diskSpace(path: string, cb: (total: number, free: number) => void): void {\n // Read-only file system.\n cb(this.data.length, 0);\n }\n\n public isReadOnly(): boolean {\n return true;\n }\n\n public supportsLinks(): boolean {\n return false;\n }\n\n public supportsProps(): boolean {\n return false;\n }\n\n public supportsSynch(): boolean {\n return true;\n }\n\n public statSync(path: string, isLstat: boolean): Stats {\n const inode = this._index.getInode(path);\n if (inode === null) {\n throw ApiError.ENOENT(path);\n }\n let stats: Stats;\n if (isFileInode(inode)) {\n stats = inode.getData().getStats();\n } else if (isDirInode(inode)) {\n stats = inode.getStats();\n } else {\n throw new ApiError(ErrorCode.EINVAL, \"Invalid inode.\");\n }\n return stats;\n }\n\n public openSync(path: string, flags: FileFlag, mode: number): File {\n // INVARIANT: Cannot write to RO file systems.\n if (flags.isWriteable()) {\n throw new ApiError(ErrorCode.EPERM, path);\n }\n // Check if the path exists, and is a file.\n const inode = this._index.getInode(path);\n if (!inode) {\n throw ApiError.ENOENT(path);\n } else if (isFileInode(inode)) {\n const cdRecord = inode.getData();\n const stats = cdRecord.getStats();\n switch (flags.pathExistsAction()) {\n case ActionType.THROW_EXCEPTION:\n case ActionType.TRUNCATE_FILE:\n throw ApiError.EEXIST(path);\n case ActionType.NOP:\n return new NoSyncFile(this, path, flags, stats, cdRecord.getData());\n default:\n throw new ApiError(ErrorCode.EINVAL, 'Invalid FileMode object.');\n }\n } else {\n throw ApiError.EISDIR(path);\n }\n }\n\n public readdirSync(path: string): string[] {\n // Check if it exists.\n const inode = this._index.getInode(path);\n if (!inode) {\n throw ApiError.ENOENT(path);\n } else if (isDirInode(inode)) {\n return inode.getListing();\n } else {\n throw ApiError.ENOTDIR(path);\n }\n }\n\n /**\n * Specially-optimized readfile.\n */\n public readFileSync(fname: string, encoding: string, flag: FileFlag): any {\n // Get file.\n const fd = this.openSync(fname, flag, 0x1a4);\n try {\n const fdCast = > fd;\n const fdBuff = fdCast.getBuffer();\n if (encoding === null) {\n return copyingSlice(fdBuff);\n }\n return fdBuff.toString(encoding);\n } finally {\n fd.closeSync();\n }\n }\n\n private populateIndex() {\n const eocd: EndOfCentralDirectory = this._eocd = ZipFS.getEOCD(this.data);\n if (eocd.diskNumber() !== eocd.cdDiskNumber()) {\n throw new ApiError(ErrorCode.EINVAL, \"ZipFS does not support spanned zip files.\");\n }\n\n let cdPtr = eocd.cdOffset();\n if (cdPtr === 0xFFFFFFFF) {\n throw new ApiError(ErrorCode.EINVAL, \"ZipFS does not support Zip64.\");\n }\n const cdEnd = cdPtr + eocd.cdSize();\n while (cdPtr < cdEnd) {\n const cd: CentralDirectory = new CentralDirectory(this.data, this.data.slice(cdPtr));\n cdPtr += cd.totalSize();\n ZipFS.addToIndex(cd, this._index);\n this._directoryEntries.push(cd);\n }\n }\n}\n\nZipFS.RegisterDecompressionMethod(CompressionMethod.DEFLATE, (data, compressedSize, uncompressedSize) => {\n return arrayish2Buffer(inflateRaw(\n data.slice(0, compressedSize),\n { chunkSize: uncompressedSize }\n ));\n});\n\nZipFS.RegisterDecompressionMethod(CompressionMethod.STORED, (data, compressedSize, uncompressedSize) => {\n return copyingSlice(data, 0, uncompressedSize);\n});\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/ZipFS.ts","import {ApiError, ErrorCode} from '../core/api_error';\nimport {default as Stats, FileType} from '../core/node_fs_stats';\nimport {SynchronousFileSystem, FileSystem, BFSCallback, FileSystemOptions} from '../core/file_system';\nimport {File} from '../core/file';\nimport {FileFlag, ActionType} from '../core/file_flag';\nimport {NoSyncFile} from '../generic/preload_file';\nimport {copyingSlice, deprecationMessage, bufferValidator} from '../core/util';\nimport * as path from 'path';\n\n/**\n * @hidden\n */\nconst rockRidgeIdentifier = \"IEEE_P1282\";\n/**\n * @hidden\n */\nconst enum VolumeDescriptorTypeCode {\n BootRecord = 0,\n PrimaryVolumeDescriptor = 1,\n SupplementaryVolumeDescriptor = 2,\n VolumePartitionDescriptor = 3,\n VolumeDescriptorSetTerminator = 255\n}\n\n/**\n * @hidden\n */\ntype TGetString = (d: Buffer, i: number, len: number) => string;\n\n/**\n * @hidden\n */\nfunction getASCIIString(data: Buffer, startIndex: number, length: number) {\n return data.toString('ascii', startIndex, startIndex + length).trim();\n}\n\n/**\n * @hidden\n */\nfunction getJolietString(data: Buffer, startIndex: number, length: number): string {\n if (length === 1) {\n // Special: Root, parent, current directory are still a single byte.\n return String.fromCharCode(data[startIndex]);\n }\n // UTF16-BE, which isn't natively supported by NodeJS Buffers.\n // Length should be even, but pessimistically floor just in case.\n const pairs = Math.floor(length / 2);\n const chars = new Array(pairs);\n for (let i = 0; i < pairs; i++) {\n const pos = startIndex + (i << 1);\n chars[i] = String.fromCharCode(data[pos + 1] | (data[pos] << 8));\n }\n return chars.join('');\n}\n\n/**\n * @hidden\n */\nfunction getDate(data: Buffer, startIndex: number): Date {\n const year = parseInt(getASCIIString(data, startIndex, 4), 10);\n const mon = parseInt(getASCIIString(data, startIndex + 4, 2), 10);\n const day = parseInt(getASCIIString(data, startIndex + 6, 2), 10);\n const hour = parseInt(getASCIIString(data, startIndex + 8, 2), 10);\n const min = parseInt(getASCIIString(data, startIndex + 10, 2), 10);\n const sec = parseInt(getASCIIString(data, startIndex + 12, 2), 10);\n const hundrethsSec = parseInt(getASCIIString(data, startIndex + 14, 2), 10);\n // Last is a time-zone offset, but JavaScript dates don't support time zones well.\n return new Date(year, mon, day, hour, min, sec, hundrethsSec * 100);\n}\n\n/**\n * @hidden\n */\nfunction getShortFormDate(data: Buffer, startIndex: number): Date {\n const yearsSince1900 = data[startIndex];\n const month = data[startIndex + 1];\n const day = data[startIndex + 2];\n const hour = data[startIndex + 3];\n const minute = data[startIndex + 4];\n const second = data[startIndex + 5];\n // JavaScript's Date support isn't so great; ignore timezone.\n // const offsetFromGMT = this._data[24];\n return new Date(yearsSince1900, month - 1, day, hour, minute, second);\n}\n\n/**\n * @hidden\n */\nfunction constructSystemUseEntry(bigData: Buffer, i: number): SystemUseEntry {\n const data = bigData.slice(i);\n const sue = new SystemUseEntry(data);\n switch (sue.signatureWord()) {\n case SystemUseEntrySignatures.CE:\n return new CEEntry(data);\n case SystemUseEntrySignatures.PD:\n return new PDEntry(data);\n case SystemUseEntrySignatures.SP:\n return new SPEntry(data);\n case SystemUseEntrySignatures.ST:\n return new STEntry(data);\n case SystemUseEntrySignatures.ER:\n return new EREntry(data);\n case SystemUseEntrySignatures.ES:\n return new ESEntry(data);\n case SystemUseEntrySignatures.PX:\n return new PXEntry(data);\n case SystemUseEntrySignatures.PN:\n return new PNEntry(data);\n case SystemUseEntrySignatures.SL:\n return new SLEntry(data);\n case SystemUseEntrySignatures.NM:\n return new NMEntry(data);\n case SystemUseEntrySignatures.CL:\n return new CLEntry(data);\n case SystemUseEntrySignatures.PL:\n return new PLEntry(data);\n case SystemUseEntrySignatures.RE:\n return new REEntry(data);\n case SystemUseEntrySignatures.TF:\n return new TFEntry(data);\n case SystemUseEntrySignatures.SF:\n return new SFEntry(data);\n case SystemUseEntrySignatures.RR:\n return new RREntry(data);\n default:\n return sue;\n }\n}\n\n/**\n * @hidden\n */\nfunction constructSystemUseEntries(data: Buffer, i: number, len: number, isoData: Buffer): SystemUseEntry[] {\n // If the remaining allocated space following the last recorded System Use Entry in a System\n // Use field or Continuation Area is less than four bytes long, it cannot contain a System\n // Use Entry and shall be ignored\n len = len - 4;\n let entries = new Array();\n while (i < len) {\n const entry = constructSystemUseEntry(data, i);\n const length = entry.length();\n if (length === 0) {\n // Invalid SU section; prevent infinite loop.\n return entries;\n }\n i += length;\n if (entry instanceof STEntry) {\n // ST indicates the end of entries.\n break;\n }\n if (entry instanceof CEEntry) {\n entries = entries.concat(entry.getEntries(isoData));\n } else {\n entries.push(entry);\n }\n }\n return entries;\n}\n\n/**\n * @hidden\n */\nclass VolumeDescriptor {\n protected _data: Buffer;\n constructor(data: Buffer) {\n this._data = data;\n }\n public type(): VolumeDescriptorTypeCode {\n return this._data[0];\n }\n public standardIdentifier(): string {\n return getASCIIString(this._data, 1, 5);\n }\n public version(): number {\n return this._data[6];\n }\n public data(): Buffer {\n return this._data.slice(7, 2048);\n }\n}\n\n/**\n * @hidden\n */\nabstract class PrimaryOrSupplementaryVolumeDescriptor extends VolumeDescriptor {\n private _root: DirectoryRecord | null = null;\n constructor(data: Buffer) {\n super(data);\n }\n public systemIdentifier(): string {\n return this._getString32(8);\n }\n public volumeIdentifier(): string {\n return this._getString32(40);\n }\n public volumeSpaceSize(): number {\n return this._data.readUInt32LE(80);\n }\n public volumeSetSize(): number {\n return this._data.readUInt16LE(120);\n }\n public volumeSequenceNumber(): number {\n return this._data.readUInt16LE(124);\n }\n public logicalBlockSize(): number {\n return this._data.readUInt16LE(128);\n }\n public pathTableSize(): number {\n return this._data.readUInt32LE(132);\n }\n public locationOfTypeLPathTable(): number {\n return this._data.readUInt32LE(140);\n }\n public locationOfOptionalTypeLPathTable(): number {\n return this._data.readUInt32LE(144);\n }\n public locationOfTypeMPathTable(): number {\n return this._data.readUInt32BE(148);\n }\n public locationOfOptionalTypeMPathTable(): number {\n return this._data.readUInt32BE(152);\n }\n public rootDirectoryEntry(isoData: Buffer): DirectoryRecord {\n if (this._root === null) {\n this._root = this._constructRootDirectoryRecord(this._data.slice(156));\n this._root.rootCheckForRockRidge(isoData);\n }\n return this._root;\n }\n public volumeSetIdentifier(): string {\n return this._getString(190, 128);\n }\n public publisherIdentifier(): string {\n return this._getString(318, 128);\n }\n public dataPreparerIdentifier(): string {\n return this._getString(446, 128);\n }\n public applicationIdentifier(): string {\n return this._getString(574, 128);\n }\n public copyrightFileIdentifier(): string {\n return this._getString(702, 38);\n }\n public abstractFileIdentifier(): string {\n return this._getString(740, 36);\n }\n public bibliographicFileIdentifier(): string {\n return this._getString(776, 37);\n }\n public volumeCreationDate(): Date {\n return getDate(this._data, 813);\n }\n public volumeModificationDate(): Date {\n return getDate(this._data, 830);\n }\n public volumeExpirationDate(): Date {\n return getDate(this._data, 847);\n }\n public volumeEffectiveDate(): Date {\n return getDate(this._data, 864);\n }\n public fileStructureVersion(): number {\n return this._data[881];\n }\n public applicationUsed(): Buffer {\n return this._data.slice(883, 883 + 512);\n }\n public reserved(): Buffer {\n return this._data.slice(1395, 1395 + 653);\n }\n public abstract name(): string;\n protected abstract _constructRootDirectoryRecord(data: Buffer): DirectoryRecord;\n protected abstract _getString(idx: number, len: number): string;\n protected _getString32(idx: number): string {\n return this._getString(idx, 32);\n }\n}\n\n/**\n * @hidden\n */\nclass PrimaryVolumeDescriptor extends PrimaryOrSupplementaryVolumeDescriptor {\n constructor(data: Buffer) {\n super(data);\n if (this.type() !== VolumeDescriptorTypeCode.PrimaryVolumeDescriptor) {\n throw new ApiError(ErrorCode.EIO, `Invalid primary volume descriptor.`);\n }\n }\n public name() {\n return \"ISO9660\";\n }\n protected _constructRootDirectoryRecord(data: Buffer): DirectoryRecord {\n return new ISODirectoryRecord(data, -1);\n }\n protected _getString(idx: number, len: number): string {\n return this._getString(idx, len);\n }\n}\n\n/**\n * @hidden\n */\nclass SupplementaryVolumeDescriptor extends PrimaryOrSupplementaryVolumeDescriptor {\n constructor(data: Buffer) {\n super(data);\n if (this.type() !== VolumeDescriptorTypeCode.SupplementaryVolumeDescriptor) {\n throw new ApiError(ErrorCode.EIO, `Invalid supplementary volume descriptor.`);\n }\n const escapeSequence = this.escapeSequence();\n const third = escapeSequence[2];\n // Third character identifies what 'level' of the UCS specification to follow.\n // We ignore it.\n if (escapeSequence[0] !== 0x25 || escapeSequence[1] !== 0x2F ||\n (third !== 0x40 && third !== 0x43 && third !== 0x45)) {\n throw new ApiError(ErrorCode.EIO, `Unrecognized escape sequence for SupplementaryVolumeDescriptor: ${escapeSequence.toString()}`);\n }\n }\n public name() {\n return \"Joliet\";\n }\n public escapeSequence(): Buffer {\n return this._data.slice(88, 120);\n }\n protected _constructRootDirectoryRecord(data: Buffer): DirectoryRecord {\n return new JolietDirectoryRecord(data, -1);\n }\n protected _getString(idx: number, len: number): string {\n return getJolietString(this._data, idx, len);\n }\n}\n\n/**\n * @hidden\n */\nconst enum FileFlags {\n Hidden = 1,\n Directory = 1 << 1,\n AssociatedFile = 1 << 2,\n EARContainsInfo = 1 << 3,\n EARContainsPerms = 1 << 4,\n FinalDirectoryRecordForFile = 1 << 5\n}\n\n/**\n * @hidden\n */\nabstract class DirectoryRecord {\n protected _data: Buffer;\n // Offset at which system use entries begin. Set to -1 if not enabled.\n protected _rockRidgeOffset: number;\n protected _suEntries: SystemUseEntry[] | null = null;\n private _fileOrDir: Buffer | Directory | null = null;\n constructor(data: Buffer, rockRidgeOffset: number) {\n this._data = data;\n this._rockRidgeOffset = rockRidgeOffset;\n }\n public hasRockRidge(): boolean {\n return this._rockRidgeOffset > -1;\n }\n public getRockRidgeOffset(): number {\n return this._rockRidgeOffset;\n }\n /**\n * !!ONLY VALID ON ROOT NODE!!\n * Checks if Rock Ridge is enabled, and sets the offset.\n */\n public rootCheckForRockRidge(isoData: Buffer): void {\n const dir = this.getDirectory(isoData);\n this._rockRidgeOffset = dir.getDotEntry(isoData)._getRockRidgeOffset(isoData);\n if (this._rockRidgeOffset > -1) {\n // Wipe out directory. Start over with RR knowledge.\n this._fileOrDir = null;\n }\n }\n public length(): number {\n return this._data[0];\n }\n public extendedAttributeRecordLength(): number {\n return this._data[1];\n }\n public lba(): number {\n return this._data.readUInt32LE(2) * 2048;\n }\n public dataLength(): number {\n return this._data.readUInt32LE(10);\n }\n public recordingDate(): Date {\n return getShortFormDate(this._data, 18);\n }\n public fileFlags(): number {\n return this._data[25];\n }\n public fileUnitSize(): number {\n return this._data[26];\n }\n public interleaveGapSize(): number {\n return this._data[27];\n }\n public volumeSequenceNumber(): number {\n return this._data.readUInt16LE(28);\n }\n public identifier(): string {\n return this._getString(33, this._data[32]);\n }\n public fileName(isoData: Buffer): string {\n if (this.hasRockRidge()) {\n const fn = this._rockRidgeFilename(isoData);\n if (fn !== null) {\n return fn;\n }\n }\n const ident = this.identifier();\n if (this.isDirectory(isoData)) {\n return ident;\n }\n // Files:\n // - MUST have 0x2E (.) separating the name from the extension\n // - MUST have 0x3B (;) separating the file name and extension from the version\n // Gets expanded to two-byte char in Unicode directory records.\n const versionSeparator = ident.indexOf(';');\n if (versionSeparator === -1) {\n // Some Joliet filenames lack the version separator, despite the standard\n // specifying that it should be there.\n return ident;\n } else if (ident[versionSeparator - 1] === '.') {\n // Empty extension. Do not include '.' in the filename.\n return ident.slice(0, versionSeparator - 1);\n } else {\n // Include up to version separator.\n return ident.slice(0, versionSeparator);\n }\n }\n public isDirectory(isoData: Buffer): boolean {\n let rv = !!(this.fileFlags() & FileFlags.Directory);\n // If it lacks the Directory flag, it may still be a directory if we've exceeded the directory\n // depth limit. Rock Ridge marks these as files and adds a special attribute.\n if (!rv && this.hasRockRidge()) {\n rv = this.getSUEntries(isoData).filter((e) => e instanceof CLEntry).length > 0;\n }\n return rv;\n }\n public isSymlink(isoData: Buffer): boolean {\n return this.hasRockRidge() && this.getSUEntries(isoData).filter((e) => e instanceof SLEntry).length > 0;\n }\n public getSymlinkPath(isoData: Buffer): string {\n let p = \"\";\n const entries = this.getSUEntries(isoData);\n const getStr = this._getGetString();\n for (const entry of entries) {\n if (entry instanceof SLEntry) {\n const components = entry.componentRecords();\n for (const component of components) {\n const flags = component.flags();\n if (flags & SLComponentFlags.CURRENT) {\n p += \"./\";\n } else if (flags & SLComponentFlags.PARENT) {\n p += \"../\";\n } else if (flags & SLComponentFlags.ROOT) {\n p += \"/\";\n } else {\n p += component.content(getStr);\n if (!(flags & SLComponentFlags.CONTINUE)) {\n p += '/';\n }\n }\n }\n if (!entry.continueFlag()) {\n // We are done with this link.\n break;\n }\n }\n }\n if (p.length > 1 && p[p.length - 1] === '/') {\n // Trim trailing '/'.\n return p.slice(0, p.length - 1);\n } else {\n return p;\n }\n }\n public getFile(isoData: Buffer): Buffer {\n if (this.isDirectory(isoData)) {\n throw new Error(`Tried to get a File from a directory.`);\n }\n if (this._fileOrDir === null) {\n this._fileOrDir = isoData.slice(this.lba(), this.lba() + this.dataLength());\n }\n return this._fileOrDir;\n }\n public getDirectory(isoData: Buffer): Directory {\n if (!this.isDirectory(isoData)) {\n throw new Error(`Tried to get a Directory from a file.`);\n }\n if (this._fileOrDir === null) {\n this._fileOrDir = this._constructDirectory(isoData);\n }\n return > this._fileOrDir;\n }\n public getSUEntries(isoData: Buffer): SystemUseEntry[] {\n if (!this._suEntries) {\n this._constructSUEntries(isoData);\n }\n return this._suEntries!;\n }\n protected abstract _getString(i: number, len: number): string;\n protected abstract _getGetString(): TGetString;\n protected abstract _constructDirectory(isoData: Buffer): Directory;\n protected _rockRidgeFilename(isoData: Buffer): string | null {\n const nmEntries = this.getSUEntries(isoData).filter((e) => e instanceof NMEntry);\n if (nmEntries.length === 0 || nmEntries[0].flags() & (NMFlags.CURRENT | NMFlags.PARENT)) {\n return null;\n }\n let str = '';\n const getString = this._getGetString();\n for (const e of nmEntries) {\n str += e.name(getString);\n if (!(e.flags() & NMFlags.CONTINUE)) {\n break;\n }\n }\n return str;\n }\n private _constructSUEntries(isoData: Buffer): void {\n let i = 33 + this._data[32];\n if (i % 2 === 1) {\n // Skip padding field.\n i++;\n }\n i += this._rockRidgeOffset;\n this._suEntries = constructSystemUseEntries(this._data, i, this.length(), isoData);\n }\n /**\n * !!ONLY VALID ON FIRST ENTRY OF ROOT DIRECTORY!!\n * Returns -1 if rock ridge is not enabled. Otherwise, returns the offset\n * at which system use fields begin.\n */\n private _getRockRidgeOffset(isoData: Buffer): number {\n // In the worst case, we get some garbage SU entries.\n // Fudge offset to 0 before proceeding.\n this._rockRidgeOffset = 0;\n const suEntries = this.getSUEntries(isoData);\n if (suEntries.length > 0) {\n const spEntry = suEntries[0];\n if (spEntry instanceof SPEntry && spEntry.checkBytesPass()) {\n // SUSP is in use.\n for (let i = 1; i < suEntries.length; i++) {\n const entry = suEntries[i];\n if (entry instanceof RREntry || (entry instanceof EREntry && entry.extensionIdentifier() === rockRidgeIdentifier)) {\n // Rock Ridge is in use!\n return spEntry.bytesSkipped();\n }\n }\n }\n }\n // Failed.\n this._rockRidgeOffset = -1;\n return -1;\n }\n}\n\n/**\n * @hidden\n */\nclass ISODirectoryRecord extends DirectoryRecord {\n constructor(data: Buffer, rockRidgeOffset: number) {\n super(data, rockRidgeOffset);\n }\n protected _getString(i: number, len: number): string {\n return getASCIIString(this._data, i, len);\n }\n protected _constructDirectory(isoData: Buffer): Directory {\n return new ISODirectory(this, isoData);\n }\n protected _getGetString(): TGetString {\n return getASCIIString;\n }\n}\n\n/**\n * @hidden\n */\nclass JolietDirectoryRecord extends DirectoryRecord {\n constructor(data: Buffer, rockRidgeOffset: number) {\n super(data, rockRidgeOffset);\n }\n protected _getString(i: number, len: number): string {\n return getJolietString(this._data, i, len);\n }\n protected _constructDirectory(isoData: Buffer): Directory {\n return new JolietDirectory(this, isoData);\n }\n protected _getGetString(): TGetString {\n return getJolietString;\n }\n}\n\n/**\n * @hidden\n */\nconst enum SystemUseEntrySignatures {\n CE = 0x4345,\n PD = 0x5044,\n SP = 0x5350,\n ST = 0x5354,\n ER = 0x4552,\n ES = 0x4553,\n PX = 0x5058,\n PN = 0x504E,\n SL = 0x534C,\n NM = 0x4E4D,\n CL = 0x434C,\n PL = 0x504C,\n RE = 0x5245,\n TF = 0x5446,\n SF = 0x5346,\n RR = 0x5252\n}\n\n/**\n * @hidden\n */\nclass SystemUseEntry {\n protected _data: Buffer;\n constructor(data: Buffer) {\n this._data = data;\n }\n public signatureWord(): SystemUseEntrySignatures {\n return this._data.readUInt16BE(0);\n }\n public signatureWordString(): string {\n return getASCIIString(this._data, 0, 2);\n }\n public length(): number {\n return this._data[2];\n }\n public suVersion(): number {\n return this._data[3];\n }\n}\n\n/**\n * Continuation entry.\n * @hidden\n */\nclass CEEntry extends SystemUseEntry {\n private _entries: SystemUseEntry[] | null = null;\n constructor(data: Buffer) {\n super(data);\n }\n /**\n * Logical block address of the continuation area.\n */\n public continuationLba(): number {\n return this._data.readUInt32LE(4);\n }\n /**\n * Offset into the logical block.\n */\n public continuationLbaOffset(): number {\n return this._data.readUInt32LE(12);\n }\n /**\n * Length of the continuation area.\n */\n public continuationLength(): number {\n return this._data.readUInt32LE(20);\n }\n public getEntries(isoData: Buffer): SystemUseEntry[] {\n if (!this._entries) {\n const start = this.continuationLba() * 2048 + this.continuationLbaOffset();\n this._entries = constructSystemUseEntries(isoData, start, this.continuationLength(), isoData);\n }\n return this._entries;\n }\n}\n\n/**\n * Padding entry.\n * @hidden\n */\nclass PDEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n}\n\n/**\n * Identifies that SUSP is in-use.\n * @hidden\n */\nclass SPEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public checkBytesPass(): boolean {\n return this._data[4] === 0xBE && this._data[5] === 0xEF;\n }\n public bytesSkipped(): number {\n return this._data[6];\n }\n}\n\n/**\n * Identifies the end of the SUSP entries.\n * @hidden\n */\nclass STEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n}\n\n/**\n * Specifies system-specific extensions to SUSP.\n * @hidden\n */\nclass EREntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public identifierLength(): number {\n return this._data[4];\n }\n public descriptorLength(): number {\n return this._data[5];\n }\n public sourceLength(): number {\n return this._data[6];\n }\n public extensionVersion(): number {\n return this._data[7];\n }\n public extensionIdentifier(): string {\n return getASCIIString(this._data, 8, this.identifierLength());\n }\n public extensionDescriptor(): string {\n return getASCIIString(this._data, 8 + this.identifierLength(), this.descriptorLength());\n }\n public extensionSource(): string {\n return getASCIIString(this._data, 8 + this.identifierLength() + this.descriptorLength(), this.sourceLength());\n }\n}\n\n/**\n * @hidden\n */\nclass ESEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public extensionSequence(): number {\n return this._data[4];\n }\n}\n\n/**\n * RockRidge: Marks that RockRidge is in use [deprecated]\n * @hidden\n */\nclass RREntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n}\n\n/**\n * RockRidge: Records POSIX file attributes.\n * @hidden\n */\nclass PXEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public mode(): number {\n return this._data.readUInt32LE(4);\n }\n public fileLinks(): number {\n return this._data.readUInt32LE(12);\n }\n public uid(): number {\n return this._data.readUInt32LE(20);\n }\n public gid(): number {\n return this._data.readUInt32LE(28);\n }\n public inode(): number {\n return this._data.readUInt32LE(36);\n }\n}\n\n/**\n * RockRidge: Records POSIX device number.\n * @hidden\n */\nclass PNEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public devTHigh(): number {\n return this._data.readUInt32LE(4);\n }\n public devTLow(): number {\n return this._data.readUInt32LE(12);\n }\n}\n\n/**\n * RockRidge: Records symbolic link\n * @hidden\n */\nclass SLEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public flags(): number {\n return this._data[4];\n }\n public continueFlag(): number {\n return this.flags() & 0x1;\n }\n public componentRecords(): SLComponentRecord[] {\n const records = new Array();\n let i = 5;\n while (i < this.length()) {\n const record = new SLComponentRecord(this._data.slice(i));\n records.push(record);\n i += record.length();\n }\n return records;\n }\n}\n\n/**\n * @hidden\n */\nconst enum SLComponentFlags {\n CONTINUE = 1,\n CURRENT = 1 << 1,\n PARENT = 1 << 2,\n ROOT = 1 << 3\n}\n\n/**\n * @hidden\n */\nclass SLComponentRecord {\n private _data: Buffer;\n constructor(data: Buffer) {\n this._data = data;\n }\n public flags(): SLComponentFlags {\n return this._data[0];\n }\n public length(): number {\n return 2 + this.componentLength();\n }\n public componentLength(): number {\n return this._data[1];\n }\n public content(getString: TGetString): string {\n return getString(this._data, 2, this.componentLength());\n }\n}\n\n/**\n * @hidden\n */\nconst enum NMFlags {\n CONTINUE = 1,\n CURRENT = 1 << 1,\n PARENT = 1 << 2\n}\n\n/**\n * RockRidge: Records alternate file name\n * @hidden\n */\nclass NMEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public flags(): NMFlags {\n return this._data[4];\n }\n public name(getString: TGetString): string {\n return getString(this._data, 5, this.length() - 5);\n }\n}\n\n/**\n * RockRidge: Records child link\n * @hidden\n */\nclass CLEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public childDirectoryLba(): number {\n return this._data.readUInt32LE(4);\n }\n}\n\n/**\n * RockRidge: Records parent link.\n * @hidden\n */\nclass PLEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public parentDirectoryLba(): number {\n return this._data.readUInt32LE(4);\n }\n}\n\n/**\n * RockRidge: Records relocated directory.\n * @hidden\n */\nclass REEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n}\n\n/**\n * @hidden\n */\nconst enum TFFlags {\n CREATION = 1,\n MODIFY = 1 << 1,\n ACCESS = 1 << 2,\n ATTRIBUTES = 1 << 3,\n BACKUP = 1 << 4,\n EXPIRATION = 1 << 5,\n EFFECTIVE = 1 << 6,\n LONG_FORM = 1 << 7\n}\n\n/**\n * RockRidge: Records file timestamps\n * @hidden\n */\nclass TFEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public flags(): number {\n return this._data[4];\n }\n public creation(): Date | null {\n if (this.flags() & TFFlags.CREATION) {\n if (this._longFormDates()) {\n return getDate(this._data, 5);\n } else {\n return getShortFormDate(this._data, 5);\n }\n } else {\n return null;\n }\n }\n public modify(): Date | null {\n if (this.flags() & TFFlags.MODIFY) {\n const previousDates = (this.flags() & TFFlags.CREATION) ? 1 : 0;\n if (this._longFormDates) {\n return getDate(this._data, 5 + (previousDates * 17));\n } else {\n return getShortFormDate(this._data, 5 + (previousDates * 7));\n }\n } else {\n return null;\n }\n }\n public access(): Date | null {\n if (this.flags() & TFFlags.ACCESS) {\n let previousDates = (this.flags() & TFFlags.CREATION) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.MODIFY) ? 1 : 0;\n if (this._longFormDates) {\n return getDate(this._data, 5 + (previousDates * 17));\n } else {\n return getShortFormDate(this._data, 5 + (previousDates * 7));\n }\n } else {\n return null;\n }\n }\n public backup(): Date | null {\n if (this.flags() & TFFlags.BACKUP) {\n let previousDates = (this.flags() & TFFlags.CREATION) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.MODIFY) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.ACCESS) ? 1 : 0;\n if (this._longFormDates) {\n return getDate(this._data, 5 + (previousDates * 17));\n } else {\n return getShortFormDate(this._data, 5 + (previousDates * 7));\n }\n } else {\n return null;\n }\n }\n public expiration(): Date | null {\n if (this.flags() & TFFlags.EXPIRATION) {\n let previousDates = (this.flags() & TFFlags.CREATION) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.MODIFY) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.ACCESS) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.BACKUP) ? 1 : 0;\n if (this._longFormDates) {\n return getDate(this._data, 5 + (previousDates * 17));\n } else {\n return getShortFormDate(this._data, 5 + (previousDates * 7));\n }\n } else {\n return null;\n }\n }\n public effective(): Date | null {\n if (this.flags() & TFFlags.EFFECTIVE) {\n let previousDates = (this.flags() & TFFlags.CREATION) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.MODIFY) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.ACCESS) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.BACKUP) ? 1 : 0;\n previousDates += (this.flags() & TFFlags.EXPIRATION) ? 1 : 0;\n if (this._longFormDates) {\n return getDate(this._data, 5 + (previousDates * 17));\n } else {\n return getShortFormDate(this._data, 5 + (previousDates * 7));\n }\n } else {\n return null;\n }\n }\n private _longFormDates(): boolean {\n return !!(this.flags() && TFFlags.LONG_FORM);\n }\n}\n\n/**\n * RockRidge: File data in sparse format.\n * @hidden\n */\nclass SFEntry extends SystemUseEntry {\n constructor(data: Buffer) {\n super(data);\n }\n public virtualSizeHigh(): number {\n return this._data.readUInt32LE(4);\n }\n public virtualSizeLow(): number {\n return this._data.readUInt32LE(12);\n }\n public tableDepth(): number {\n return this._data[20];\n }\n}\n\n/**\n * @hidden\n */\nabstract class Directory {\n protected _record: T;\n private _fileList: string[] = [];\n private _fileMap: {[name: string]: T} = {};\n constructor(record: T, isoData: Buffer) {\n this._record = record;\n let i = record.lba();\n let iLimit = i + record.dataLength();\n if (!(record.fileFlags() & FileFlags.Directory)) {\n // Must have a CL entry.\n const cl = record.getSUEntries(isoData).filter((e) => e instanceof CLEntry)[0];\n i = cl.childDirectoryLba() * 2048;\n iLimit = Infinity;\n }\n\n while (i < iLimit) {\n const len = isoData[i];\n // Zero-padding between sectors.\n // TODO: Could optimize this to seek to nearest-sector upon\n // seeing a 0.\n if (len === 0) {\n i++;\n continue;\n }\n const r = this._constructDirectoryRecord(isoData.slice(i));\n const fname = r.fileName(isoData);\n // Skip '.' and '..' entries.\n if (fname !== '\\u0000' && fname !== '\\u0001') {\n // Skip relocated entries.\n if (!r.hasRockRidge() || r.getSUEntries(isoData).filter((e) => e instanceof REEntry).length === 0) {\n this._fileMap[fname] = r;\n this._fileList.push(fname);\n }\n } else if (iLimit === Infinity) {\n // First entry contains needed data.\n iLimit = i + r.dataLength();\n }\n i += r.length();\n }\n }\n /**\n * Get the record with the given name.\n * Returns undefined if not present.\n */\n public getRecord(name: string): DirectoryRecord {\n return this._fileMap[name];\n }\n public getFileList(): string[] {\n return this._fileList;\n }\n public getDotEntry(isoData: Buffer): T {\n return this._constructDirectoryRecord(isoData.slice(this._record.lba()));\n }\n protected abstract _constructDirectoryRecord(data: Buffer): T;\n}\n\n/**\n * @hidden\n */\nclass ISODirectory extends Directory {\n constructor(record: ISODirectoryRecord, isoData: Buffer) {\n super(record, isoData);\n }\n protected _constructDirectoryRecord(data: Buffer): ISODirectoryRecord {\n return new ISODirectoryRecord(data, this._record.getRockRidgeOffset());\n }\n}\n\n/**\n * @hidden\n */\nclass JolietDirectory extends Directory {\n constructor(record: JolietDirectoryRecord, isoData: Buffer) {\n super(record, isoData);\n }\n protected _constructDirectoryRecord(data: Buffer): JolietDirectoryRecord {\n return new JolietDirectoryRecord(data, this._record.getRockRidgeOffset());\n }\n}\n\n/**\n * Options for IsoFS file system instances.\n */\nexport interface IsoFSOptions {\n // The ISO file in a buffer.\n data: Buffer;\n // The name of the ISO (optional; used for debug messages / identification via getName()).\n name?: string;\n}\n\n/**\n * Mounts an ISO file as a read-only file system.\n *\n * Supports:\n * * Vanilla ISO9660 ISOs\n * * Microsoft Joliet and Rock Ridge extensions to the ISO9660 standard\n */\nexport default class IsoFS extends SynchronousFileSystem implements FileSystem {\n public static readonly Name = \"IsoFS\";\n\n public static readonly Options: FileSystemOptions = {\n data: {\n type: \"object\",\n description: \"The ISO file in a buffer\",\n validator: bufferValidator\n }\n };\n\n /**\n * Creates an IsoFS instance with the given options.\n */\n public static Create(opts: IsoFSOptions, cb: BFSCallback): void {\n let fs: IsoFS | undefined;\n let e: ApiError | undefined;\n try {\n fs = new IsoFS(opts.data, opts.name, false);\n } catch (e) {\n e = e;\n } finally {\n cb(e, fs);\n }\n }\n public static isAvailable(): boolean {\n return true;\n }\n\n private _data: Buffer;\n private _pvd: PrimaryOrSupplementaryVolumeDescriptor;\n private _root: DirectoryRecord;\n private _name: string;\n\n /**\n * **Deprecated. Please use IsoFS.Create() method instead.**\n *\n * Constructs a read-only file system from the given ISO.\n * @param data The ISO file in a buffer.\n * @param name The name of the ISO (optional; used for debug messages / identification via getName()).\n */\n constructor(data: Buffer, name: string = \"\", deprecateMsg = true) {\n super();\n this._data = data;\n deprecationMessage(deprecateMsg, IsoFS.Name, {data: \"ISO data as a Buffer\", name: name});\n // Skip first 16 sectors.\n let vdTerminatorFound = false;\n let i = 16 * 2048;\n const candidateVDs = new Array();\n while (!vdTerminatorFound) {\n const slice = data.slice(i);\n const vd = new VolumeDescriptor(slice);\n switch (vd.type()) {\n case VolumeDescriptorTypeCode.PrimaryVolumeDescriptor:\n candidateVDs.push(new PrimaryVolumeDescriptor(slice));\n break;\n case VolumeDescriptorTypeCode.SupplementaryVolumeDescriptor:\n candidateVDs.push(new SupplementaryVolumeDescriptor(slice));\n break;\n case VolumeDescriptorTypeCode.VolumeDescriptorSetTerminator:\n vdTerminatorFound = true;\n break;\n }\n i += 2048;\n }\n if (candidateVDs.length === 0) {\n throw new ApiError(ErrorCode.EIO, `Unable to find a suitable volume descriptor.`);\n }\n candidateVDs.forEach((v) => {\n // Take an SVD over a PVD.\n if (!this._pvd || this._pvd.type() !== VolumeDescriptorTypeCode.SupplementaryVolumeDescriptor) {\n this._pvd = v;\n }\n });\n this._root = this._pvd.rootDirectoryEntry(data);\n this._name = name;\n }\n\n public getName(): string {\n let name = `IsoFS${this._name}${this._pvd ? `-${this._pvd.name()}` : ''}`;\n if (this._root && this._root.hasRockRidge()) {\n name += `-RockRidge`;\n }\n return name;\n }\n\n public diskSpace(path: string, cb: (total: number, free: number) => void): void {\n // Read-only file system.\n cb(this._data.length, 0);\n }\n\n public isReadOnly(): boolean {\n return true;\n }\n\n public supportsLinks(): boolean {\n return false;\n }\n\n public supportsProps(): boolean {\n return false;\n }\n\n public supportsSynch(): boolean {\n return true;\n }\n\n public statSync(p: string, isLstat: boolean): Stats {\n const record = this._getDirectoryRecord(p);\n if (record === null) {\n throw ApiError.ENOENT(p);\n }\n return this._getStats(p, record)!;\n }\n\n public openSync(p: string, flags: FileFlag, mode: number): File {\n // INVARIANT: Cannot write to RO file systems.\n if (flags.isWriteable()) {\n throw new ApiError(ErrorCode.EPERM, p);\n }\n // Check if the path exists, and is a file.\n const record = this._getDirectoryRecord(p);\n if (!record) {\n throw ApiError.ENOENT(p);\n } else if (record.isSymlink(this._data)) {\n return this.openSync(path.resolve(p, record.getSymlinkPath(this._data)), flags, mode);\n } else if (!record.isDirectory(this._data)) {\n const data = record.getFile(this._data);\n const stats = this._getStats(p, record)!;\n switch (flags.pathExistsAction()) {\n case ActionType.THROW_EXCEPTION:\n case ActionType.TRUNCATE_FILE:\n throw ApiError.EEXIST(p);\n case ActionType.NOP:\n return new NoSyncFile(this, p, flags, stats, data);\n default:\n throw new ApiError(ErrorCode.EINVAL, 'Invalid FileMode object.');\n }\n } else {\n throw ApiError.EISDIR(p);\n }\n }\n\n public readdirSync(path: string): string[] {\n // Check if it exists.\n const record = this._getDirectoryRecord(path);\n if (!record) {\n throw ApiError.ENOENT(path);\n } else if (record.isDirectory(this._data)) {\n return record.getDirectory(this._data).getFileList().slice(0);\n } else {\n throw ApiError.ENOTDIR(path);\n }\n }\n\n /**\n * Specially-optimized readfile.\n */\n public readFileSync(fname: string, encoding: string, flag: FileFlag): any {\n // Get file.\n const fd = this.openSync(fname, flag, 0x1a4);\n try {\n const fdCast = > fd;\n const fdBuff = fdCast.getBuffer();\n if (encoding === null) {\n return copyingSlice(fdBuff);\n }\n return fdBuff.toString(encoding);\n } finally {\n fd.closeSync();\n }\n }\n\n private _getDirectoryRecord(path: string): DirectoryRecord | null {\n // Special case.\n if (path === '/') {\n return this._root;\n }\n const components = path.split('/').slice(1);\n let dir = this._root;\n for (const component of components) {\n if (dir.isDirectory(this._data)) {\n dir = dir.getDirectory(this._data).getRecord(component);\n if (!dir) {\n return null;\n }\n } else {\n return null;\n }\n }\n return dir;\n }\n\n private _getStats(p: string, record: DirectoryRecord): Stats | null {\n if (record.isSymlink(this._data)) {\n const newP = path.resolve(p, record.getSymlinkPath(this._data));\n const dirRec = this._getDirectoryRecord(newP);\n if (!dirRec) {\n return null;\n }\n return this._getStats(newP, dirRec);\n } else {\n const len = record.dataLength();\n let mode = 0x16D;\n const date = record.recordingDate();\n let atime = date;\n let mtime = date;\n let ctime = date;\n if (record.hasRockRidge()) {\n const entries = record.getSUEntries(this._data);\n for (const entry of entries) {\n if (entry instanceof PXEntry) {\n mode = entry.mode();\n } else if (entry instanceof TFEntry) {\n const flags = entry.flags();\n if (flags & TFFlags.ACCESS) {\n atime = entry.access()!;\n }\n if (flags & TFFlags.MODIFY) {\n mtime = entry.modify()!;\n }\n if (flags & TFFlags.CREATION) {\n ctime = entry.creation()!;\n }\n }\n }\n }\n // Mask out writeable flags. This is a RO file system.\n mode = mode & 0x16D;\n return new Stats(record.isDirectory(this._data) ? FileType.DIRECTORY : FileType.FILE, len, mode, atime, mtime, ctime);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/backend/IsoFS.ts","import {FileSystemConstructor, BFSCallback, FileSystem} from './file_system';\nimport {ApiError} from './api_error';\nimport {checkOptions} from './util';\nimport AsyncMirror from '../backend/AsyncMirror';\nimport Dropbox from '../backend/Dropbox';\nimport Emscripten from '../backend/Emscripten';\nimport FolderAdapter from '../backend/FolderAdapter';\nimport HTML5FS from '../backend/HTML5FS';\nimport InMemory from '../backend/InMemory';\nimport IndexedDB from '../backend/IndexedDB';\nimport LocalStorage from '../backend/LocalStorage';\nimport MountableFileSystem from '../backend/MountableFileSystem';\nimport OverlayFS from '../backend/OverlayFS';\nimport WorkerFS from '../backend/WorkerFS';\nimport XmlHttpRequest from '../backend/XmlHttpRequest';\nimport ZipFS from '../backend/ZipFS';\nimport IsoFS from '../backend/IsoFS';\n\n// Monkey-patch `Create` functions to check options before file system initialization.\n[AsyncMirror, Dropbox, Emscripten, FolderAdapter, HTML5FS, InMemory, IndexedDB, IsoFS, LocalStorage, MountableFileSystem, OverlayFS, WorkerFS, XmlHttpRequest, ZipFS].forEach((fsType: FileSystemConstructor) => {\n const create = fsType.Create;\n fsType.Create = function(opts?: any, cb?: BFSCallback): void {\n const oneArg = typeof(opts) === \"function\";\n const normalizedCb = oneArg ? opts : cb;\n const normalizedOpts = oneArg ? {} : opts;\n\n function wrappedCb(e?: ApiError): void {\n if (e) {\n normalizedCb(e);\n } else {\n create.call(fsType, normalizedOpts, normalizedCb);\n }\n }\n\n checkOptions(fsType, normalizedOpts, wrappedCb);\n };\n});\n\n/**\n * @hidden\n */\nconst Backends = { AsyncMirror, Dropbox, Emscripten, FolderAdapter, HTML5FS, InMemory, IndexedDB, IsoFS, LocalStorage, MountableFileSystem, OverlayFS, WorkerFS, XmlHttpRequest, ZipFS };\n// Make sure all backends cast to FileSystemConstructor (for type checking)\nconst _: {[name: string]: FileSystemConstructor} = Backends;\n// tslint:disable-next-line:no-unused-expression\n_;\n// tslint:enable-next-line:no-unused-expression\nexport default Backends;\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/backends.ts","/**\n * BrowserFS's main module. This is exposed in the browser via the BrowserFS global.\n * Due to limitations in typedoc, we document these functions in ./typedoc.ts.\n */\n\nimport * as buffer from 'buffer';\nimport fs from './node_fs';\nimport * as path from 'path';\nimport {FileSystemConstructor, FileSystem, BFSOneArgCallback, BFSCallback} from './file_system';\nimport EmscriptenFS from '../generic/emscripten_fs';\nimport Backends from './backends';\nimport * as BFSUtils from './util';\nimport * as Errors from './api_error';\nimport setImmediate from '../generic/setImmediate';\n\nif (( process)['initializeTTYs']) {\n ( process)['initializeTTYs']();\n}\n\n/**\n * Installs BFSRequire as global `require`, a Node Buffer polyfill as the global `Buffer` variable,\n * and a Node process polyfill as the global `process` variable.\n */\nexport function install(obj: any) {\n obj.Buffer = Buffer;\n obj.process = process;\n const oldRequire = obj.require ? obj.require : null;\n // Monkey-patch require for Node-style code.\n obj.require = function(arg: string) {\n const rv = BFSRequire(arg);\n if (!rv) {\n return oldRequire.apply(null, Array.prototype.slice.call(arguments, 0));\n } else {\n return rv;\n }\n };\n}\n\n/**\n * @hidden\n */\nexport function registerFileSystem(name: string, fs: FileSystemConstructor) {\n ( Backends)[name] = fs;\n}\n\n/**\n * Polyfill for CommonJS `require()`. For example, can call `BFSRequire('fs')` to get a 'fs' module polyfill.\n */\nexport function BFSRequire(module: 'fs'): typeof fs;\nexport function BFSRequire(module: 'path'): typeof path;\nexport function BFSRequire(module: 'buffer'): typeof buffer;\nexport function BFSRequire(module: 'process'): typeof process;\nexport function BFSRequire(module: 'bfs_utils'): typeof BFSUtils;\nexport function BFSRequire(module: string): any;\nexport function BFSRequire(module: string): any {\n switch (module) {\n case 'fs':\n return fs;\n case 'path':\n return path;\n case 'buffer':\n // The 'buffer' module has 'Buffer' as a property.\n return buffer;\n case 'process':\n return process;\n case 'bfs_utils':\n return BFSUtils;\n default:\n return ( Backends)[module];\n }\n}\n\n/**\n * Initializes BrowserFS with the given root file system.\n */\nexport function initialize(rootfs: FileSystem) {\n return fs.initialize(rootfs);\n}\n\n/**\n * Creates a file system with the given configuration, and initializes BrowserFS with it.\n * See the FileSystemConfiguration type for more info on the configuration object.\n */\nexport function configure(config: FileSystemConfiguration, cb: BFSOneArgCallback): void {\n getFileSystem(config, (e, fs?) => {\n if (fs) {\n initialize(fs);\n cb();\n } else {\n cb(e);\n }\n });\n}\n\n/**\n * Specifies a file system backend type and its options.\n *\n * Individual options can recursively contain FileSystemConfiguration objects for\n * option values that require file systems.\n *\n * For example, to mirror Dropbox to LocalStorage with AsyncMirror, use the following\n * object:\n *\n * ```javascript\n * var config = {\n * fs: \"AsyncMirror\",\n * options: {\n * sync: {fs: \"LocalStorage\"},\n * async: {fs: \"Dropbox\", options: {client: anAuthenticatedDropboxSDKClient }}\n * }\n * };\n * ```\n *\n * The option object for each file system corresponds to that file system's option object passed to its `Create()` method.\n */\nexport interface FileSystemConfiguration {\n fs: string;\n options: any;\n}\n\n/**\n * Retrieve a file system with the given configuration.\n * @param config A FileSystemConfiguration object. See FileSystemConfiguration for details.\n * @param cb Called when the file system is constructed, or when an error occurs.\n */\nexport function getFileSystem(config: FileSystemConfiguration, cb: BFSCallback): void {\n const fsName = config['fs'];\n if (!fsName) {\n return cb(new Errors.ApiError(Errors.ErrorCode.EPERM, 'Missing \"fs\" property on configuration object.'));\n }\n const options = config['options'];\n let waitCount = 0;\n let called = false;\n function finish() {\n if (!called) {\n called = true;\n const fsc = ( Backends)[fsName];\n if (!fsc) {\n cb(new Errors.ApiError(Errors.ErrorCode.EPERM, `File system ${fsName} is not available in BrowserFS.`));\n } else {\n fsc.Create(options, cb);\n }\n }\n }\n\n if (options !== null && typeof(options) === \"object\") {\n let finishedIterating = false;\n const props = Object.keys(options).filter((k) => k !== 'fs');\n\n // Check recursively if other fields have 'fs' properties.\n props.forEach((p) => {\n const d = options[p];\n if (d !== null && typeof(d) === \"object\" && d['fs']) {\n waitCount++;\n getFileSystem(d, function(e, fs?) {\n waitCount--;\n if (e) {\n if (called) {\n return;\n }\n called = true;\n cb(e);\n } else {\n options[p] = fs;\n if (waitCount === 0 && finishedIterating) {\n finish();\n }\n }\n });\n }\n });\n finishedIterating = true;\n }\n if (waitCount === 0) {\n finish();\n }\n}\n\nexport {EmscriptenFS, Backends as FileSystem, Errors, setImmediate};\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/core/browserfs.ts","/**\n * BrowserFS's main entry point.\n * It installs all of the needed polyfills, and requires() the main module.\n */\n\n// IE substr does not support negative indices\nif ('ab'.substr(-1) !== 'b') {\n String.prototype.substr = function(substr: (start: number, length?: number) => string) {\n return function(this: string, start: number, length?: number): string {\n // did we get a negative start, calculate how much it is from the\n // beginning of the string\n if (start < 0) {\n start = this.length + start;\n }\n // call the original function\n return substr.call(this, start, length);\n };\n }(String.prototype.substr);\n}\n\n// Polyfill for Uint8Array.prototype.slice.\n// Safari and some other browsers do not define it.\nif (typeof(ArrayBuffer) !== 'undefined' && typeof(Uint8Array) !== 'undefined') {\n if (!Uint8Array.prototype['slice']) {\n Uint8Array.prototype.slice = function(this: Uint8Array, start: number = 0, end: number = this.length): Uint8Array {\n const self: Uint8Array = this;\n if (start < 0) {\n start = this.length + start;\n if (start < 0) {\n start = 0;\n }\n }\n if (end < 0) {\n end = this.length + end;\n if (end < 0) {\n end = 0;\n }\n }\n if (end < start) {\n end = start;\n }\n return new Uint8Array(self.buffer, self.byteOffset + start, end - start);\n };\n }\n}\n\nexport * from './core/browserfs';\n\n\n\n// WEBPACK FOOTER //\n// ../../../../src/index.ts","module.exports = require('buffer').Buffer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./build/temp/library/webpack/BFSBuffer.js\n// module id = 1\n// module chunks = 0","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nvar K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('Invalid typed array length')\n }\n // Return an augmented `Uint8Array` instance\n var buf = new Uint8Array(length)\n buf.__proto__ = Buffer.prototype\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\n// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\nif (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true,\n enumerable: false,\n writable: false\n })\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (isArrayBuffer(value)) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n return fromObject(value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nBuffer.prototype.__proto__ = Uint8Array.prototype\nBuffer.__proto__ = Uint8Array\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n var buf = createBuffer(length)\n\n var actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n var buf = createBuffer(length)\n for (var i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n var buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n buf.__proto__ = Buffer.prototype\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n var buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj) {\n if (isArrayBufferView(obj) || 'length' in obj) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (isArrayBufferView(string) || isArrayBuffer(string)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n newBuf.__proto__ = Buffer.prototype\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n var limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n var limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : new Buffer(val, encoding)\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffers from another context (i.e. an iframe) do not pass the `instanceof` check\n// but they should be treated as valid. See: https://github.com/feross/buffer/issues/166\nfunction isArrayBuffer (obj) {\n return obj instanceof ArrayBuffer ||\n (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&\n typeof obj.byteLength === 'number')\n}\n\n// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView`\nfunction isArrayBufferView (obj) {\n return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)\n}\n\nfunction numberIsNaN (obj) {\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/buffer/index.js\n// module id = 2\n// module chunks = 0","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return b64.length * 3 / 4 - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/base64-js/index.js\n// module id = 3\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ieee754/index.js\n// module id = 4\n// module chunks = 0","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tmodule.children = [];\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 5\n// module chunks = 0","import Process = require('./process');\nimport TTD = require('./tty');\n\nvar process = new Process(),\n processProxy: Process = {};\n\nfunction defineKey(key: string) {\n if (( processProxy)[key]) {\n // Probably a builtin Object property we don't care about.\n return;\n }\n if (typeof ( process)[key] === 'function') {\n ( processProxy)[key] = function() {\n return ( ( process)[key]).apply(process, arguments);\n };\n } else {\n ( processProxy)[key] = ( process)[key];\n }\n}\n\nfor (var key in process) {\n // Don't check if process.hasOwnProperty; we want to also expose objects\n // up the prototype hierarchy.\n defineKey(key);\n}\n\n// Special key: Ensure we update public-facing values of stdin/stdout/stderr.\nprocessProxy.initializeTTYs = function() {\n if (process.stdin === null) {\n process.initializeTTYs();\n processProxy.stdin = process.stdin;\n processProxy.stdout = process.stdout;\n processProxy.stderr = process.stderr;\n }\n};\n\nprocess.nextTick(() => {\n processProxy.initializeTTYs();\n});\n\nexport = processProxy;\n\n\n\n// WEBPACK FOOTER //\n// ../ts/index.ts","// Use path and TTY for type information only. We lazily pull them in\n// to avoid circular dependencies :(\n// (path depends on process for cwd(), TTY depends on streams which depends\n// on process.nextTick/process.stdout/stderr/stdin).\nimport _path = require('path');\nimport _TTY = require('./tty');\nimport events = require('events');\n\n// Path depends on process. Avoid a circular reference by dynamically including path when we need it.\nvar path: typeof _path = null;\n\nclass Item {\n private fun: Function;\n private array: any[];\n constructor(fun: Function, array: any[]) {\n this.fun = fun;\n this.array = array;\n }\n\n public run(): void {\n this.fun.apply(null, this.array);\n }\n}\n\n/**\n * Contains a queue of Items for process.nextTick.\n * Inspired by node-process: https://github.com/defunctzombie/node-process\n */\nclass NextTickQueue {\n private _queue: Item[] = [];\n private _draining = false;\n // Used/assigned by the drainQueue function.\n private _currentQueue: Item[] = null;\n private _queueIndex = -1;\n\n public push(item: Item): void {\n if (this._queue.push(item) === 1 && !this._draining) {\n setTimeout(() => this._drainQueue(), 0);\n }\n }\n\n private _cleanUpNextTick() {\n this._draining = false;\n if (this._currentQueue && this._currentQueue.length) {\n this._queue = this._currentQueue.concat(this._queue);\n } else {\n this._queueIndex = -1;\n }\n if (this._queue.length) {\n this._drainQueue();\n }\n }\n\n private _drainQueue() {\n if (this._draining) {\n return;\n }\n // If an Item throws an unhandled exception, this function will clean things up.\n var timeout = setTimeout(() => this._cleanUpNextTick());\n this._draining = true;\n\n var len = this._queue.length;\n while(len) {\n this._currentQueue = this._queue;\n this._queue = [];\n while (++this._queueIndex < len) {\n if (this._currentQueue) {\n this._currentQueue[this._queueIndex].run();\n }\n }\n this._queueIndex = -1;\n len = this._queue.length;\n }\n this._currentQueue = null;\n this._draining = false;\n clearTimeout(timeout);\n }\n}\n\n/**\n * Partial implementation of Node's `process` module.\n * We implement the portions that are relevant for the filesystem.\n * @see http://nodejs.org/api/process.html\n * @class\n */\nclass Process extends events.EventEmitter implements NodeJS.Process {\n private startTime = Date.now();\n\n private _cwd: string = '/';\n /**\n * Changes the current working directory.\n *\n * **Note**: BrowserFS does not validate that the directory actually exists.\n *\n * @example Usage example\n * console.log('Starting directory: ' + process.cwd());\n * process.chdir('/tmp');\n * console.log('New directory: ' + process.cwd());\n * @param [String] dir The directory to change to.\n */\n public chdir(dir: string): void {\n // XXX: Circular dependency hack.\n if (path === null) {\n path = require('path');\n }\n this._cwd = path.resolve(dir);\n }\n /**\n * Returns the current working directory.\n * @example Usage example\n * console.log('Current directory: ' + process.cwd());\n * @return [String] The current working directory.\n */\n public cwd(): string {\n return this._cwd;\n }\n /**\n * Returns what platform you are running on.\n * @return [String]\n */\n public platform: string = 'browser';\n /**\n * Number of seconds BrowserFS has been running.\n * @return [Number]\n */\n public uptime(): number {\n return ((Date.now() - this.startTime) / 1000) | 0;\n }\n\n public argv: string[] = [];\n public execArgv: string[] = [];\n public stdout: _TTY = null;\n public stderr: _TTY = null;\n public stdin: _TTY = null;\n public domain: NodeJS.Domain = null;\n\n private _queue: NextTickQueue = new NextTickQueue();\n\n public nextTick(fun: any, ...args: any[]) {\n this._queue.push(new Item(fun, args));\n }\n\n public execPath = __dirname;\n\n public abort(): void {\n this.emit('abort');\n }\n\n public env: {[name: string]: string} = {};\n public exitCode: number = 0;\n public exit(code: number): void {\n this.exitCode = code;\n this.emit('exit', [code]);\n }\n\n private _gid: number = 1;\n public getgid(): number {\n return this._gid;\n }\n public setgid(gid: number | string): void {\n if (typeof gid === 'number') {\n this._gid = gid;\n } else {\n this._gid = 1;\n }\n }\n\n private _uid: number = 1;\n public getuid(): number {\n return this._uid;\n }\n public setuid(uid: number | string): void {\n if (typeof uid === 'number') {\n this._uid = uid;\n } else {\n this._uid = 1;\n }\n }\n\n public version: string = 'v5.0';\n\n public versions = {\n http_parser: '0.0',\n node: '5.0',\n v8: '0.0',\n uv: '0.0',\n zlib: '0.0',\n ares: '0.0',\n icu: '0.0',\n modules: '0',\n openssl: '0.0'\n };\n\n public config = {\n target_defaults:\n { cflags: [],\n default_configuration: 'Release',\n defines: [],\n include_dirs: [],\n libraries: [] },\n variables:\n { clang: 0,\n host_arch: 'x32',\n node_install_npm: false,\n node_install_waf: false,\n node_prefix: '',\n node_shared_cares: false,\n node_shared_http_parser: false,\n node_shared_libuv: false,\n node_shared_zlib: false,\n node_shared_v8: false,\n node_use_dtrace: false,\n node_use_etw: false,\n node_use_openssl: false,\n node_shared_openssl: false,\n strict_aliasing: false,\n target_arch: 'x32',\n v8_use_snapshot: false,\n v8_no_strict_aliasing: 0,\n visibility: '' } };\n\n public kill(pid: number, signal?: string): void {\n this.emit('kill', [pid, signal]);\n }\n\n public pid = (Math.random()*1000)|0;\n\n public title = 'node';\n public arch = 'x32';\n public memoryUsage(): {rss: number; heapTotal: number; heapUsed: number;} {\n return { rss: 0, heapTotal: 0, heapUsed: 0 }\n }\n\n private _mask = 18;\n public umask(mask: number = this._mask): number {\n let oldMask = this._mask;\n this._mask = mask;\n this.emit('umask', [mask]);\n return oldMask;\n }\n\n public hrtime(): [number, number] {\n let timeinfo: number;\n if (typeof performance !== 'undefined') {\n timeinfo = performance.now();\n } else if (Date['now']) {\n timeinfo = Date.now();\n } else {\n timeinfo = (new Date()).getTime();\n }\n let secs = (timeinfo / 1000)|0;\n timeinfo -= secs * 1000;\n timeinfo = (timeinfo * 1000000)|0;\n return [secs, timeinfo];\n }\n\n /**\n * [BFS only] Initialize the TTY devices.\n */\n public initializeTTYs(): void {\n // Guard against multiple invocations.\n if (this.stdout === null) {\n let TTY: typeof _TTY = require('./tty');\n this.stdout = new TTY();\n this.stderr = new TTY();\n this.stdin = new TTY();\n }\n }\n\n /**\n * Worker-only function; irrelevant here.\n */\n public disconnect(): void {\n\n }\n // Undefined in main thread. Worker-only.\n public connected: boolean = undefined;\n}\n\nexport = Process;\n\n\n// WEBPACK FOOTER //\n// ../ts/process.ts","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/events/events.js\n// module id = 8\n// module chunks = 0","// Type information only.\nimport _path = require('path');\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nfunction posixSplitPath(filename: string): string[] {\n var out = splitPathRe.exec(filename);\n out.shift();\n return out;\n}\n\n/**\n * Emulates Node's `path` module. This module contains utilities for handling and\n * transforming file paths. **All** of these methods perform only string\n * transformations. The file system is not consulted to check whether paths are\n * valid.\n * @see http://nodejs.org/api/path.html\n * @class\n */\nclass path {\n /**\n * Normalize a string path, taking care of '..' and '.' parts.\n *\n * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.\n * @example Usage example\n * path.normalize('/foo/bar//baz/asdf/quux/..')\n * // returns\n * '/foo/bar/baz/asdf'\n * @param [String] p The path to normalize.\n * @return [String]\n */\n public static normalize(p: string): string {\n // Special case: '' -> '.'\n if (p === '') {\n p = '.';\n }\n // It's very important to know if the path is relative or not, since it\n // changes how we process .. and reconstruct the split string.\n var absolute = p.charAt(0) === path.sep;\n // Remove repeated //s\n p = path._removeDuplicateSeps(p);\n // Try to remove as many '../' as possible, and remove '.' completely.\n var components = p.split(path.sep);\n var goodComponents: string[] = [];\n for (var idx = 0; idx < components.length; idx++) {\n var c = components[idx];\n if (c === '.') {\n continue;\n } else if (c === '..' && (absolute || (!absolute && goodComponents.length > 0 && goodComponents[0] !== '..'))) {\n // In the absolute case: Path is relative to root, so we may pop even if\n // goodComponents is empty (e.g. /../ => /)\n // In the relative case: We're getting rid of a directory that preceded\n // it (e.g. /foo/../bar -> /bar)\n goodComponents.pop();\n } else {\n goodComponents.push(c);\n }\n }\n\n // Add in '.' when it's a relative path with no other nonempty components.\n // Possible results: '.' and './' (input: [''] or [])\n // @todo Can probably simplify this logic.\n if (!absolute && goodComponents.length < 2) {\n switch (goodComponents.length) {\n case 1:\n if (goodComponents[0] === '') {\n goodComponents.unshift('.');\n }\n break;\n default:\n goodComponents.push('.');\n }\n }\n p = goodComponents.join(path.sep);\n if (absolute && p.charAt(0) !== path.sep) {\n p = path.sep + p;\n }\n return p;\n }\n\n /**\n * Join all arguments together and normalize the resulting path.\n *\n * Arguments must be strings.\n * @example Usage\n * path.join('/foo', 'bar', 'baz/asdf', 'quux', '..')\n * // returns\n * '/foo/bar/baz/asdf'\n *\n * path.join('foo', {}, 'bar')\n * // throws exception\n * TypeError: Arguments to path.join must be strings\n * @param [String,...] paths Each component of the path\n * @return [String]\n */\n public static join(...paths: any[]): string {\n // Required: Prune any non-strings from the path. I also prune empty segments\n // so we can do a simple join of the array.\n var processed: string[] = [];\n for (var i = 0; i < paths.length; i++) {\n var segment = paths[i];\n if (typeof segment !== 'string') {\n throw new TypeError(\"Invalid argument type to path.join: \" + (typeof segment));\n } else if (segment !== '') {\n processed.push(segment);\n }\n }\n return path.normalize(processed.join(path.sep));\n }\n\n /**\n * Resolves to to an absolute path.\n *\n * If to isn't already absolute from arguments are prepended in right to left\n * order, until an absolute path is found. If after using all from paths still\n * no absolute path is found, the current working directory is used as well.\n * The resulting path is normalized, and trailing slashes are removed unless\n * the path gets resolved to the root directory. Non-string arguments are\n * ignored.\n *\n * Another way to think of it is as a sequence of cd commands in a shell.\n *\n * path.resolve('foo/bar', '/tmp/file/', '..', 'a/../subfile')\n *\n * Is similar to:\n *\n * cd foo/bar\n * cd /tmp/file/\n * cd ..\n * cd a/../subfile\n * pwd\n *\n * The difference is that the different paths don't need to exist and may also\n * be files.\n * @example Usage example\n * path.resolve('/foo/bar', './baz')\n * // returns\n * '/foo/bar/baz'\n *\n * path.resolve('/foo/bar', '/tmp/file/')\n * // returns\n * '/tmp/file'\n *\n * path.resolve('wwwroot', 'static_files/png/', '../gif/image.gif')\n * // if currently in /home/myself/node, it returns\n * '/home/myself/node/wwwroot/static_files/gif/image.gif'\n * @param [String,...] paths\n * @return [String]\n */\n public static resolve(...paths: string[]): string {\n // Monitor for invalid paths, throw out empty paths, and look for the *last*\n // absolute path that we see.\n var processed: string[] = [];\n for (var i = 0; i < paths.length; i++) {\n var p = paths[i];\n if (typeof p !== 'string') {\n throw new TypeError(\"Invalid argument type to path.join: \" + (typeof p));\n } else if (p !== '') {\n // Remove anything that has occurred before this absolute path, as it\n // doesn't matter.\n if (p.charAt(0) === path.sep) {\n processed = [];\n }\n processed.push(p);\n }\n }\n // Special: Remove trailing slash unless it's the root\n var resolved = path.normalize(processed.join(path.sep));\n if (resolved.length > 1 && resolved.charAt(resolved.length - 1) === path.sep) {\n return resolved.substr(0, resolved.length - 1);\n }\n // Special: If it doesn't start with '/', it's relative and we need to append\n // the current directory.\n if (resolved.charAt(0) !== path.sep) {\n // Remove ./, since we're going to append the current directory.\n if (resolved.charAt(0) === '.' && (resolved.length === 1 || resolved.charAt(1) === path.sep)) {\n resolved = resolved.length === 1 ? '' : resolved.substr(2);\n }\n // Append the current directory, which *must* be an absolute path.\n var cwd = process.cwd();\n if (resolved !== '') {\n // cwd will never end in a /... unless it's the root.\n resolved = this.normalize(cwd + (cwd !== '/' ? path.sep : '') + resolved);\n } else {\n resolved = cwd;\n }\n }\n return resolved;\n }\n\n /**\n * Solve the relative path from from to to.\n *\n * At times we have two absolute paths, and we need to derive the relative path\n * from one to the other. This is actually the reverse transform of\n * path.resolve, which means we see that:\n *\n * path.resolve(from, path.relative(from, to)) == path.resolve(to)\n *\n * @example Usage example\n * path.relative('C:\\\\orandea\\\\test\\\\aaa', 'C:\\\\orandea\\\\impl\\\\bbb')\n * // returns\n * '..\\\\..\\\\impl\\\\bbb'\n *\n * path.relative('/data/orandea/test/aaa', '/data/orandea/impl/bbb')\n * // returns\n * '../../impl/bbb'\n * @param [String] from\n * @param [String] to\n * @return [String]\n */\n public static relative(from: string, to: string): string {\n var i: number;\n // Alright. Let's resolve these two to absolute paths and remove any\n // weirdness.\n from = path.resolve(from);\n to = path.resolve(to);\n var fromSegs = from.split(path.sep);\n var toSegs = to.split(path.sep);\n // Remove the first segment on both, as it's '' (both are absolute paths)\n toSegs.shift();\n fromSegs.shift();\n // There are two segments to this path:\n // * Going *up* the directory hierarchy with '..'\n // * Going *down* the directory hierarchy with foo/baz/bat.\n var upCount = 0;\n var downSegs: string[] = [];\n // Figure out how many things in 'from' are shared with 'to'.\n for (i = 0; i < fromSegs.length; i++) {\n var seg = fromSegs[i];\n if (seg === toSegs[i]) {\n continue;\n }\n // The rest of 'from', including the current element, indicates how many\n // directories we need to go up.\n upCount = fromSegs.length - i;\n break;\n }\n // The rest of 'to' indicates where we need to change to. We place this\n // outside of the loop, as toSegs.length may be greater than fromSegs.length.\n downSegs = toSegs.slice(i);\n // Special case: If 'from' is '/'\n if (fromSegs.length === 1 && fromSegs[0] === '') {\n upCount = 0;\n }\n // upCount can't be greater than the number of fromSegs\n // (cd .. from / is still /)\n if (upCount > fromSegs.length) {\n upCount = fromSegs.length;\n }\n // Create the final string!\n var rv = '';\n for (i = 0; i < upCount; i++) {\n rv += '../';\n }\n rv += downSegs.join(path.sep);\n // Special case: Remove trailing '/'. Happens if it's all up and no down.\n if (rv.length > 1 && rv.charAt(rv.length - 1) === path.sep) {\n rv = rv.substr(0, rv.length - 1);\n }\n return rv;\n }\n\n /**\n * Return the directory name of a path. Similar to the Unix `dirname` command.\n *\n * Note that BrowserFS does not validate if the path is actually a valid\n * directory.\n * @example Usage example\n * path.dirname('/foo/bar/baz/asdf/quux')\n * // returns\n * '/foo/bar/baz/asdf'\n * @param [String] p The path to get the directory name of.\n * @return [String]\n */\n public static dirname(p: string): string {\n // We get rid of //, but we don't modify anything else (e.g. any extraneous .\n // and ../ are kept intact)\n p = path._removeDuplicateSeps(p);\n var absolute = p.charAt(0) === path.sep;\n var sections = p.split(path.sep);\n // Do 1 if it's /foo/bar, 2 if it's /foo/bar/\n if (sections.pop() === '' && sections.length > 0) {\n sections.pop();\n }\n // # of sections needs to be > 1 if absolute, since the first section is '' for '/'.\n // If not absolute, the first section is the first part of the path, and is OK\n // to return.\n if (sections.length > 1 || (sections.length === 1 && !absolute)) {\n return sections.join(path.sep);\n } else if (absolute) {\n return path.sep;\n } else {\n return '.';\n }\n }\n\n /**\n * Return the last portion of a path. Similar to the Unix basename command.\n * @example Usage example\n * path.basename('/foo/bar/baz/asdf/quux.html')\n * // returns\n * 'quux.html'\n *\n * path.basename('/foo/bar/baz/asdf/quux.html', '.html')\n * // returns\n * 'quux'\n * @param [String] p\n * @param [String?] ext\n * @return [String]\n */\n public static basename(p: string, ext: string = \"\"): string {\n // Special case: Normalize will modify this to '.'\n if (p === '') {\n return p;\n }\n // Normalize the string first to remove any weirdness.\n p = path.normalize(p);\n // Get the last part of the string.\n var sections = p.split(path.sep);\n var lastPart = sections[sections.length - 1];\n // Special case: If it's empty, then we have a string like so: foo/\n // Meaning, 'foo' is guaranteed to be a directory.\n if (lastPart === '' && sections.length > 1) {\n return sections[sections.length - 2];\n }\n // Remove the extension, if need be.\n if (ext.length > 0) {\n var lastPartExt = lastPart.substr(lastPart.length - ext.length);\n if (lastPartExt === ext) {\n return lastPart.substr(0, lastPart.length - ext.length);\n }\n }\n return lastPart;\n }\n\n /**\n * Return the extension of the path, from the last '.' to end of string in the\n * last portion of the path. If there is no '.' in the last portion of the path\n * or the first character of it is '.', then it returns an empty string.\n * @example Usage example\n * path.extname('index.html')\n * // returns\n * '.html'\n *\n * path.extname('index.')\n * // returns\n * '.'\n *\n * path.extname('index')\n * // returns\n * ''\n * @param [String] p\n * @return [String]\n */\n public static extname(p: string): string {\n p = path.normalize(p);\n var sections = p.split(path.sep);\n p = sections.pop();\n // Special case: foo/file.ext/ should return '.ext'\n if (p === '' && sections.length > 0) {\n p = sections.pop();\n }\n if (p === '..') {\n return '';\n }\n var i = p.lastIndexOf('.');\n if (i === -1 || i === 0) {\n return '';\n }\n return p.substr(i);\n }\n\n /**\n * Checks if the given path is an absolute path.\n *\n * Despite not being documented, this is a tested part of Node's path API.\n * @param [String] p\n * @return [Boolean] True if the path appears to be an absolute path.\n */\n public static isAbsolute(p: string): boolean {\n return p.length > 0 && p.charAt(0) === path.sep;\n }\n\n /**\n * Unknown. Undocumented.\n */\n public static _makeLong(p: string): string {\n return p;\n }\n\n /**\n * Returns an object from a path string.\n */\n public static parse(p: string): _path.ParsedPath {\n var allParts = posixSplitPath(p);\n return {\n root: allParts[0],\n dir: allParts[0] + allParts[1].slice(0, -1),\n base: allParts[2],\n ext: allParts[3],\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\n };\n }\n\n public static format(pathObject: _path.ParsedPath): string {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError(`Parameter 'pathObject' must be an object, not ${typeof pathObject}`);\n }\n\n var root = pathObject.root || '';\n\n if (typeof root !== 'string') {\n throw new TypeError(\n \"'pathObject.root' must be a string or undefined, not \" +\n typeof pathObject.root\n );\n }\n\n var dir = pathObject.dir ? pathObject.dir + path.sep : '';\n var base = pathObject.base || '';\n return dir + base;\n }\n\n // The platform-specific file separator. BrowserFS uses `/`.\n public static sep: string = '/';\n\n private static _replaceRegex = new RegExp(\"//+\", 'g');\n\n private static _removeDuplicateSeps(p: string): string {\n p = p.replace(this._replaceRegex, this.sep);\n return p;\n }\n\n // The platform-specific path delimiter. BrowserFS uses `:`.\n public static delimiter = ':';\n\n public static posix = path;\n // XXX: Typing hack. We don't actually support win32.\n public static win32 = path;\n}\n\nvar _: typeof _path = path;\n\nexport = path;\n\n\n\n// WEBPACK FOOTER //\n// ../ts/path.ts","import stream = require('stream');\n\nclass TTY extends stream.Duplex {\n public isRaw: boolean = false;\n public columns: number = 80;\n public rows: number = 120;\n public isTTY: boolean = true;\n private _bufferedWrites: Buffer[] = [];\n private _waitingForWrites: boolean = false;\n\n constructor() {\n super();\n }\n\n /**\n * Toggle raw mode.\n */\n public setRawMode(mode: boolean): void {\n if (this.isRaw !== mode) {\n this.isRaw = mode;\n // [BFS] TTY implementations can use this to change their event emitting\n // patterns.\n this.emit('modeChange');\n }\n }\n\n /**\n * [BFS] Update the number of columns available on the terminal.\n */\n public changeColumns(columns: number): void {\n if (columns !== this.columns) {\n this.columns = columns;\n // Resize event.\n this.emit('resize');\n }\n }\n\n /**\n * [BFS] Update the number of rows available on the terminal.\n */\n public changeRows(rows: number): void {\n if (rows !== this.rows) {\n this.rows = rows;\n // Resize event.\n this.emit('resize');\n }\n }\n\n /**\n * Returns 'true' if the given object is a TTY.\n */\n public static isatty(fd: any): fd is TTY {\n return fd && fd instanceof TTY;\n }\n\n public _write(chunk: any, encoding: string, cb: Function): void {\n var error: any;\n try {\n var data: Buffer;\n if (typeof(chunk) === 'string') {\n data = new Buffer(chunk, encoding);\n } else {\n data = chunk;\n }\n this._bufferedWrites.push(data);\n if (this._waitingForWrites) {\n this._read(1024);\n }\n } catch (e) {\n error = e;\n } finally {\n cb(error);\n }\n }\n\n public _read(size: number): void {\n // Size is advisory -- we can ignore it.\n if (this._bufferedWrites.length === 0) {\n this._waitingForWrites = true;\n } else {\n while (this._bufferedWrites.length > 0) {\n this._waitingForWrites = this.push(this._bufferedWrites.shift());\n if (!this._waitingForWrites) {\n break;\n }\n }\n }\n }\n}\n\nexport = TTY;\n\n\n\n// WEBPACK FOOTER //\n// ../ts/tty.ts","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/stream-browserify/index.js\n// module id = 11\n// module chunks = 0","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inherits/inherits_browser.js\n// module id = 12\n// module chunks = 0","var Stream = (function (){\n try {\n return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify\n } catch(_){}\n}());\nexports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = Stream || exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n\nif (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) {\n module.exports = Stream;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/readable.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nmodule.exports = Readable;\n\n/**/\nvar processNextTick = require('process-nextick-args');\n/**/\n\n/**/\nvar isArray = require('isarray');\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n\n/**/\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\nvar Stream;\n(function () {\n try {\n Stream = require('st' + 'ream');\n } catch (_) {} finally {\n if (!Stream) Stream = require('events').EventEmitter;\n }\n})();\n/**/\n\nvar Buffer = require('buffer').Buffer;\n/**/\nvar bufferShim = require('buffer-shims');\n/**/\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar debugUtil = require('util');\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/**/\n\nvar BufferList = require('./internal/streams/BufferList');\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') {\n return emitter.prependListener(event, fn);\n } else {\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n }\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~~this.highWaterMark;\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // when piping, we only care about 'readable' events that happen\n // after read()ing all the bytes and not getting any pushback.\n this.ranOut = false;\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options && typeof options.read === 'function') this._read = options.read;\n\n Stream.call(this);\n}\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n\n if (!state.objectMode && typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = bufferShim.from(chunk, encoding);\n encoding = '';\n }\n }\n\n return readableAddChunk(this, state, chunk, encoding, false);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n var state = this._readableState;\n return readableAddChunk(this, state, chunk, '', true);\n};\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\nfunction readableAddChunk(stream, state, chunk, encoding, addToFront) {\n var er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (state.ended && !addToFront) {\n var e = new Error('stream.push() after EOF');\n stream.emit('error', e);\n } else if (state.endEmitted && addToFront) {\n var _e = new Error('stream.unshift() after end event');\n stream.emit('error', _e);\n } else {\n var skipAdd;\n if (state.decoder && !addToFront && !encoding) {\n chunk = state.decoder.write(chunk);\n skipAdd = !state.objectMode && chunk.length === 0;\n }\n\n if (!addToFront) state.reading = false;\n\n // Don't add to the buffer if we've decoded to an empty string chunk and\n // we're not in object mode\n if (!skipAdd) {\n // if we want the data now, just emit it.\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n }\n\n maybeReadMore(stream, state);\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n\n return needMoreData(state);\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction chunkInvalid(state, chunk) {\n var er = null;\n if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n processNextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : cleanup;\n if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable) {\n debug('onunpipe');\n if (readable === src) {\n cleanup();\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', cleanup);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this);\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n processNextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this, state);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n processNextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var state = this._readableState;\n var paused = false;\n\n var self = this;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) self.push(chunk);\n }\n\n self.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = self.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n forEach(events, function (ev) {\n stream.on(ev, self.emit.bind(self, ev));\n });\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n self._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return self;\n};\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = bufferShim.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n processNextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_readable.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nif (!process.version ||\n process.version.indexOf('v0.') === 0 ||\n process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = nextTick;\n} else {\n module.exports = process.nextTick;\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process-nextick-args/index.js\n// module id = 15\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/isarray/index.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar buffer = require('buffer');\nvar Buffer = buffer.Buffer;\nvar SlowBuffer = buffer.SlowBuffer;\nvar MAX_LEN = buffer.kMaxLength || 2147483647;\nexports.alloc = function alloc(size, fill, encoding) {\n if (typeof Buffer.alloc === 'function') {\n return Buffer.alloc(size, fill, encoding);\n }\n if (typeof encoding === 'number') {\n throw new TypeError('encoding must not be number');\n }\n if (typeof size !== 'number') {\n throw new TypeError('size must be a number');\n }\n if (size > MAX_LEN) {\n throw new RangeError('size is too large');\n }\n var enc = encoding;\n var _fill = fill;\n if (_fill === undefined) {\n enc = undefined;\n _fill = 0;\n }\n var buf = new Buffer(size);\n if (typeof _fill === 'string') {\n var fillBuf = new Buffer(_fill, enc);\n var flen = fillBuf.length;\n var i = -1;\n while (++i < size) {\n buf[i] = fillBuf[i % flen];\n }\n } else {\n buf.fill(_fill);\n }\n return buf;\n}\nexports.allocUnsafe = function allocUnsafe(size) {\n if (typeof Buffer.allocUnsafe === 'function') {\n return Buffer.allocUnsafe(size);\n }\n if (typeof size !== 'number') {\n throw new TypeError('size must be a number');\n }\n if (size > MAX_LEN) {\n throw new RangeError('size is too large');\n }\n return new Buffer(size);\n}\nexports.from = function from(value, encodingOrOffset, length) {\n if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) {\n return Buffer.from(value, encodingOrOffset, length);\n }\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n if (typeof value === 'string') {\n return new Buffer(value, encodingOrOffset);\n }\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n var offset = encodingOrOffset;\n if (arguments.length === 1) {\n return new Buffer(value);\n }\n if (typeof offset === 'undefined') {\n offset = 0;\n }\n var len = length;\n if (typeof len === 'undefined') {\n len = value.byteLength - offset;\n }\n if (offset >= value.byteLength) {\n throw new RangeError('\\'offset\\' is out of bounds');\n }\n if (len > value.byteLength - offset) {\n throw new RangeError('\\'length\\' is out of bounds');\n }\n return new Buffer(value.slice(offset, offset + len));\n }\n if (Buffer.isBuffer(value)) {\n var out = new Buffer(value.length);\n value.copy(out, 0, 0, value.length);\n return out;\n }\n if (value) {\n if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) {\n return new Buffer(value);\n }\n if (value.type === 'Buffer' && Array.isArray(value.data)) {\n return new Buffer(value.data);\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.');\n}\nexports.allocUnsafeSlow = function allocUnsafeSlow(size) {\n if (typeof Buffer.allocUnsafeSlow === 'function') {\n return Buffer.allocUnsafeSlow(size);\n }\n if (typeof size !== 'number') {\n throw new TypeError('size must be a number');\n }\n if (size >= MAX_LEN) {\n throw new RangeError('size is too large');\n }\n return new SlowBuffer(size);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/buffer-shims/index.js\n// module id = 17\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-util-is/lib/util.js\n// module id = 18\n// module chunks = 0","/* (ignored) */\n\n\n//////////////////\n// WEBPACK FOOTER\n// util (ignored)\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar Buffer = require('buffer').Buffer;\n/**/\nvar bufferShim = require('buffer-shims');\n/**/\n\nmodule.exports = BufferList;\n\nfunction BufferList() {\n this.head = null;\n this.tail = null;\n this.length = 0;\n}\n\nBufferList.prototype.push = function (v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n};\n\nBufferList.prototype.unshift = function (v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n};\n\nBufferList.prototype.shift = function () {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n};\n\nBufferList.prototype.clear = function () {\n this.head = this.tail = null;\n this.length = 0;\n};\n\nBufferList.prototype.join = function (s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n};\n\nBufferList.prototype.concat = function (n) {\n if (this.length === 0) return bufferShim.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = bufferShim.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n p.data.copy(ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/internal/streams/BufferList.js\n// module id = 20\n// module chunks = 0","// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n'use strict';\n\n/**/\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/**/\n\nmodule.exports = Duplex;\n\n/**/\nvar processNextTick = require('process-nextick-args');\n/**/\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\nvar keys = objectKeys(Writable.prototype);\nfor (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n processNextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nfunction forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_duplex.js\n// module id = 21\n// module chunks = 0","// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\nmodule.exports = Writable;\n\n/**/\nvar processNextTick = require('process-nextick-args');\n/**/\n\n/**/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream;\n(function () {\n try {\n Stream = require('st' + 'ream');\n } catch (_) {} finally {\n if (!Stream) Stream = require('events').EventEmitter;\n }\n})();\n/**/\n\nvar Buffer = require('buffer').Buffer;\n/**/\nvar bufferShim = require('buffer-shims');\n/**/\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n\n options = options || {};\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~~this.highWaterMark;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n processNextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n processNextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = Buffer.isBuffer(chunk);\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = bufferShim.from(chunk, encoding);\n }\n return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n chunk = decodeChunk(state, chunk, encoding);\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) processNextTick(cb, er);else cb(er);\n\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished) {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n if (state.pendingcb === 0) {\n prefinish(stream, state);\n state.finished = true;\n stream.emit('finish');\n } else {\n prefinish(stream, state);\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) processNextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function (err) {\n var entry = _this.entry;\n _this.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = _this;\n } else {\n state.corkedRequestsFree = _this;\n }\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_writable.js\n// module id = 22\n// module chunks = 0","\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/util-deprecate/browser.js\n// module id = 23\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar Buffer = require('buffer').Buffer;\n\nvar isBufferEncoding = Buffer.isEncoding\n || function(encoding) {\n switch (encoding && encoding.toLowerCase()) {\n case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n default: return false;\n }\n }\n\n\nfunction assertEncoding(encoding) {\n if (encoding && !isBufferEncoding(encoding)) {\n throw new Error('Unknown encoding: ' + encoding);\n }\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters. CESU-8 is handled as part of the UTF-8 encoding.\n//\n// @TODO Handling all encodings inside a single object makes it very difficult\n// to reason about this code, so it should be split up in the future.\n// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n// points as used by CESU-8.\nvar StringDecoder = exports.StringDecoder = function(encoding) {\n this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n assertEncoding(encoding);\n switch (this.encoding) {\n case 'utf8':\n // CESU-8 represents each of Surrogate Pair by 3-bytes\n this.surrogateSize = 3;\n break;\n case 'ucs2':\n case 'utf16le':\n // UTF-16 represents each of Surrogate Pair by 2-bytes\n this.surrogateSize = 2;\n this.detectIncompleteChar = utf16DetectIncompleteChar;\n break;\n case 'base64':\n // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n this.surrogateSize = 3;\n this.detectIncompleteChar = base64DetectIncompleteChar;\n break;\n default:\n this.write = passThroughWrite;\n return;\n }\n\n // Enough space to store all bytes of a single character. UTF-8 needs 4\n // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n this.charBuffer = new Buffer(6);\n // Number of bytes received for the current incomplete multi-byte character.\n this.charReceived = 0;\n // Number of bytes expected for the current incomplete multi-byte character.\n this.charLength = 0;\n};\n\n\n// write decodes the given buffer and returns it as JS string that is\n// guaranteed to not contain any partial multi-byte characters. Any partial\n// character found at the end of the buffer is buffered up, and will be\n// returned when calling write again with the remaining bytes.\n//\n// Note: Converting a Buffer containing an orphan surrogate to a String\n// currently works, but converting a String to a Buffer (via `new Buffer`, or\n// Buffer#write) will replace incomplete surrogates with the unicode\n// replacement character. See https://codereview.chromium.org/121173009/ .\nStringDecoder.prototype.write = function(buffer) {\n var charStr = '';\n // if our last write ended with an incomplete multibyte character\n while (this.charLength) {\n // determine how many remaining bytes this buffer has to offer for this char\n var available = (buffer.length >= this.charLength - this.charReceived) ?\n this.charLength - this.charReceived :\n buffer.length;\n\n // add the new bytes to the char buffer\n buffer.copy(this.charBuffer, this.charReceived, 0, available);\n this.charReceived += available;\n\n if (this.charReceived < this.charLength) {\n // still not enough chars in this buffer? wait for more ...\n return '';\n }\n\n // remove bytes belonging to the current character from the buffer\n buffer = buffer.slice(available, buffer.length);\n\n // get the character that was split\n charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n var charCode = charStr.charCodeAt(charStr.length - 1);\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n this.charLength += this.surrogateSize;\n charStr = '';\n continue;\n }\n this.charReceived = this.charLength = 0;\n\n // if there are no more bytes in this buffer, just emit our char\n if (buffer.length === 0) {\n return charStr;\n }\n break;\n }\n\n // determine and set charLength / charReceived\n this.detectIncompleteChar(buffer);\n\n var end = buffer.length;\n if (this.charLength) {\n // buffer the incomplete character bytes we got\n buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n end -= this.charReceived;\n }\n\n charStr += buffer.toString(this.encoding, 0, end);\n\n var end = charStr.length - 1;\n var charCode = charStr.charCodeAt(end);\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n var size = this.surrogateSize;\n this.charLength += size;\n this.charReceived += size;\n this.charBuffer.copy(this.charBuffer, size, 0, size);\n buffer.copy(this.charBuffer, 0, 0, size);\n return charStr.substring(0, end);\n }\n\n // or just emit the charStr\n return charStr;\n};\n\n// detectIncompleteChar determines if there is an incomplete UTF-8 character at\n// the end of the given buffer. If so, it sets this.charLength to the byte\n// length that character, and sets this.charReceived to the number of bytes\n// that are available for this character.\nStringDecoder.prototype.detectIncompleteChar = function(buffer) {\n // determine how many bytes we have to check at the end of this buffer\n var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n // Figure out if one of the last i bytes of our buffer announces an\n // incomplete char.\n for (; i > 0; i--) {\n var c = buffer[buffer.length - i];\n\n // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n // 110XXXXX\n if (i == 1 && c >> 5 == 0x06) {\n this.charLength = 2;\n break;\n }\n\n // 1110XXXX\n if (i <= 2 && c >> 4 == 0x0E) {\n this.charLength = 3;\n break;\n }\n\n // 11110XXX\n if (i <= 3 && c >> 3 == 0x1E) {\n this.charLength = 4;\n break;\n }\n }\n this.charReceived = i;\n};\n\nStringDecoder.prototype.end = function(buffer) {\n var res = '';\n if (buffer && buffer.length)\n res = this.write(buffer);\n\n if (this.charReceived) {\n var cr = this.charReceived;\n var buf = this.charBuffer;\n var enc = this.encoding;\n res += buf.slice(0, cr).toString(enc);\n }\n\n return res;\n};\n\nfunction passThroughWrite(buffer) {\n return buffer.toString(this.encoding);\n}\n\nfunction utf16DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 2;\n this.charLength = this.charReceived ? 2 : 0;\n}\n\nfunction base64DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 3;\n this.charLength = this.charReceived ? 3 : 0;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/string_decoder/index.js\n// module id = 24\n// module chunks = 0","// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(Transform, Duplex);\n\nfunction TransformState(stream) {\n this.afterTransform = function (er, data) {\n return afterTransform(stream, er, data);\n };\n\n this.needTransform = false;\n this.transforming = false;\n this.writecb = null;\n this.writechunk = null;\n this.writeencoding = null;\n}\n\nfunction afterTransform(stream, er, data) {\n var ts = stream._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data !== null && data !== undefined) stream.push(data);\n\n cb(er);\n\n var rs = stream._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n stream._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = new TransformState(this);\n\n var stream = this;\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n // When the writable side finishes, then flush out anything remaining.\n this.once('prefinish', function () {\n if (typeof this._flush === 'function') this._flush(function (er, data) {\n done(stream, er, data);\n });else done(stream);\n });\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n\n if (data !== null && data !== undefined) stream.push(data);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n var ws = stream._writableState;\n var ts = stream._transformState;\n\n if (ws.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (ts.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_transform.js\n// module id = 25\n// module chunks = 0","// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/lib/_stream_passthrough.js\n// module id = 26\n// module chunks = 0","module.exports = require(\"./lib/_stream_writable.js\")\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/writable.js\n// module id = 27\n// module chunks = 0","module.exports = require(\"./lib/_stream_duplex.js\")\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/duplex.js\n// module id = 28\n// module chunks = 0","module.exports = require(\"./lib/_stream_transform.js\")\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/transform.js\n// module id = 29\n// module chunks = 0","module.exports = require(\"./lib/_stream_passthrough.js\")\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/readable-stream/passthrough.js\n// module id = 30\n// module chunks = 0","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overriden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n var dict;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n // Convert data if needed\n if (typeof dictionary === 'string') {\n dict = strings.string2buf(dictionary);\n } else if (toString.call(dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(dictionary);\n } else {\n dict = dictionary;\n }\n\n status = zlib_inflate.inflateSetDictionary(this.strm, dict);\n\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): ouput data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 alligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/inflate.js\n// module id = 31\n// module chunks = 0","'use strict';\n\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more conveniend processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' insdead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/inflate.js\n// module id = 32\n// module chunks = 0","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (source.hasOwnProperty(p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/utils/common.js\n// module id = 33\n// module chunks = 0","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It doesn't worth to make additional optimizationa as in original.\n// Small size is preferable.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/adler32.js\n// module id = 34\n// module chunks = 0","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/crc32.js\n// module id = 35\n// module chunks = 0","'use strict';\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/inffast.js\n// module id = 36\n// module chunks = 0","'use strict';\n\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/inftrees.js\n// module id = 37\n// module chunks = 0","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safary\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // use fallback for big arrays to avoid stack overflow\n if (len < 65537) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Fuckup - very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means vuffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/utils/strings.js\n// module id = 38\n// module chunks = 0","'use strict';\n\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/constants.js\n// module id = 39\n// module chunks = 0","'use strict';\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/messages.js\n// module id = 40\n// module chunks = 0","'use strict';\n\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/zstream.js\n// module id = 41\n// module chunks = 0","'use strict';\n\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/pako/lib/zlib/gzheader.js\n// module id = 42\n// module chunks = 0"],"sourceRoot":""}